Skip to content

docs: figma-patterns - Say how to register a new pattern file on Studio #4040

Open

Description

@ZaredRogers

Found in scaffold end-to-end test run 2 (10 Nov 2026, step 3d, finding P4).

Problem

After Pattern mode writes a new patterns/*.php file, WordPress keeps using its cached list of theme pattern files. studio wp cache flush and studio wp transient delete --all don't clear that cache, so the new pattern isn't registered, and a page that uses it renders nothing. Nothing in the skill says so.

Fix

In figma-to-block-theme/references/studio-operations.md (and the Pattern mode verify step), say: after adding or renaming a pattern file, run studio wp eval 'wp_get_theme()->delete_pattern_cache();', or set WP_DEVELOPMENT_MODE to theme while building. Check registration with WP_Block_Patterns_Registry::get_instance()->get_registered( '<slug>' ).

Done when

The skill's verify step registers a new pattern without guesswork.

Agent notes
  • Findings log: ~/Studio/the-safari-partners/docs/scaffold-test-2026-11-findings.md, run 2 step 3d.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Fields

Priority

Low

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions