Created
July 14, 2022 10:16
-
-
Save laxmariappan/747da7ee5275f465eb00fbcb3838bd4c to your computer and use it in GitHub Desktop.
Email notification callback, hooks after publishing a post
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
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