clanbite_social_kit_replace_interactivity_feed_posts_atomically( array $posts ): voidReplace posts in the Interactivity store without recursive merging.
Core merges wp_interactivity_state() with array_replace_recursive(). When more than one social-feed block (or other code) merges posts for clanbite-social/feed, list indices are merged into hybrid rows (wrong id, empty author fields), which breaks SSR and hydration. This writes the snapshot list atomically on the internal store so each block’s payload wins outright.
Important: clanbite_social_kit_apply_social_feed_snapshot_to_store() must not pass posts into wp_interactivity_state() — only into this function — or merges will corrupt rows again.
Parameters
$posts(array<int, array<string, mixed>>) RequiredPost payloads (same shape as REST
postsitems).
Returns
void
Defined in inc/social-feed-interactivity-state.php