该函数并无实际功能,紧张是埋下了一个钩子。与该钩子挂钩的函数决定了WordPress主题底部运行的代码,可以是输出HTML也可以是引入js等资源。
源码function wp_footer() { / Prints scripts or data before the closing body tag on the front end. @since 1.5.1 / do_action( 'wp_footer' );}
列子
一个WordPress底部公共模板文件 footer.php 如下:
<?php wp_footer(); ?></body></html>

更多WordPress函数解析、例子点击下方链接查看更多!