Move admin menu manipulation from admin_head to admin_menu (#29088)

This commit is contained in:
Matt Sherman 2021-02-11 11:48:36 -05:00 committed by GitHub
parent b9d68c3f67
commit 9f00fbfde1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -22,6 +22,8 @@ class WC_Admin_Menus {
*/
public function __construct() {
// Add menus.
add_action( 'admin_menu', array( $this, 'menu_highlight' ) );
add_action( 'admin_menu', array( $this, 'menu_order_count' ) );
add_action( 'admin_menu', array( $this, 'admin_menu' ), 9 );
add_action( 'admin_menu', array( $this, 'reports_menu' ), 20 );
add_action( 'admin_menu', array( $this, 'settings_menu' ), 50 );
@ -31,8 +33,6 @@ class WC_Admin_Menus {
add_action( 'admin_menu', array( $this, 'addons_menu' ), 70 );
}
add_action( 'admin_head', array( $this, 'menu_highlight' ) );
add_action( 'admin_head', array( $this, 'menu_order_count' ) );
add_filter( 'menu_order', array( $this, 'menu_order' ) );
add_filter( 'custom_menu_order', array( $this, 'custom_menu_order' ) );
add_filter( 'set-screen-option', array( $this, 'set_screen_option' ), 10, 3 );