BB Cache, BB Migrate and the theme#
BB Cache#
When a snippet changes, BB Snippets purges what it affects, judged from its rules before and after the change:
| Rules | Purged |
|---|---|
| Only URL is and Homepage | Those URLs |
| Anything broader (all pages, contains, starts/ends with, conditionals) | Everything |
| A change found by the fingerprint check (SQL, an edited theme file) | Everything |
| A SASS/LESS partial edited | The pages of every snippet whose compiled output changed |
BB Cache passes purges on to Cloudflare when its purge mirror is on. BB Cache (from the fix of 2026-11-07, after 0.3.0) no longer purges by itself when a post of a non-public type (a snippet, an ACF field group) is saved: it used to purge recursively from the home URL, which emptied the whole cache on every snippet save.
BB Cache's critical-CSS setting inlines stylesheets whose URL contains /custom-css-js; linked snippet files keep that
path. A snippet's Loading setting overrides that per snippet: BB Snippets prints data-bb-critical="inline" or
"defer" on the stylesheet, and BB Cache (from its 2026-11-08 change) inlines it whatever the list says, or never
does. On linked JavaScript, "defer" is the defer attribute.
BB Migrate#
Snippets travel as posts, matched by their key (slug). After a page-package push, the receiving site rebuilds by itself
at the end of the import request. BB Migrate's snippet regeneration step (site snippets) calls BB Snippets when it is
the active snippet plugin. Theme file snippets travel with theme file pushes. BB Migrate fires bb_migrate_file_changed for each file it writes
or deletes, and BB Snippets rebuilds when one is in a snippet folder and BB Snippets is loaded in that request. A file
push request loads only BB Migrate, so after pushing snippet files run wp bb-migrate site snippets (which rebuilds
through BB Snippets), or let the fingerprint check pick the change up within five minutes.
The mt-coalesce theme#
The theme's ?coa_snippets=residual swap matches the old plugin's markup and file paths, which BB Snippets keeps, so
it works unchanged. The bb_snippets_content filter is the cleaner route for the same job.