WP_Admin_Bar::get_node( string $id )
Gets a node.
Description Description
Parameters Parameters
- $id
-
(string) (Required)
Return Return
(object|void) Node.
Source Source
File: wp-includes/class-wp-admin-bar.php
final public function get_node( $id ) {
$node = $this->_get_node( $id );
if ( $node ) {
return clone $node;
}
}
Expand full source code Collapse full source code View on Trac
User Contributed Notes User Contributed Notes
You must log in before being able to contribute a note or feedback.
Remove the Toolbar “Updates” Item if it Exists
Put this in your theme’s functions.php file.
/** * Removes the "Updates" link from the Toolbar. * * @param WP_Admin_Bar $wp_admin_bar Toolbar instance. */ function wpdocs_check_updates_node( $wp_admin_bar ) { $updates_node = $wp_admin_bar->get_node( 'updates' ); // Check if the 'updates' node exists if( $updates_node ) { $wp_admin_bar->remove_node( 'updates' ); } } add_action( 'admin_bar_menu', 'wpdocs_check_updates_node', 999 );Expand full source codeCollapse full source code