Changeset 15834 for trunk/wp-includes/admin-bar.php
- Timestamp:
- 10/18/2010 05:58:36 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/admin-bar.php
r15769 r15834 12 12 global $current_user, $pagenow, $wp_admin_bar; 13 13 14 if ( defined('WP_SHOW_ADMIN_BAR') ) 15 $show_it = (bool) WP_SHOW_ADMIN_BAR; 16 else 17 $show_it = true; 18 19 if ( ! apply_filters('show_admin_bar', $show_it, get_current_screen() ) ) 20 return false; 21 14 22 /* Set the protocol constant used throughout this code */ 15 23 if ( !defined( 'PROTO' ) ) 16 24 if ( is_ssl() ) define( 'PROTO', 'https://' ); else define( 'PROTO', 'http://' ); 17 25 18 /* Don't load the admin bar if the user is not logged in , or we are using press this*/19 if ( !is_user_logged_in() || 'press-this.php' == $pagenow || 'update.php' == $pagenow)26 /* Don't load the admin bar if the user is not logged in */ 27 if ( !is_user_logged_in() ) 20 28 return false; 21 29 … … 27 35 if ( is_user_logged_in() ) 28 36 wp_enqueue_script( 'jquery', false, false, false, true ); 29 37 30 38 /* Load the admin bar class code ready for instantiation */ 31 39 require( ABSPATH . WPINC . '/admin-bar/admin-bar-class.php' ); … … 39 47 /* Initialize the admin bar */ 40 48 $wp_admin_bar = new wp_admin_bar(); 49 50 add_action( 'wp_head', 'wp_admin_bar_css' ); 51 add_action( 'admin_head', 'wp_admin_bar_css' ); 41 52 } 42 53 add_action( 'init', 'wp_admin_bar_init' ); … … 222 233 global $pagenow, $wp_locale; 223 234 224 if ( !is_user_logged_in() || 'press-this.php' == $pagenow || 'update.php' == $pagenow || 'media-upload.php' == $pagenow)235 if ( !is_user_logged_in() ) 225 236 return; 226 237 … … 233 244 <style type="text/css" media="print">#wpadminbar { display:none; }</style><?php 234 245 } 235 add_action( 'wp_head', 'wp_admin_bar_css' );236 add_action( 'admin_head', 'wp_admin_bar_css' );237 246 238 247 /**
Note: See TracChangeset
for help on using the changeset viewer.