class WP_Admin_Bar {}

Core class used to implement the Toolbar API.

More Information

Role of WP_Admin_Bar

WP_Admin_Bar is WordPress’ class for generating the Toolbar that lines the top of WordPress sites when signed in. This class can be hooked and modified to add or remove options that appear in the admin bar.

The Toolbar replaces the Admin Bar since WordPress Version 3.3.

Usage

This class is used internally by WordPress to create an object called $wp_admin_bar. Most modifications to WordPress toolbar will generally be done by modifying the $wp_admin_bar object that is passed through the admin_bar_menu hook.

Example:

add_action( 'admin_bar_menu', 'modify_admin_bar' );

function modify_admin_bar( $wp_admin_bar ){
  // do something with $wp_admin_bar;
}

Methods

NameDescription
WP_Admin_Bar::__get
WP_Admin_Bar::_bind
WP_Admin_Bar::_get_node