From f03bfe223f7094fb6367d4fb84121939bcee2df2 Mon Sep 17 00:00:00 2001 From: Ryan Boren 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: https://develop.svn.wordpress.org/trunk@16636 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 10b4316ce3..fbf1089f3d 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' );