WordPress / theme-check

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

Update the full-site-editing tag check to work on WordPress.org/themes #448

Closed dd32 closed 1 year ago

dd32 commented 1 year ago

Currently the full-site-editing tag check is only working when Theme Check is run standalone, not when it's used automatically through the Theme Directory upload process.

This is because the check currently relies upon $_POST and file_exists() rather than using the files passed to the check.

This PR simply changes it from using file_exists() to using isset() - but with the additional complexity that the files passed are full paths, rather than relative, so the stylesheet directory is retrieved from WP_Theme instead.

This check may need to be extended to either a) Look at the parent theme too b) call a WP_Theme method to validate the files are present?

But this PR should make the fse error go away for block themes being uploaded.

kafleg commented 1 year ago

Looks good to me.