You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit c80fcb0
Browse filesBrowse the repository at this point in the historyBrowse files
Themes: Record the registered blocks on the first theme.json origin build.
WP_Theme_JSON_Resolver::get_core_data(), get_block_data(), get_theme_data() and get_user_data() tested the cached object for null before calling has_same_registered_blocks(). On the first call the object is null, so the check never ran and never recorded the registered blocks. The second call ran the check, found nothing recorded, and rebuilt the origin's data.
Call has_same_registered_blocks() first, so the first build records the registered blocks and the second call reuses the data. A block type registered between calls still rebuilds it.
The test data provider case "When both caches are not empty" left the blocks cache empty and expected a rebuild; it now fills the cache and expects none.
0 commit comments