-
Notifications
You must be signed in to change notification settings - Fork 112
Description
Parent Theme: https://wordpress.org/themes/primer/
Child Theme: https://wordpress.org/themes/ascension/
When running the theme check we're seeing errors saying a copyright notice could not be found for the theme.

I'm not sure why it's returning an error, as we do have a copyright notice inside of the readme.txt file and the style.css file.
https://github.com/godaddy-wordpress/primer-child-ascension/blob/develop/readme.txt#L62-L82
https://github.com/godaddy-wordpress/primer-child-ascension/blob/develop/style.css#L19
There are also copyright notices in the parent Primer theme readme.txt, and that passes the theme check without issue.
https://github.com/godaddy-wordpress/primer/blob/develop/readme.txt#L41-L64
When digging through the code it looks like the $paths var doesn't contain any paths to the child theme, but only paths to the parent theme.

Inside of the copyright-notice-check class file it looks like it's searching for a path to the child theme file, which isn't found and in turn returns a false error.
https://github.com/WordPress/theme-check/blob/master/checks/class-copyright-notice-check.php#L39-L46
// Get the contents of themeslug/filename:
foreach ( $combined_files as $path => $contents ) {
if ( stripos( $path, $this->slug . '/readme.txt' ) ||
stripos( $path, $this->slug . '/readme.md' ) ||
stripos( $path, $this->slug . '/style.css' ) ||
stripos( $path, $this->slug . '/licence.txt' ) !== false ) {
$content .= $contents;
}
}