Skip to content

@danielbachhuber /gist:4255237
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Auto-subscribe post authors to posts for XMLRPC requests
<?php
/**
* Automatically subscribe post authors to Edit Flow notifications on XML-RPC requests
*
* @see http://wordpress.org/support/topic/mobile-app-xml-rpc-auto-subscribe-not-working?replies=2
*/
function efx_auto_subscribe_post_author_xmlrpc( $post_id ) {
if ( ! function_exists( 'EditFlow' ) )
return;
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
Something went wrong with that request. Please try again.