WordPress Actions And Filters Tutorials
WordPress Actions And Filters Tutorials
The complete tutorial can be found at – quick intro to actions and filters in wordpress. I add a column to the wpmu users table using filter on post columns and then add an action to handle the data for the user.
very nice…u are awesome guru! thanks
+1 , thank you
Do you know of any WordPress tools that help locate hooks?
Thanks,
@ldexterldesign I don’t know any scripts, but I think there are a few sites that list them… I just found adambrown.info/p/wp_hooks/version/3.1
you can also search the code using grep (on linux)
@unomateo thanks. Found that one already.
from the WordPress root directory (the same one as your wp-config.php):
find . -name ‘*.php’ -type f -print0 | xargs -0 grep ‘apply_filters’
This will dump out every instance of ‘apply_filters’ as it appears in your PHP code, along with the name of the file in which it appears. Replace ‘apply_filters’ with ‘do_action’ to find actions. You can do that from the console in OSX and Linux. Dunno about windows. Find/grep is a fairly ordinary Linux idiom.
You are a great teacher man!
Very clearly explained!
Isn’t it much better when tutorials have no background music?
Just good explanation and clear view of the code! Perfect!
Thanks!