_wp_admin_bar_init [ WordPress Functions ]
_wp_admin_bar_init ( No parameters )
| Access: |
|
| Returns: |
|
| Defined at: |
|
| Codex |
Similar Functions: wp_admin_bar_render, wp_admin_bar_edit_menu, wp_admin_bar_site_menu, wp_admin_bar_wp_menu, wp_admin_bar_header
Instantiate the admin bar object and set it up as a global for access elsewhere.
UNHOOKING THIS FUNCTION WILL NOT PROPERLY REMOVE THE ADMIN BAR. For that, use show_admin_bar(false) or the 'show_admin_bar' filter.
Source
function _wp_admin_bar_init() {
global $wp_admin_bar;
if ( ! is_admin_bar_showing() )
return false;
/* Load the admin bar class code ready for instantiation */
require( ABSPATH . WPINC . '/class-wp-admin-bar.php' );
/* Instantiate the admin bar */
$admin_bar_class = apply_filters( 'wp_admin_bar_class', 'WP_Admin_Bar' );
if ( class_exists( $admin_bar_class ) )
$wp_admin_bar = new $admin_bar_class;
else
return false;
$wp_admin_bar->initialize();
$wp_admin_bar->add_menus();
return true;
}Examples [ wp-snippets.com ]
Top Google Search Results
- _wp_admin_bar_init (WordPress Function) - WPSeek.com
Instantiate the admin bar object and set it up as a global for access elsewhere. WordPress lookup for _wp_admin_bar_init, a WordPress Function.
wpseek.com - Disable Admin Bar in WordPress 3.3 | Wptuts+
Dec 18, 2011 ... remove_action('init','_wp_admin_bar_init');. http://bevisible.dk Dannie. Wow, Thank Shibu! Plugin is working great :) Perfect for code-noobs like ...
wp.tutsplus.com - Removing admin bar from wordpress dashboard - WordPress Answers
Feb 2, 2012 ... I think the function is _wp_admin_bar_init , with _ . ... @bueltge admin-bar.php:39 add_action( 'init', '_wp_admin_bar_init' ); // Don't remove.
wordpress.stackexchange.com - PHPXRef 0.7 : WordPress : /wp-includes/admin-bar.php source
17 */ 18 function _wp_admin_bar_init() { 19 global $wp_admin_bar; 20 21 if ( ! is_admin_bar_showing() ) 22 return false; 23 24 /* Load the admin bar class code ...
phpxref.ftwr.co.uk
