Hi I am working on a plugin and I need some help with the code.
I want an editor to post and then be automatically set the post to pending and then admin gets mailed and admin and can review the post.
Please help me with advice on coding. Rough idea below but I need to rewrite.
function pending_notify() {
if($current_user=='Author'){
$post=pending;
@wp_mail($admin_email, $subject, $notify_message);
}
}
add_action('save_post','pending_notify');
Can you help please?