Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Favorites infavorites:mine
infavorites:1234
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with Search options answers only user 8

Method by which plugins and themes extend core WordPress functionality.

1
vote
Every time a post changes status, wp_transition_post_status function will be called. This triggers the actions ${old_status}_to_${new_status} and ${new_status}_${post->post_type}, so for example publi …
answered Sep 7 '10 by Jan Fabry
2
votes
The Codex has an Action Reference and a Filter Reference. Adam Brown created a hook database that has all hooks in the source code, and adds the documentation from the wiki pages, version information … and links to the source code. You can improve it by writing documentation in the Codex. Of course, some hooks are dynamic, depending on other data. Take the wp_transition_post_status function …
answered Aug 13 '10 by Jan Fabry
44
votes
The update_post_meta hooks are called from the more generic update_metadata() function, so you might not have found it directly. The three hooks are: update_post_metadata, a filter which allows you … , update_metadata() passes control to add_metadata(), which has the similar hooks add_post_metadata, add_post_meta, and added_post_meta. This happens before update[d]_post_meta gets called. So if you want to do …
answered May 10 '11 by Jan Fabry
25
votes
WordPress hooks work like Hollywood: you don't call them, they call you. But unlike Hollywood, they keep calling everyone on the list. It's normal for an action or a filter to have multiple … gets clearer (each function does only one thing) and it's easier to disable one specific piece of functionality by unhooking it. Remember that you can also play with the priorities of hooks: if you …
answered Jan 11 '11 by Jan Fabry
2
votes
The wp_transition_post_status function will be called, and this will trigger the action "${new_status}_$post->post_type", so if a product moves to the publish state, the action publish_product will be …
answered Sep 6 '10 by Jan Fabry
1
vote
The activate_plugin() function accepts three parameters, but it emits the activate_plugin action with only one parameter. This can be confusing, but hooks sometimes use the same name as the function … they come from, without passing the same parameters. One way to get the difference between a network activation and a regular activation is to monitor the update_site_option and update_option hooks. Only one of them will fire, depending on the $network_wide parameter of activate_plugin(). …
answered Feb 2 '11 by Jan Fabry
6
votes
Via the "Annotate" function the the Trac, you can see that this was added three years ago, after the request for a generic POST handler that plugins can use. Google code search tells me that at least …
answered Feb 28 '11 by Jan Fabry
3
votes
Completely skipping wp_head and wp_footer doesn't seem like a good idea, many core components and plugins depend on these hooks. Instead, you could create a light header and footer, and load them via …
answered Apr 21 '11 by Jan Fabry
8
votes
I prefer hooks, since they are more flexible: you can hook into them from your theme's functions.php file, but also from plugins. I try to put as much logic in plugins, so that the themes contain …
answered Oct 19 '10 by Jan Fabry
1
vote
The feed template files call the_guid(), which calls get_the_guid(), which has a filter named (surprisingly) get_the_guid. You can hook into this filter to change the output. The filter only gets the …
answered May 17 '11 by Jan Fabry