Version Description
Download this release
Release Info
Developer | githubsync |
Plugin | Theme Check |
Version | 20220929 |
Comparing to | |
See all releases |
Code changes from version 20211203 to 20220929
- changelog.txt +3 -0
- checks/class-copyright-notice-check.php +2 -0
- checks/class-file-check.php +16 -0
- checks/class-theme-support-check.php +7 -7
- readme.txt +1 -1
- theme-check.php +1 -1
changelog.txt
CHANGED
@@ -1,3 +1,6 @@
|
|
|
|
|
|
|
|
1 |
= 20211203 =
|
2 |
* Update: FSE theme folders to the new proposed structure
|
3 |
|
1 |
+
= 20220929 =
|
2 |
+
* Update: Removed index.php requirements for block theme
|
3 |
+
|
4 |
= 20211203 =
|
5 |
* Update: FSE theme folders to the new proposed structure
|
6 |
|
checks/class-copyright-notice-check.php
CHANGED
@@ -16,6 +16,8 @@ class Copyright_Notice_Check implements themecheck {
|
|
16 |
*/
|
17 |
protected $error = array();
|
18 |
|
|
|
|
|
19 |
function set_context( $data ) {
|
20 |
if ( isset( $data['slug'] ) ) {
|
21 |
$this->slug = $data['slug'];
|
16 |
*/
|
17 |
protected $error = array();
|
18 |
|
19 |
+
protected $slug;
|
20 |
+
|
21 |
function set_context( $data ) {
|
22 |
if ( isset( $data['slug'] ) ) {
|
23 |
$this->slug = $data['slug'];
|
checks/class-file-check.php
CHANGED
@@ -68,6 +68,22 @@ class File_Check implements themecheck {
|
|
68 |
|
69 |
$musthave = array( 'index.php', 'style.css', 'readme.txt' );
|
70 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
checkcount();
|
72 |
|
73 |
foreach ( $blocklist as $file => $reason ) {
|
68 |
|
69 |
$musthave = array( 'index.php', 'style.css', 'readme.txt' );
|
70 |
|
71 |
+
$fse_find = array_filter(
|
72 |
+
array_keys( $other_files ),
|
73 |
+
function( $file_name ) {
|
74 |
+
if ( false !== stripos( $file_name, 'templates/index.html' ) || false !== stripos( $file_name, 'block-templates/index.html' ) ) {
|
75 |
+
return true;
|
76 |
+
}
|
77 |
+
|
78 |
+
return false;
|
79 |
+
}
|
80 |
+
);
|
81 |
+
|
82 |
+
if ( ! empty( $fse_find ) ) {
|
83 |
+
$fse_not_needed = array_search( 'index.php', $musthave );
|
84 |
+
unset( $musthave[ $fse_not_needed ] );
|
85 |
+
}
|
86 |
+
|
87 |
checkcount();
|
88 |
|
89 |
foreach ( $blocklist as $file => $reason ) {
|
checks/class-theme-support-check.php
CHANGED
@@ -28,13 +28,13 @@ class Theme_Support_Check implements themecheck {
|
|
28 |
$php = implode( ' ', $php_files );
|
29 |
|
30 |
$checks = array(
|
31 |
-
'#add_theme_support\s
|
32 |
-
'#add_theme_support\s
|
33 |
-
'#add_theme_support\s
|
34 |
-
'#add_theme_support\s
|
35 |
-
'#add_theme_support\s
|
36 |
-
'#add_theme_support\s
|
37 |
-
'#add_theme_support\s
|
38 |
);
|
39 |
|
40 |
foreach ( $checks as $key => $check ) {
|
28 |
$php = implode( ' ', $php_files );
|
29 |
|
30 |
$checks = array(
|
31 |
+
'#add_theme_support\s*\(\s*[\'|"]custom-header#' => __( 'No reference to <strong>add_theme_support( "custom-header", $args )</strong> was found in the theme. It is recommended that the theme implement this functionality if using an image for the header.', 'theme-check' ),
|
32 |
+
'#add_theme_support\s*\(\s*[\'|"]custom-background#' => __( 'No reference to <strong>add_theme_support( "custom-background", $args )</strong> was found in the theme. If the theme uses background images or solid colors for the background, then it is recommended that the theme implement this functionality.', 'theme-check' ),
|
33 |
+
'#add_theme_support\s*\(\s*[\'|"]custom-logo#' => __( 'No reference to <strong>add_theme_support( "custom-logo", $args )</strong> was found in the theme. It is recommended that the theme implement this functionality.', 'theme-check' ),
|
34 |
+
'#add_theme_support\s*\(\s*[\'|"]html5#' => __( 'No reference to <strong>add_theme_support( "html5", $args )</strong> was found in the theme. It is strongly recommended that the theme implement this functionality.', 'theme-check' ),
|
35 |
+
'#add_theme_support\s*\(\s*[\'|"]responsive-embeds#' => __( 'No reference to <strong>add_theme_support( "responsive-embeds" )</strong> was found in the theme. It is recommended that the theme implement this functionality.', 'theme-check' ),
|
36 |
+
'#add_theme_support\s*\(\s*[\'|"]align-wide#' => __( 'No reference to <strong>add_theme_support( "align-wide" )</strong> was found in the theme. It is recommended that the theme implement this functionality.', 'theme-check' ),
|
37 |
+
'#add_theme_support\s*\(\s*[\'|"]wp-block-styles#' => __( 'No reference to <strong>add_theme_support( "wp-block-styles" )</strong> was found in the theme. It is recommended that the theme implement this functionality.', 'theme-check' ),
|
38 |
);
|
39 |
|
40 |
foreach ( $checks as $key => $check ) {
|
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:
|
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: 20220929
|
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:
|
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: 20220929
|
8 |
* Text Domain: theme-check
|
9 |
* License: GPLv2
|
10 |
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
|