Follow Post (User) Not Working
-
I am trying to subscribe the assigning editor of a post (as stored in an EditFlow custom metadata field), but can’t get the follow_post_user function to work properly. I haven’t had problems with the similar code for subscribing groups though.
Here is my code. Any suggestions would be appreciated!
function dfm_auto_subscribe_assigning_editor( $new_status, $old_status, $post ) { global $edit_flow; $dfm_upcoming_editor_id = get_post_meta($post->ID,'_ef_editorial_meta_user_editor', true); if ($dfm_upcoming_editor_id != null) { $edit_flow->notifications->follow_post_user( $post->ID, $dfm_upcoming_editor_id, true ); } // Return true to send the email notification return $new_status; } add_filter( 'ef_notification_status_change', 'dfm_auto_subscribe_assigning_editor', 10, 3 );
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Follow Post (User) Not Working’ is closed to new replies.