Order Menu function breaking other plugins
-
core/Loader/Loader.php
custom_menu_order should return a bool, not a function.
Change to:
add_filter( 'custom_menu_order', '__return_true' ); add_filter( 'menu_order', array( $this->admin, 'reorder_submenu_pages' ) );
core/Admin/Admin.php
when returning or exiting function, $menu_order needs to be returned.Change to:
/** * Reorder the submenu pages. * * @since 1.0.0 * * @param array $menu_order The WP menu order. */ public function reorder_submenu_pages( $menu_order ) { // Load the global submenu. global $submenu; if ( empty( $submenu['sg-cachepress'] ) ) { return $menu_order; } // Hide the dashboard page on Multisite applications. if ( is_multisite() ) { unset( $submenu['sg-cachepress'][0] ); return $menu_order; } $submenu['sg-cachepress'][0][0] = __( 'Dashboard', 'sg-cachepress' ); return $menu_order; }
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Order Menu function breaking other plugins’ is closed to new replies.