get_header
Fires before the header template file is loaded.
Usage
add_action( 'get_header', 'wp_kama_get_header_action', 10, 2 ); /** * Function for `get_header` action-hook. * * @param string|null $name Name of the specific header file to use. Null for the default header. * @param array $args Additional arguments passed to the header template. * * @return void */ function wp_kama_get_header_action( $name, $args ){ // action... }
- $name(string|null)
- Name of the specific header file to use. Null for the default header.
- $args(array)
- Additional arguments passed to the header template.
Changelog
Since 2.1.0 | Introduced. |
Since 2.8.0 | The $name parameter was added. |
Since 5.5.0 | The $args parameter was added. |
Where the hook is called
get_header
wp-includes/general-template.php 38
do_action( 'get_header', $name, $args );