Ticket #14772: enabled_check_in_functions.php.diff
File enabled_check_in_functions.php.diff, 1.1 KB (added by , 13 years ago) |
---|
-
admin-bar.php
11 11 function wp_admin_bar_init() { 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 ) ) 14 if ( !show_admin_bar() ) 20 15 return false; 21 16 22 17 /* Set the protocol constant used throughout this code */ -
functions.php
4414 4414 function no_admin_bar() { 4415 4415 define('WP_SHOW_ADMIN_BAR', false); 4416 4416 } 4417 4418 /** 4419 * Checks if the admin bar has been enabled 4420 * 4421 * @since 3.1.0 4422 */ 4423 function show_admin_bar() { 4424 $show_it=true; 4425 4426 if ( defined('WP_SHOW_ADMIN_BAR') ) 4427 $show_it = (bool) WP_SHOW_ADMIN_BAR; 4428 4429 if ( ! apply_filters( 'show_admin_bar', $show_it ) ) 4430 return false; 4431 4432 return true; 4433 }