Posted By

prwhitehead on 04/16/11


Tagged

php wordpress custom hook


Versions (?)

Wordpress: create custom wordpress hooks


 / Published in: PHP
 

Create your own wordpress hooks easily and simply. Just rename the function to whatever you like.

  1. /**
  2. * Usage: add_action('custom_hook', 'my_new_function')
  3. * Just place custom_hook(); somewhere in your theme.
  4. **/
  5.  
  6. function custom_hook(){
  7. do_action('custom_hook');
  8. }
  9.  
  10. function my_new_function(){
  11. //do something
  12. }

Report this snippet  

You need to login to post a comment.