Contents

Synced patterns

A synced pattern is a block reused in many posts. While someone edits the pattern itself, anyone using it in a post sees a notice that it is being changed.

How it works #

A synced pattern noticePerson B edits a synced pattern, which writes editor-B in the pattern's room. Person A has a post open that uses the pattern; A's editor reads the pattern's room over REST on each Heartbeat tick and shows a notice naming B.Person A, editing a postwp_presencePerson B, editing the patternPerson A, editing a postwp_presencePerson B, editing the pattern"B is editing this pattern"Write editor-B in postType/wp_block:7Read postType/wp_block:7 over REST, each tickeditor-B

Source: synced-patterns.php ยท index.js

Check your understanding #

Who sees the notice that a synced pattern is being edited?

Only someone who can edit the pattern, since reading its room requires edit_post on it.

Edit this page on GitHub