Definition:
function is_admin_bar_showing() {}
Determine whether the admin bar should be showing.
Return values
returns:Whether the admin bar should be showing.
Defined filters
- show_admin_bar
apply_filters( 'show_admin_bar', $show_admin_bar )
Source code
function is_admin_bar_showing() {
global $show_admin_bar, $pagenow;
// For all these types of requests, we never want an admin bar.
if ( defined('XMLRPC_REQUEST') || defined('APP_REQUEST') || defined('DOING_AJAX') || defined('IFRAME_REQUEST') )
return false;
// Integrated into the admin.
if ( is_admin() )
return true;
if ( ! isset( $show_admin_bar ) ) {
if ( ! is_user_logged_in() || 'wp-login.php' == $pagenow ) {
$show_admin_bar = false;
} else {
$show_admin_bar = _get_admin_bar_pref();
}
}
$show_admin_bar = apply_filters( 'show_admin_bar', $show_admin_bar );
return $show_admin_bar;
}
9859

February 24, 2011 


No comments yet... Be the first to leave a reply!