wp_before_admin_bar_render
Fires before the admin bar is rendered.
Description
Parameters (1)
- 0. $array (callback) =>
array( $this, 'add_to_menubar' )
- The array.
Usage
- To run the hook, copy the example below.
- // run the action
- do_action( 'wp_before_admin_bar_render', $array );
- The following example is for adding a hook callback.
- // define the wp_before_admin_bar_render callback
- function action_wp_before_admin_bar_render( $array ) {
- // make action magic happen here...
- };
- // add the action
- add_action( 'wp_before_admin_bar_render', 'action_wp_before_admin_bar_render', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the action
- remove_action( 'wp_before_admin_bar_render', 'action_wp_before_admin_bar_render', 10, 1 );
Defined (3)
The action is defined in the following location(s).
- /class.jetpack-network.php
- add_action( 'wp_before_admin_bar_render', array( $this, 'add_to_menubar' ) );
- add_action( 'wp_before_admin_bar_render', array( $this, 'add_to_menubar' ) );
- /modules/masterbar/masterbar.php
- add_action( 'wp_before_admin_bar_render', array( $this, 'replace_core_masterbar' ), 99999 );