Advertisement
tzvij

Class example of action function 1

Nov 20th, 2013
237
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.     $users = 'bob@example.org,susie@example.org';
  4.     mail($users,"sally's blog updated",'I just put something on my blog: http://blog.example.com');
  5.     return $post_ID;
  6.   }
  7. }
  8.  
  9. add_action('publish_post', array('emailer', 'send'));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement