theme-check
theme-check copied to clipboard
Improve child theme support
I have been looking at the code for textdomain to check that the textdomain matches the theme slug.
While doing so I realized that the theme check is checking the contents of the parent theme also when checking a child theme.
My proposal would be
- Only include the parent files when running the plugin locally but not when uploading the child theme to w.org
- Not running some checks if it is a child theme like
style_needed.phpas the styles should already be included in the parent theme.
Note that this is historically a problem. One we solved by doing the child-theme/parent-theme checks like this in the plugin, but then completely ignoring for the uploader.
The system on w.org does not actually have access to the parent when performing the check. So a child is more or less guaranteed to fail. Therefore all of theme-check is ignored when a child theme is uploaded. It still runs, it just doesn't care.
If you want to improve the plugin to work better for child themes, then by all means, go right ahead. It won't matter to w.org.
See https://sv.wordpress.org/plugins/child-theme-check/ https://github.com/Zodiac1978/tl-template-checker