I'm new to wordpress plugin development, I read the whole documentation this afternoon http://codex.wordpress.org/Plugin_API/Filter_Reference, I tried to write some code, like this in plugin file:
add_filter('the_title', 'my_own_function', 10, 2);
Function is:
function my_own_function($title, $post_id){
return $title. $post_id;
}
This plugin really worked, but the documentation doesn't tell the filter API the_title has two arguments, and what those arguments are. That's the problem! If it doesn't tell, how would I know?
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).
So, my question is: How can I find a full explanation of filter API such as the_title? Please help.