' . sprintf(__('Parent theme %1$s not found! You have to have parent AND child-theme installed!', 'theme-check'), '' . $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' && ! is_dir( $filename ) ) { $php[$filename] = file_get_contents( $filename ); $php[$filename] = tc_strip_comments( $php[$filename] ); } else if ( substr( $filename, -4 ) == '.css' && ! is_dir( $filename ) ) { $css[$filename] = file_get_contents( $filename ); } else { $other[$filename] = ( ! is_dir($filename) ) ? file_get_contents( $filename ) : ''; } } // run the checks $success = 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.', 'theme-check'), '' . $data['Template Version'] . '', '' . $parent_data['Title'] . '', '' . $parent_data['Version'] . '' ) . '
'; } echo '' . sprintf( __( 'This is a child theme. The parent theme is: %s. These files have been included automatically!', 'theme-check'), '' . $data[ 'Template' ] . '' ) . '
'; if ( empty( $data['Template Version'] ) ) { echo '' . __('Child theme does not have the Template Version tag in style.css.', 'theme-check') . '
'; } 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', 'theme-check'), $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', 'theme-check'), '' . $checkcount . '', '' . $data[ 'Title' ] . '', '' . $version[0] . '', '' . $version[1] . '' ) . '
'; $results = display_themechecks(); if ( !$success ) { echo 'Otto42', 'Pross' ); ?>
WordPress forums, or talk about it with the theme review team on Make WordPress Themes site.', 'theme-check' ), 'https://wordpress.org/tags/theme-check?forum_id=10', 'https://make.wordpress.org/themes/') ; ?>
GitHub.', 'theme-check' ), 'https://github.com/Otto42/theme-check'); ?>
'; echo ''; echo ''; if ( defined( 'TC_PRE' ) || defined( 'TC_POST' ) ) echo ' ' . __( 'Output in Trac format.', 'theme-check' ); echo ' ' . __( 'Suppress INFO.', 'theme-check' ); echo ''; }