tzvij

Class example of action function 1

Nov 20th, 2013
254
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.28 KB | None | 0 0
  1. class emailer {
  2.   function send($post_ID)  {
  3.     mail($users,"sally's blog updated",'I just put something on my blog: http://blog.example.com');
  4.     return $post_ID;
  5.   }
  6. }
  7.  
  8. add_action('publish_post', array('emailer', 'send'));
Advertisement
Add Comment
Please, Sign In to add comment