Advertisement
Guest User

Untitled

a guest
Nov 26th, 2014
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. //function annonce_draft_notification( $ID, $post ) {
  2. if ( $value == 'yes'){
  3. $author = $post->post_author; /* Post author ID. */
  4. $name = get_the_author_meta( 'display_name', $author );
  5. $email = get_the_author_meta( 'user_email', $author );
  6. $title = $post->post_title;
  7. $permalink = get_permalink( $ID );
  8. $edit = get_edit_post_link( $ID, '' );
  9. $to[] = sprintf( '%s <%s>', $name, $email );
  10. $subject = sprintf( 'Votre annonce sur King Rider:');
  11. $message = sprintf ('Bonjour %s,<br /> Votre annonce “%s” n'est pas validée car elle ne respecte pas les CGU.'. "nn", $name, $title );
  12. $headers[] = '';
  13. wp_mail( $to, $subject, $message, $headers );
  14. }
  15.  
  16.  
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement