Changeset 15834
- Timestamp:
- 10/18/2010 05:58:36 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/media-upload.php
r15171 r15834 9 9 * @subpackage Administration 10 10 */ 11 12 define('WP_SHOW_ADMIN_BAR' , false); 11 13 12 14 /** Load WordPress Administration Bootstrap */ -
trunk/wp-admin/press-this.php
r15365 r15834 7 7 */ 8 8 9 define('WP_SHOW_ADMIN_BAR' , false); 10 9 11 /** WordPress Administration Bootstrap */ 10 12 require_once('./admin.php'); 13 11 14 header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset')); 12 15 -
trunk/wp-admin/update.php
r14985 r15834 6 6 * @subpackage Administration 7 7 */ 8 9 define('WP_SHOW_ADMIN_BAR' , false); 8 10 9 11 /** WordPress Administration Bootstrap */ -
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 /** -
trunk/wp-includes/functions.php
r15813 r15834 4409 4409 return false; 4410 4410 } 4411 4412 /** 4413 * Prevents the admin bar from being shown for the current screen. 4414 * 4415 * This can be called immediately upon plugin load. It does not need to be called from a function hooked to the init action. 4416 * 4417 * @since 3.1.0 4418 */ 4419 function no_admin_bar() { 4420 define('WP_SHOW_ADMIN_BAR', false); 4421 }
Note: See TracChangeset
for help on using the changeset viewer.