Skip to content

Instantly share code, notes, and snippets.

@laxmariappan
Created July 14, 2022 10:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save laxmariappan/747da7ee5275f465eb00fbcb3838bd4c to your computer and use it in GitHub Desktop.
Save laxmariappan/747da7ee5275f465eb00fbcb3838bd4c to your computer and use it in GitHub Desktop.
Email notification callback, hooks after publishing a post
function email_notification_response_cb( $post_id, $post ) {
if ( did_action( 'publish_post' ) === 1 ) {
set_notification_status( $post_id, $post );
}
}
add_action( 'publish_post', 'email_notification_response_cb', 20, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment