-
Notifications
You must be signed in to change notification settings - Fork 1
atmosphere_should_sync_reply
github-actions[bot] edited this page Jun 15, 2026
·
9 revisions
Filters whether a reply should be synced as a WordPress comment.
Fires after the reply's target post and parent comment have been resolved, immediately before any work that depends on the reply being kept (author profile resolution, comment row insert, comment-meta writes). Return false to skip the insert.
Use case: consumers publishing multi-record threads from their
own DID may want to skip the round-tripped self-replies that
Reaction_Sync would otherwise ingest as comments. The filter
is intentionally policy-free upstream so consumers can express
whatever discriminator fits their publishing strategy.
/**
* Filters whether a reply should be synced as a WordPress comment.
*
* Fires after the reply's target post and parent comment have been
* resolved, immediately before any work that depends on the reply
* being kept (author profile resolution, comment row insert,
* comment-meta writes). Return false to skip the insert.
*
* Use case: consumers publishing multi-record threads from their
* own DID may want to skip the round-tripped self-replies that
* `Reaction_Sync` would otherwise ingest as comments. The filter
* is intentionally policy-free upstream so consumers can express
* whatever discriminator fits their publishing strategy.
*
* @param bool $should
* @param array $notification
* @param int $post_id
* @param int $comment_parent
* @return bool The filtered value.
*/
function my_atmosphere_should_sync_reply_callback( bool $should, array $notification, int $post_id, int $comment_parent ) {
// Your code here.
return $should;
}
add_filter( 'atmosphere_should_sync_reply', 'my_atmosphere_should_sync_reply_callback', 10, 4 );-
bool$shouldWhether to sync this reply. Default true. -
array$notificationNotification or synthesized own-record. -
int$post_idResolved local WP post the reply targets. -
int$comment_parentResolved local parent comment ID, 0 if top-level.
\apply_filters(
'atmosphere_should_sync_reply',
true,
$notification,
$post_id,
$comment_parent
)