Register admin menus against admin_bar_menu action to be consistent with other menu hooks. see #14772

git-svn-id: http://svn.automattic.com/wordpress/trunk@16309 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2010-11-11 19:11:12 +00:00
parent e0aaecc573
commit 5cef2ca0a6
2 changed files with 12 additions and 10 deletions

View File

@ -53,6 +53,8 @@ function wp_admin_bar_render() {
$wp_admin_bar->load_user_locale_translations();
do_action( 'admin_bar_menu' );
do_action( 'wp_before_admin_bar_render' );
$wp_admin_bar->render();

View File

@ -171,18 +171,18 @@ class WP_Admin_Bar {
}
function add_menus() {
add_action( 'wp_before_admin_bar_render', 'wp_admin_bar_me_separator', 10 );
add_action( 'wp_before_admin_bar_render', 'wp_admin_bar_my_account_menu', 20 );
add_action( 'wp_before_admin_bar_render', 'wp_admin_bar_my_sites_menu', 30 );
add_action( 'wp_before_admin_bar_render', 'wp_admin_bar_edit_menu', 40 );
add_action( 'wp_before_admin_bar_render', 'wp_admin_bar_new_content_menu', 50 );
add_action( 'wp_before_admin_bar_render', 'wp_admin_bar_comments_menu', 60 );
add_action( 'wp_before_admin_bar_render', 'wp_admin_bar_appearance_menu', 70 );
add_action( 'wp_before_admin_bar_render', 'wp_admin_bar_updates_menu', 80 );
add_action( 'wp_before_admin_bar_render', 'wp_admin_bar_shortlink_menu', 90 );
add_action( 'admin_bar_menu', 'wp_admin_bar_me_separator', 10 );
add_action( 'admin_bar_menu', 'wp_admin_bar_my_account_menu', 20 );
add_action( 'admin_bar_menu', 'wp_admin_bar_my_sites_menu', 30 );
add_action( 'admin_bar_menu', 'wp_admin_bar_edit_menu', 40 );
add_action( 'admin_bar_menu', 'wp_admin_bar_new_content_menu', 50 );
add_action( 'admin_bar_menu', 'wp_admin_bar_comments_menu', 60 );
add_action( 'admin_bar_menu', 'wp_admin_bar_appearance_menu', 70 );
add_action( 'admin_bar_menu', 'wp_admin_bar_updates_menu', 80 );
add_action( 'admin_bar_menu', 'wp_admin_bar_shortlink_menu', 90 );
if ( is_multisite() && is_super_admin() && function_exists('wp_admin_bar_superadmin_settings_menu') )
add_action( 'wp_before_admin_bar_render', 'wp_admin_bar_superadmin_settings_menu', 1000 );
add_action( 'admin_bar_menu', 'wp_admin_bar_superadmin_settings_menu', 1000 );
do_action('add_admin_bar_menus');
}