' . sprintf(__('Parent theme %1$s not found! You have to have parent AND child-theme installed!', 'themecheck'), $data[ 'Template' ] ) . ''; return; } $parent_data = tc_get_theme_data( $parent . '/style.css' ); $themename = basename( $parent ); $files = array_merge( listdir( $parent ), $files ); } if ( $files ) { foreach( $files as $key => $filename ) { if ( substr( $filename, -4 ) == '.php' ) { $php[$filename] = php_strip_whitespace( $filename ); } else if ( substr( $filename, -4 ) == '.css' ) { $css[$filename] = file_get_contents( $filename ); } else { $other[$filename] = ( ! is_dir($filename) ) ? file_get_contents( $filename ) : ''; } } // run the checks $failed = !run_themechecks($php, $css, $other); global $checkcount; // second loop, to display the errors echo '
';
echo '' . $data[ 'Title' ] . '
' : ''; echo ( !empty( $data[ 'Version' ] ) ) ? '' . $data[ 'Version' ] . '
' : ''; echo ( !empty( $data[ 'AuthorName' ] ) ) ? '' . $data[ 'AuthorName' ] . '
' : ''; echo ( !empty( $data[ 'AuthorURI' ] ) ) ? '' . $data[ 'AuthorURI' ] . '' . '
' : ''; echo ( !empty( $data[ 'URI' ] ) ) ? '' : ''; echo ( !empty( $data[ 'License' ] ) ) ? '' . $data[ 'License' ] . '
' : ''; echo ( !empty( $data[ 'License URI' ] ) ) ? '' . $data[ 'License URI' ] . '
' : ''; echo ( !empty( $data[ 'Tags' ] ) ) ? '' . implode( $data[ 'Tags' ], ', ') . '
' : ''; echo ( !empty( $data[ 'Description' ] ) ) ? '' . $data[ 'Description' ] . '
' : ''; if ( $data[ 'Template' ] ) { if ( $data['Template Version'] > $parent_data['Version'] ) { echo '' . sprintf(__('This child theme requires at least version %1$s of theme %2$s to be installed. You only have %3$s please update the parent theme.', 'themecheck'), $data['Template Version'], $parent_data['Title'], $parent_data['Version'] ) . '
'; } echo '' . sprintf(__( 'This is a child theme. The parent theme is: %1$s. These files have been included automatically!', 'themecheck'), $data[ 'Template' ] ) . '
'; if ( empty( $data['Template Version'] ) ) { echo '' . __('Child theme does not have the Template Version tag in style.css.', 'themecheck') . '
'; } else { echo ( $data['Template Version'] < $parent_data['Version'] ) ? '' . sprintf(__('Child theme is only tested up to version %1$s of %2$s breakage may occur! %3$s installed version is %4$s', 'themecheck'), $data['Template Version'], $parent_data['Title'], $parent_data['Title'], $parent_data['Version'] ) . '
' : ''; } } echo '' . sprintf(__(' Running %1$s tests against %2$s using Guidelines Version: %3$s Plugin revision: %4$s', 'themecheck'), $checkcount, $data[ 'Title' ], $version[0], $version[1] ) . '
'; $results = display_themechecks(); $success = true; if (strpos( $results, 'WARNING') !== false) $success = false; if (strpos( $results, 'REQUIRED') !== false) $success = false; if ( $success === false ) { echo 'The theme check plugin is an easy way to test your theme and make sure it\'s up to spec with the latest theme review standards.
', 'themecheck' );
_e( 'With it, you can run all the same automated testing tools on your theme that WordPress.org uses for theme submissions.
Theme-Check is maintained by Pross and Otto42
', 'themecheck' );
_e( 'If you have found a bug or would like to make a suggestion or contribution why not join the theme-reviewers mailing list
', 'themecheck' );
_e( 'or leave a post on the WordPress forums.
The WordPress Theme Review Team
', 'themecheck' ); } function tc_success() { _e( 'Now your theme has passed the basic tests you need to check it properly using the test data before you upload to the WordPress Themes Directory.
', 'themecheck' ); echo ''; _e( 'Make sure to review the guidelines at Theme Review before uploading a Theme.
', 'themecheck' ); _e( '