加载页脚模板。
原型
get_footer( string $name = null )
描述
包含主题的页脚模板,或者如果指定了名称,则将包含专用页脚。
参数
$name
(string)
(Optional)
专业页脚的名称。
源文件
路径:wp-includes/general-template.php
<?php
...
function get_footer( $name = null ) {
/**
* Fires before the footer template file is loaded.
*
* @since 2.1.0
* @since 2.8.0 $name parameter added.
*
* @param string|null $name Name of the specific footer file to use. null for the default footer.
*/
do_action( 'get_footer', $name );
$templates = array();
$name = (string) $name;
if ( '' !== $name ) {
$templates[] = "footer-{$name}.php";
}
$templates[] = 'footer.php';
locate_template( $templates, true );
}
...
?>
其他
英文文档:https://developer.wordpress.org/reference/functions/get_footer/