Advertisements

is_admin_bar_showing

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

Advertisements

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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: