如何查找 <?php wp_head(); 渲染的 HTML;?> 在 WordPress 中?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/24454624/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to find HTML rendered by <?php wp_head(); ?> in WordPress?
提问by Mujassir Nasir
I have done a lot of search on it, most of the people are saying
我查了很多,大部分人都说
wp_head() is located in wp-includes/general-template.php
wp_head() 位于 wp-includes/general-template.php
wp_head is in default-filter.php in wp-includes
wp_head 位于 wp-includes 中的 default-filter.php
But I want to know where the html/php file placed in file directory that is rendered by wp_head(), so I can edit that file. Thanks
但是我想知道 html/php 文件放置在 wp_head() 呈现的文件目录中的哪个位置,以便我可以编辑该文件。谢谢
采纳答案by henrywright
The wp_head()
function simply calls all functions hooked to the wp_head
action. Various functions will be hooked to this action, they may reside in the WordPress core, or perhaps in plugins you may be using, or even in your theme's functions.php file.
该wp_head()
函数只是调用所有挂钩到该wp_head
操作的函数。各种函数将与此操作挂钩,它们可能驻留在 WordPress 核心中,或者可能在您可能使用的插件中,甚至在您主题的 functions.php 文件中。
To my knowledge, there isn't a specific wp_head template 'file' that you can edit.
据我所知,没有可以编辑的特定 wp_head 模板“文件”。
Ref:
参考:
回答by Thorene
Following https://codex.wordpress.org/Function_Reference/wp_head
按照https://codex.wordpress.org/Function_Reference/wp_head
wp_head() is located in wp-includes/general-template.php.
wp_head() 位于 wp-includes/general-template.php。
If you want edit something, execute a Control+MAJ+F (Find in folder) in wp-includes and it gives you the file where the specific content should be edited.
如果您想编辑某些内容,请在 wp-includes 中执行 Control+MAJ+F(在文件夹中查找),它会为您提供应编辑特定内容的文件。
回答by SHASHANK SHEKHAR
wp_head()
is located in wp-includes/general-template.php
.
wp_head()
位于wp-includes/general-template.php
.