is_admin_bar_showing()
Determine whether the admin bar should be showing.
For more information on this and similar theme functions, check out the Conditional Tags article in the Theme Developer Handbook.
Uses: _get_admin_bar_pref()
Hooks from the function
Return
true|false
. Whether the admin bar should be showing.
Usage
is_admin_bar_showing();
Examples
#1 Check if there is an admin bar and do something
if( is_admin_bar_showing() ) { // code if there is a panel } else { // code if there is no panel }
Notes
- Global. true|false. $show_admin_bar
- Global. String. $pagenow The filename of the current screen.
Changelog
Since 3.1.0 | Introduced. |