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 |
|---|---|
| 65 | * The hook allows a specific footer template file to be used in place of the |
| 66 | * default footer template file. If your file is called footer-new.php, |
| 67 | * you would specify the filename in the hook as get_footer( 'new' ). |
| 68 | * |
| 69 | * @since 2.1.0 |
| 70 | * @since 2.8.0 $name parameter added. |
| 71 | * |
| 72 | * @param string|null $name Name of the specific footer file to use. null for the default footer. |
| 73 | */ |
| 74 | do_action( 'get_footer', $name ); |
| 75 | |
| 76 | $templates = array(); |
| 77 | $name = (string) $name; |
| 78 | if ( '' !== $name ) { |
| 79 | $templates[] = "footer-{$name}.php"; |
| 80 | } |
| 81 | |
| 82 | $templates[] = 'footer.php'; |
| 83 | |