WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/30/2010 09:50:57 PM (10 years ago)
Author:
ryan
Message:

Add bump down for menu bar. Allow themes to add a custom bump callback. Props ocean90. fixes #15592

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class-wp-admin-bar.php

    r16600 r16636  
    3636
    3737        add_action( 'admin_head', 'wp_admin_bar_header' );
     38
     39        if ( current_theme_supports( 'admin-bar' ) ) {
     40            $admin_bar_args = get_theme_support( 'admin-bar' ); // add_theme_support( 'admin-bar', array( 'callback' => '__return_false') );
     41            $header_callback = $admin_bar_args[0]['callback'];
     42        }
     43
     44        if ( empty($header_callback) )
     45            $header_callback = '_admin_bar_bump_cb';
     46
     47        add_action('wp_head', $header_callback);
    3848
    3949        wp_enqueue_script( 'admin-bar' );
Note: See TracChangeset for help on using the changeset viewer.