Created
July 10, 2014 16:30
-
-
Save mikejolley/416df06fcf593c26285f to your computer and use it in GitHub Desktop.
WP Job Manager - Notify admin when a job is edited
This file contains 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
add_action( 'post_updated', 'notify_on_job_updated' ); | |
function notify_on_job_updated( $post_ID ) { | |
if ( 'job_listing' === get_post_type( $post_ID ) ) { | |
wp_mail( get_option( 'admin_email' ), 'Job Updated', sprintf( 'Job %d has been updated: %s', $post_ID, get_permalink( $post_ID ) ) ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment