Created
April 20, 2015 17:37
-
-
Save mikejolley/15c5c28c9950b3801f01 to your computer and use it in GitHub Desktop.
Notify Admin on Resume Edit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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