I setup a custom post type and everything works right. The user can submit for review and I see it’s pending in the admin area. How can I have WordPress send me an Email Notification whenever a user submits a post?
add_action( 'init', 'artwork_feature');
function artwork_feature() {
register_post_type( 'artwork',
array(
'labels' => array(
'name' => __( 'Artwork' ),
'singular_name' => __( 'Artwork' )
),
'public' => true,
'exclude_from_search' => false,
'capability_type' => 'artwork',
'supports' => array('custom-fields', 'comments'),
'capabilities' => array(
'publish_posts' => 'publish_artworks',
'edit_posts' => 'edit_artworks',
'edit_others_posts' => 'edit_others_artwork',
'delete_posts' => 'delete_artworks',
'delete_others_posts' => 'delete_others_artwork',
'read_private_posts' => 'read_private_artwork',
'edit_post' => 'edit_artwork',
'delete_post' => 'delete_artwork',
'read_post' => 'read_artwork',
),
'map_meta_cap' => true,
'has_archive' => true,
'supports' => array('title', 'editor', 'thumbnail')
)
);
}