From 2911ff8ec35f2623d3b05b09fbc43130a6cbca57 Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 30 Nov 2010 21:50:57 +0000 Subject: [PATCH] Add bump down for menu bar. Allow themes to add a custom bump callback. Props ocean90. fixes #15592 git-svn-id: http://svn.automattic.com/wordpress/trunk@16636 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/admin-bar.php | 15 +++++++++++++-- wp-includes/class-wp-admin-bar.php | 10 ++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/wp-includes/admin-bar.php b/wp-includes/admin-bar.php index 10b4316ce..fbf1089f3 100644 --- a/wp-includes/admin-bar.php +++ b/wp-includes/admin-bar.php @@ -285,12 +285,23 @@ function wp_admin_bar_updates_menu() { * Style and scripts for the admin bar. * * @since 3.1.0 - * @todo move js into a admin-bar js file * */ function wp_admin_bar_header() { ?> - + + + '__return_false') ); + $header_callback = $admin_bar_args[0]['callback']; + } + + if ( empty($header_callback) ) + $header_callback = '_admin_bar_bump_cb'; + + add_action('wp_head', $header_callback); + wp_enqueue_script( 'admin-bar' ); wp_enqueue_style( 'admin-bar' );