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.
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
andfile_exists()
rather than using the files passed to the check.This PR simply changes it from using
file_exists()
to usingisset()
- but with the additional complexity that the files passed are full paths, rather than relative, so the stylesheet directory is retrieved fromWP_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.