[wp-trac] [WordPress Trac] #55682: Allow block themes to be uploaded without index.php

WordPress Trac noreply at wordpress.org
Wed May 11 10:18:25 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 aristath):

 Replying to [comment:12 hellofromTonya]:
 > [https://github.com/WordPress/wordpress-
 develop/pull/2692/files#r869284760 as noted in the PR], 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.
 > Is this problematic?

 No, that's OK and not a problem. If the theme has a `templates/index.html`
 file, it would override the `index.php` file even if it existed.
 It's possible to have both PHP and HTML templates in the same theme, but
 HTML templates get a higher priority than PHP templates, so an `index.php`
 file doesn't make any sense when the HTML file exists 👍

Ticket URL: <https://core.trac.wordpress.org/ticket/55682#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list