get_header хук-событиеWP 2.1.0

Fires before the header template file is loaded.

Использование

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(строка|null)
Name of the specific header file to use. Null for the default header.
$args(массив)
Additional arguments passed to the header template.

Список изменений

С версии 2.1.0 Введена.
С версии 2.8.0 The $name parameter was added.
С версии 5.5.0 The $args parameter was added.

Где вызывается хук

get_header()
get_header
wp-includes/general-template.php 38
do_action( 'get_header', $name, $args );

Где используется хук в WordPress

Использование не найдено.