Skip to content

Instantly share code, notes, and snippets.

@mikejolley
Created April 20, 2015 17:37
Show Gist options
  • Save mikejolley/15c5c28c9950b3801f01 to your computer and use it in GitHub Desktop.
Save mikejolley/15c5c28c9950b3801f01 to your computer and use it in GitHub Desktop.
Notify Admin on Resume Edit
<?php
add_action( 'post_updated', 'notify_admin_on_resume_edit' );
function notify_admin_on_resume_edit( $id ) {
if ( 'resume' === get_post_type( $id ) && ! current_user_can( 'manage_options' ) ) {
wp_mail( get_option( 'admin_email' ), 'Resume Edited', 'Resume ' . $id . ' has been edited' );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment