我是wordpress插件开发新手,今天下午我阅读了整个文档http://codex.wordpress.org/Plugin_API/Filter_Reference, 我尝试编写一些代码,如插件文件中的以下代码:
add_filter(\'the_title\', \'my_own_function\', 10, 2);
Function is:
function my_own_function($title, $post_id){
return $title. $post_id;
}
这个插件确实有效,但文档没有告诉过滤器APIthe_title
有两个参数,以及这些参数是什么。这就是问题所在!如果它不告诉我,我怎么知道?Here I just quote the official documentation relevant excerpt:
the_title
applied to the post title retrieved from the database, prior to printing on the screen (also used in some other operations, such as trackbacks).
所以,我的question is: 如何找到过滤器API的完整解释,例如the_title
? 请帮忙。