Determine whether the admin bar should be showing.
Signature
is_admin_bar_showing()
Return
(boolean) Whether the admin bar should be showing.
Source
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('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;
}
WP Trac GitHub Bitbucket
Link here
-
URL
http://queryposts.com/function/is_admin_bar_showing/ -
HTML
<a href='http://queryposts.com/function/is_admin_bar_showing/'>is_admin_bar_showing()</a> -
Markdown
[is_admin_bar_showing()](http://queryposts.com/function/is_admin_bar_showing/) -
BBCode
[url=http://queryposts.com/function/is_admin_bar_showing/]is_admin_bar_showing()[/url]