Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //function annonce_draft_notification( $ID, $post ) {
- if ( $value == 'yes'){
- $author = $post->post_author; /* Post author ID. */
- $name = get_the_author_meta( 'display_name', $author );
- $email = get_the_author_meta( 'user_email', $author );
- $title = $post->post_title;
- $permalink = get_permalink( $ID );
- $edit = get_edit_post_link( $ID, '' );
- $to[] = sprintf( '%s <%s>', $name, $email );
- $subject = sprintf( 'Votre annonce sur King Rider:');
- $message = sprintf ('Bonjour %s,<br /> Votre annonce “%s” n'est pas validée car elle ne respecte pas les CGU.'. "nn", $name, $title );
- $headers[] = '';
- wp_mail( $to, $subject, $message, $headers );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement