# How WordPress decides a theme is a "block theme" > [!question] Lingering Questions > - Does WP 7.1 Beta 1 confirm `wp_is_block_theme()` as the post-editor iframe gate? Worth a follow-up read once beta ships. > [!tip] Article Ideas > - "The one-file test" — explainer content correcting the common misconception that `theme.json`, patterns, or `add_theme_support('block-templates')` determine block-theme status; useful if advising theme-author clients before WP 7.1 lands. > [!link] Cross Reference > - None strong enough to force a MOC connection — this is WordPress core-internals detail without an existing thematic home in the current MOC set. > [!quote] Vocabulary > - **`wp_is_block_theme()`** — the single public function (backed by `WP_Theme::is_block_theme()`) that determines block-theme status via a pure filesystem check, with no opt-in/opt-out declaration in `style.css`. ## Metadata - Source: [[3. Resources/Readwise/Full Document Contents/Articles/How WordPress Decides a Theme Is a Block Theme - Gutenberg Times]] - Author: Gutenberg Times ## Author's thesis (Adler Q1+Q2) The article traces `wp_is_block_theme()` down to its actual implementation: it checks only whether `templates/index.html` (or the legacy `block-templates/index.html`) exists, up the parent-theme chain — nothing about `theme.json`, patterns, or declared theme support is consulted. This matters because WordPress 7.1 may gate whether the post editor renders in an iframe on this same check, and the check has no explicit opt-in, so a single accidentally-committed file — even in a parent theme a site owner doesn't control — can silently reclassify a whole site. ## Key arguments (≤3) 1. **Block theme status is one file-existence check**, not a declared flag — `is_file()`/`is_readable()` against two candidate paths, nothing else consulted. 2. **`theme.json` and patterns don't make a theme block-based**, contrary to common assumption — real .org themes (Astra, Kadence, Blocksy, Botiga, Sydney, Hello Elementor) ship `theme.json` and still test as classic. 3. **Child themes silently inherit the parent's block-theme status**, because the file-path check falls back to the parent theme when the child ships no templates of its own. ## Claim atoms ### Block theme status is one file-existence check > [!quote] ID:rw_1 > "A theme is a 'block theme' if it ships an index.html block template, either in templates/, or in block-templates/... Nothing else is consulted." Where/why: the core of the article, following the quoted `WP_Theme::is_block_theme()` source — corrects the common assumption that `theme.json` or patterns determine block-theme status. ### theme.json presence does not make a theme block-based > [!quote] ID:rw_2 > "theme.json doesn't make you a block theme. Neither do patterns, block template parts, or add_theme_support('block-templates')." Where/why: backed by real .org themes that ship `theme.json` and still test as classic — the most common misconception to correct in block-theme explainer content. ### Child themes inherit the parent's block-theme status > [!quote] ID:rw_3 > "Child themes inherit the answer... a child theme of a block theme is a block theme even if the child ships no templates of its own." Where/why: a structural consequence of the file-path check falling back to the parent theme — ties directly to the WP 7.1 iframe-editor risk flagged in the article's conclusion. ## Permanent candidates - **Filesystem checks beat declared flags for classification stability** — when a system needs a durable, hard-to-spoof classification, checking for the artifact a feature actually requires is more reliable than trusting a declared flag that can drift out of sync with reality. See [[3. Resources/Permanent Notes/Filesystem Checks Beat Declared Flags for Classification Stability]]. ## Processing checklist - [ ] Watch for WordPress 7.1 Beta 1 confirming `wp_is_block_theme()` as the iframe-editor gate. - [ ] If advising theme-author clients, audit their theme's parent chain for an accidental `templates/index.html` before 7.1 lands. - [x] No existing MOC fits closely enough to force a connection this run. ## Links - (No MOC connection forced — see Lingering note above; revisit if a WordPress core-internals MOC is ever created.) - [[3. Resources/MOCs/WordPress Platform Design MOC]] — applies-in: Covers core internals of block theme detection; the note says no other map fits better.