wp_before_admin_bar_render
Action HookDescription
Fires before the admin bar is rendered.Hook Information
File Location |
wp-includes/admin-bar.php
View on GitHub
|
Hook Type | Action |
Line Number | 104 |
Hook Parameters
This hook doesn't accept any parameters.
Usage Examples
Basic Usage
<?php
// Hook into wp_before_admin_bar_render
add_action('wp_before_admin_bar_render', 'my_custom_function');
function my_custom_function() {
// Your custom code here
}
Source Code Context
wp-includes/admin-bar.php:104
- How this hook is used in WordPress core
<?php
99 /**
100 * Fires before the admin bar is rendered.
101 *
102 * @since 3.1.0
103 */
104 do_action( 'wp_before_admin_bar_render' );
105
106 $wp_admin_bar->render();
107
108 /**
109 * Fires after the admin bar is rendered.
PHP Documentation
<?php
/**
* Fires before the admin bar is rendered.
*
* @since 3.1.0
*/
Quick Info
- Hook Type: Action
- Parameters: 0
- File: wp-includes/admin-bar.php
Related Hooks
Related hooks will be displayed here in future updates.