GC_Admin_Bar::add_menus()

最后更新于:2021-11-26 09:08:10

GC_Admin_Bar::add_menus()

源文件

文件: gc-includes/class-gc-admin-bar.php

	public function add_menus() {
		// User-related, aligned right.
		add_action( 'admin_bar_menu', 'gc_admin_bar_my_account_menu', 0 );
		add_action( 'admin_bar_menu', 'gc_admin_bar_search_menu', 4 );
		add_action( 'admin_bar_menu', 'gc_admin_bar_my_account_item', 7 );
		add_action( 'admin_bar_menu', 'gc_admin_bar_recovery_mode_menu', 8 );

		// Site-related.
		add_action( 'admin_bar_menu', 'gc_admin_bar_sidebar_toggle', 0 );
		add_action( 'admin_bar_menu', 'gc_admin_bar_gc_menu', 10 );
		add_action( 'admin_bar_menu', 'gc_admin_bar_my_sites_menu', 20 );
		add_action( 'admin_bar_menu', 'gc_admin_bar_site_menu', 30 );
		add_action( 'admin_bar_menu', 'gc_admin_bar_customize_menu', 40 );
		add_action( 'admin_bar_menu', 'gc_admin_bar_updates_menu', 50 );

		// Content-related.
		if ( ! is_network_admin() && ! is_user_admin() ) {
			add_action( 'admin_bar_menu', 'gc_admin_bar_comments_menu', 60 );
			add_action( 'admin_bar_menu', 'gc_admin_bar_new_content_menu', 70 );
		}
		add_action( 'admin_bar_menu', 'gc_admin_bar_edit_menu', 80 );

		add_action( 'admin_bar_menu', 'gc_admin_bar_add_secondary_groups', 200 );

		/**
		 * Fires after menus are added to the menu bar.
		 *
		 * @since 3.1.0
		 */
		do_action( 'add_admin_bar_menus' );
	}