[wp-trac] [WordPress Trac] #55682: Allow block themes to be uploaded without index.php
WordPress Trac
noreply at wordpress.org
Sun May 15 21:21:52 UTC 2022
#55682: Allow block themes to be uploaded without index.php
-----------------------------------------------------+---------------------
Reporter: FlorianBrinkmann | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: 6.0
Component: Themes | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch has-testing-info dev-feedback | Focuses:
-----------------------------------------------------+---------------------
Comment (by costdev):
> PR 2692 changed the behavior for classic themes.
> Before this PR, a classic theme without a index.php file could not be
uploaded.
> After this PR, it can be if it has a templates/index.html file.
I agree with Ari that this isn't problematic, as it doesn't change the
behaviour of a classic theme.
Classic themes and block themes can be defined in several ways. However,
here are definitions that reflect the current behaviour of
`WP_Theme::is_block_theme()` [https://github.com/WordPress/wordpress-
develop/blob/a11fd0614d36a79321d1480cad547c763ae433f3/src/wp-includes
/class-wp-theme.php#L1484 source]:
**Block theme:**
A theme that has an `index.html` file in the `templates` or `block-
templates` directory.
**Classic theme:**
A theme that does not have an `index.html` file in the `templates` or
`block-templates` directory.
Since the theme in question has a `templates/index.html` file, it is not a
classic theme, so classic theme behaviour has not been changed.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55682#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list