Filter comment syncing
-
Currently this plugins sycs all new comments as posts into the main posts table. Like so
public function register_hooks() {
add_action( ‘init’, array( $this, ‘register_custom_post_type’ ) );
add_action( ‘wp_insert_comment’, array( get_called_class(), ‘create_comment_post’ ), 10, 2 );
add_action( ‘delete_comment’, array( $this, ‘delete_comment_post’ ) );
add_action( ‘delete_post’, array( $this, ‘delete_post’ ) );
add_action( ‘transition_comment_status’, array( $this, ‘update_comment_post_status’ ), 10, 3 );
add_action( ‘edit_comment’, array( $this, ‘update_comment_post’ ), 10, 2 );
add_filter( ‘mastodon_api_get_posts_query_args’, array( $this, ‘api_get_posts_query_args’ ) );
add_filter( ‘mastodon_api_status’, array( $this, ‘api_status’ ), 9, 3 );
add_filter( ‘mastodon_api_account’, array( $this, ‘api_account’ ), 10, 4 );
add_filter( ‘mastodon_api_in_reply_to_id’, array( $this, ‘mastodon_api_in_reply_to_id’ ), 15 );
add_filter( ‘mastodon_api_notification_type’, array( $this, ‘mastodon_api_notification_type’ ), 10, 2 );
add_filter( ‘mastodon_api_get_notifications_query_args’, array( $this, ‘mastodon_api_notification_type’ ), 10, 2 );
}Unfortunately I have a custom comment type that I use for logging various events. It makes no sense for for that to be synced across and as such I was wondering if you could refactor you code to switch this syncing off via a filter?
This is probably a reasonably comment use case going forward
The topic ‘Filter comment syncing’ is closed to new replies.