WordPress.org

Make WordPress Core

Opened 6 weeks ago

Last modified 3 weeks ago

#54272 new enhancement

Allow block themes to be activated without index.php

Reported by: poena Owned by:
Milestone: 6.0 Priority: normal
Severity: normal Version:
Component: Themes Keywords: has-patch
Focuses: template Cc:

Description

Block themes (themes built with support for full site editing) have to include an index.php file to be activated, even though the new format does not use index.php, but index.html
(inside a block-templates folder).

Block themes should not need to include this unused file in order to be activated.

If the theme does not include index.php, this message is shown:
Template is missing. Standalone themes need to have a index.php template file

Attachments (1)

54272.diff (1.7 KB) - added by sabbirshouvo 6 weeks ago.
Allow block themes without index.php if either index.php or block-templates/index.html is present in a theme folder, theme will activate without any issue. If a theme missing both, a notice will be shown as previous.

Download all attachments as: .zip

Change History (8)

@sabbirshouvo
6 weeks ago

Allow block themes without index.php if either index.php or block-templates/index.html is present in a theme folder, theme will activate without any issue. If a theme missing both, a notice will be shown as previous.

#1 @sabbirshouvo
6 weeks ago

  • Focuses template added
  • Keywords has-patch added

#2 follow-up: @manfcarlo
6 weeks ago

What are the security implications of omitting index.php?

#3 in reply to: ↑ 2 ; follow-up: @overclokk
6 weeks ago

Replying to manfcarlo:

What are the security implications of omitting index.php?

In the theme is used only for the WP "router" and also as a fallback.

This ticket was mentioned in Slack in #core-themes by poena. View the logs.


6 weeks ago

#5 in reply to: ↑ 3 @manfcarlo
6 weeks ago

Replying to overclokk:

Replying to manfcarlo:

What are the security implications of omitting index.php?

In the theme is used only for the WP "router" and also as a fallback.

No, I'm talking about using it for "silence is golden" purpose.

#6 @hellofromTonya
3 weeks ago

  • Milestone changed from 5.9 to Future Release

As of yesterday, 5.9 is now in Feature Freeze. Moving this ticket to the next release cycle. But 6.0 is not yet available for selection. Moving it to Future Release. Once 6.0 is available, please feel free to move it into that milestone.

#7 @SergeyBiryukov
3 weeks ago

  • Milestone changed from Future Release to 6.0
Note: See TracTickets for help on using tickets.