when post is published send email to admin email
function post_published_notification( $post_id, $post ) { $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( $post_id ); $edit = get_edit_post_link( $post_id, ” ); $to[] = sprintf( ‘%s <%s>’, $name, $email ); $subject = sprintf( ‘Published: %s’, $title …
when post is published send email to admin email Read More »