Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




is_admin_bar_showing [ WordPress Function ]

is_admin_bar_showing ( No parameters )
Returns:
  • (bool) Whether the admin bar should be showing.
Defined at:



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

Meer ...

Gebruikersdiscussies [ wordpress.org ]

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics