Title: Filter comment syncing
Last modified: March 29, 2025

---

# Filter comment syncing

 *  [shawfactor](https://wordpress.org/support/users/shawfactor/)
 * (@shawfactor)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/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.

 * ![](https://ps.w.org/enable-mastodon-apps/assets/icon-256x256.png?rev=3244261)
 * [Enable Mastodon Apps](https://wordpress.org/plugins/enable-mastodon-apps/)
 * [Support Threads](https://wordpress.org/support/plugin/enable-mastodon-apps/)
 * [Active Topics](https://wordpress.org/support/plugin/enable-mastodon-apps/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/enable-mastodon-apps/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/enable-mastodon-apps/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [shawfactor](https://wordpress.org/support/users/shawfactor/)
 * Last activity: [1 year, 2 months ago](https://wordpress.org/support/topic/filter-comment-syncing/)
 * Status: not resolved