Skip to content

Instantly share code, notes, and snippets.

@danielbachhuber
Created December 27, 2010 23: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 danielbachhuber/756687 to your computer and use it in GitHub Desktop.
Save danielbachhuber/756687 to your computer and use it in GitHub Desktop.
Disable email notifications of post status changes
<?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