is_admin_bar_showing [ WordPress Function ]
is_admin_bar_showing ( No parameters )
| Returns: |
|
| Defined at: |
|
Soorgelijke functies: _wp_admin_bar_init, wp_admin_bar_shortlink_menu, wp_admin_bar_site_menu, show_admin_bar, wp_admin_bar_wp_menu
Determine whether the admin bar should be showing.
Source
<?php
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;
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- Function Reference/is admin bar showing « WordPress Codex
Examples. <?php if ( is_admin_bar_showing() ) { // do something } ?> ... Source File. is_admin_bar_showing() is located in wp-includes/admin-bar.php .
codex.wordpress.org - is_admin_bar_showing | A HitchHackers guide through WordPress
Feb 24, 2011 ... function is_admin_bar_showing() { global $show_admin_bar, $pagenow; /* For all these types of request we never want an admin bar period ...
hitchhackerguide.com - is_admin_bar_showing - Function Reference - PHP Cross ...
Jun 1, 2011 ... Function and Method Cross Reference. is_admin_bar_showing(). Defined at: /wp -includes/admin-bar.php -> line 345. Referenced 4 times: ...
xref.yoast.com - Fade away and hide the WordPress 3.1 Admin Bar | | soderlind.no
Feb 25, 2011 ... The plugin is availeable in the WordPress Plugin Directory. Changelog: 1.0.1 – Thanks to @TheFrosty, added is_admin_bar_showing(); 1.0.0 ...
soderlind.no