Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Auto-subscribe post authors to posts for XMLRPC requests
* Automatically subscribe post authors to Edit Flow notifications on XML-RPC requests
* @see
function efx_auto_subscribe_post_author_xmlrpc( $post_id ) {
if ( ! function_exists( 'EditFlow' ) )
EditFlow()->notifications->follow_post_user( $post_id, get_post( $post_id )->post_author, true );
if ( defined( 'XMLRPC_REQUEST' ) && XMLRPC_REQUEST )
add_action( 'wp_insert_post', 'efx_auto_subscribe_post_author_xmlrpc' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment