WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
Line | Code |
---|---|
28 | * The hook allows a specific header template file to be used in place of the |
29 | * default header template file. If your file is called header-new.php, |
30 | * you would specify the filename in the hook as get_header( 'new' ). |
31 | * |
32 | * @since 2.1.0 |
33 | * @since 2.8.0 $name parameter added. |
34 | * |
35 | * @param string $name Name of the specific header file to use. |
36 | */ |
37 | do_action( 'get_header', $name ); |
38 |
|
39 | $templates = array(); |
40 | $name = (string) $name; |
41 | if ( '' !== $name ) |
42 | $templates[] = "header-{$name}.php"; |
43 |
|
44 | $templates[] = 'header.php'; |
45 |
|
46 | // Backward compat code will be removed in a future release |