get_footer()
get_footer( string $name = null ) 加载页脚模板。Load footer te…
get_footer( string $name = null )
加载页脚模板。
Load footer template.
加载页脚模板。
Load footer template.
目录锚点:#说明#参数#返回#源码#笔记
说明(Description)
包含主题的页脚模板,或者如果指定了名称,则将包含专门的页脚。
对于参数,如果文件名为“footer”-特殊.php然后指定“特殊”。
参数(Parameters)
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| $name | (string) | 可选 | 专门页脚的名称。 |
返回(Return)
无返回值
源码(Source)
/**
* Load footer template.
*
* Includes the footer template for a theme or if a name is specified then a
* specialised footer will be included.
*
* For the parameter, if the file is called "footer-special.php" then specify
* "special".
*
* @since 1.5.0
*
* @param string $name The name of the specialised footer.
*/
function get_footer( $name = null ) {
/**
* Fires before the footer template file is loaded.
*
* The hook allows a specific footer template file to be used in place of the
* default footer template file. If your file is called footer-new.php,
* you would specify the filename in the hook as get_footer( 'new' ).
*
* @since 2.1.0
* @since 2.8.0 $name parameter added.
*
* @param string $name Name of the specific footer file to use.
*/
do_action( 'get_footer', $name );
$templates = array();
$name = (string) $name;
if ( '' !== $name )
$templates[] = "footer-{$name}.php";
$templates[] = 'footer.php';
// Backward compat code will be removed in a future release
if ('' == locate_template($templates, true))
load_template( ABSPATH . WPINC . '/theme-compat/footer.php');
}| 更新版本 | 源码位置 | 使用 | 被使用 |
|---|---|---|---|
| 1.5.0 | wp-includes/general-template.php:57 | 0 | 3 |
笔记(Notes)
多页脚
命名页脚模板
简单404页
类别:WordPress 函数手册、
本文收集自互联网,转载请注明来源。
如有侵权,请联系 wper_net@163.com 删除。




还没有任何评论,赶紧来占个楼吧!