WordPress / theme-check

Theme Check plugin
https://wordpress.org/plugins/theme-check/
333 stars 108 forks source link

Update check for index.php #424

Closed jffng closed 2 years ago

jffng commented 2 years ago

Addresses #422. This PR updates the theme check to check for both index.php or templates/index.html, since WordPress themes are no longer required to have a index.php file: https://core.trac.wordpress.org/changeset/52940

(Started this PR at WCEU Contributor Day, I haven't had a chance to test this yet!)

carolinan commented 2 years ago

Out of the two pull requests for this issue, I prefer this solution, but we also need to check for block-templates/index.html.

acosmin commented 2 years ago

@carolinan this one can't possibly work, it will return true if you have index.php in any of the theme folders and the $filenames does not include the templates path/folder, it will just return index.html.

carolinan commented 2 years ago

Got it, that makes perfect sense.