Theme Check - Version 20211203

Version Description

Download this release

Release Info

Developer githubsync
Plugin Icon 128x128 Theme Check
Version 20211203
Comparing to
See all releases

Code changes from version 20210921 to 20211203

changelog.txt CHANGED
@@ -1,3 +1,6 @@
 
 
 
1
  = 20210921 =
2
  * Fix: `tc_filename()` to always return theme-relative paths when possible.
3
  * Fix: Correct the block theme adaptation check to work in WordPress.org Theme Uploader
1
+ = 20211203 =
2
+ * Update: FSE theme folders to the new proposed structure
3
+
4
  = 20210921 =
5
  * Fix: `tc_filename()` to always return theme-relative paths when possible.
6
  * Fix: Correct the block theme adaptation check to work in WordPress.org Theme Uploader
checkbase.php CHANGED
@@ -351,7 +351,7 @@ function tc_adapt_checks_for_fse_themes( $php_files, $css_files, $other_files )
351
  }
352
 
353
  // Check whether this is a FSE theme by searching for an index.html block template.
354
- if ( ! in_array( 'block-templates/index.html', $other_filenames, true ) ) {
355
  return false;
356
  }
357
 
351
  }
352
 
353
  // Check whether this is a FSE theme by searching for an index.html block template.
354
+ if ( ! in_array( 'block-templates/index.html', $other_filenames, true ) && ! in_array( 'templates/index.html', $other_filenames, true ) ) {
355
  return false;
356
  }
357
 
checks/class-fse-required-files-check.php CHANGED
@@ -37,16 +37,14 @@ class FSE_Required_Files_Check implements themecheck {
37
  array_push( $filenames, tc_filename( $php_key ) );
38
  }
39
 
40
- $musthave = array(
41
- 'block-templates/index.html',
42
- 'theme.json',
43
- );
44
-
45
- foreach ( $musthave as $file ) {
46
- if ( ! in_array( $file, $filenames ) ) {
47
- $this->error[] = sprintf( '<span class="tc-lead tc-required">' . __( 'REQUIRED', 'theme-check' ) . '</span>: ' . __( 'Could not find the file %s in the theme.', 'theme-check' ), '<strong>' . $file . '</strong>' );
48
- $ret = false;
49
- }
50
  }
51
 
52
  return $ret;
37
  array_push( $filenames, tc_filename( $php_key ) );
38
  }
39
 
40
+ if ( ! in_array( 'theme.json', $filenames ) ) {
41
+ $this->error[] = sprintf( '<span class="tc-lead tc-required">' . __( 'REQUIRED', 'theme-check' ) . '</span>: ' . __( 'Could not find the file theme.json in the theme.', 'theme-check' ), '<strong>theme.json</strong>' );
42
+ $ret = false;
43
+ }
44
+
45
+ if ( ! in_array( 'block-templates/index.html', $filenames ) && ! in_array( 'templates/index.html', $filenames ) ) {
46
+ $this->error[] = sprintf( '<span class="tc-lead tc-required">' . __( 'REQUIRED', 'theme-check' ) . '</span>: ' . __( 'Could not find the index.html template in the theme.', 'theme-check' ), '<strong>index.html</strong>' );
47
+ $ret = false;
 
 
48
  }
49
 
50
  return $ret;
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: Otto42, pross, poena, dingo-d, acosmin, joyously
3
  Requires at Least: 3.7
4
  Tested Up To: 5.8
5
  Tags: themes, guidelines, wordpress.org
6
- Stable tag: 20210921
7
 
8
  A simple and easy way to test your theme for all the latest WordPress standards and practices. A great theme development tool!
9
 
3
  Requires at Least: 3.7
4
  Tested Up To: 5.8
5
  Tags: themes, guidelines, wordpress.org
6
+ Stable tag: 20211203
7
 
8
  A simple and easy way to test your theme for all the latest WordPress standards and practices. A great theme development tool!
9
 
theme-check.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin URI: https://github.com/WordPress/theme-check/
5
  * Description: A simple and easy way to test your theme for all the latest WordPress standards and practices. A great theme development tool!
6
  * Author: Theme Review Team
7
- * Version: 20210921
8
  * Text Domain: theme-check
9
  * License: GPLv2
10
  * License URI: https://www.gnu.org/licenses/gpl-2.0.html
4
  * Plugin URI: https://github.com/WordPress/theme-check/
5
  * Description: A simple and easy way to test your theme for all the latest WordPress standards and practices. A great theme development tool!
6
  * Author: Theme Review Team
7
+ * Version: 20211203
8
  * Text Domain: theme-check
9
  * License: GPLv2
10
  * License URI: https://www.gnu.org/licenses/gpl-2.0.html