Created
December 27, 2010 23:16
-
-
Save danielbachhuber/756687 to your computer and use it in GitHub Desktop.
Disable email notifications of post status changes
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
<?php | |
// Handy method to remove the hook for email notifications of custom post status changes | |
function ef_remove_post_status_notifications() { | |
global $edit_flow; | |
// Edit Flow originally hooks into 'transition_post_status' to know when to send custom post status notifications | |
remove_action( 'transition_post_status', array( &$edit_flow->notifications, 'notification_status_change' ), 10, 3 ); | |
} | |
// Hook this action into init so Edit Flow is already loaded | |
add_action( 'init', 'ef_remove_post_status_notifications' ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment