@@ -19,32 +19,32 @@ class Redux_Embedded implements themecheck {
1919 *
2020 * @var array
2121 */
22- protected $ error = array ();
22+ protected array $ error = array ();
2323
2424 /**
2525 * Run checker.
2626 *
27- * @param array $php_files Files to check.
28- * @param array $css_files Files to check.
29- * @param array $other_files Files to check.
27+ * @param array $php_files - Files to check.
28+ * @param array $css_files - Files to check.
29+ * @param array $other_files - Files to check.
3030 *
3131 * @return bool
3232 */
33- public function check ( $ php_files , $ css_files , $ other_files ) {
33+ public function check ( $ php_files , $ css_files , $ other_files ): bool {
3434
3535 $ ret = true ;
3636 $ check = Redux_ThemeCheck::get_instance ();
3737 $ redux = $ check ::get_redux_details ( $ php_files );
3838
3939 if ( $ redux ) {
40+ checkcount ();
41+
4042 if ( ! isset ( $ _POST ['redux_wporg ' ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
41- checkcount ();
4243 $ this ->error [] = '<div class="redux-error"> ' . sprintf ( '<span class="tc-lead tc-recommended"> ' . esc_html__ ( 'RECOMMENDED ' , 'redux-framework ' ) . '</span>: ' . esc_html__ ( 'If you are submitting to WordPress.org Theme Repository, it is ' , 'redux-framework ' ) . ' <strong> ' . esc_html__ ( 'strongly ' , 'redux-framework ' ) . '</strong> ' . esc_html__ ( 'suggested that you read ' , 'redux-framework ' ) . ' <a href="%s" target="_blank"> ' . esc_html__ ( 'this document ' , 'redux-framework ' ) . '</a>, ' . esc_html__ ( 'or your theme will be rejected because of Redux. ' , 'redux-framework ' ), 'https://docsv3.redux.io/core/wordpress-org-submissions/ ' ) . '</div> ' ;
4344 $ ret = false ;
4445 } else {
4546 // TODO Granular WP.org tests!!!
4647 // Check for Tracking.
47- checkcount ();
4848 $ tracking = $ redux ['dir ' ] . 'inc/tracking.php ' ;
4949 if ( file_exists ( $ tracking ) ) {
5050 $ this ->error [] = '<div class="redux-error"> ' . sprintf ( '<span class="tc-lead tc-required"> ' . esc_html__ ( 'REQUIRED ' , 'redux-framework ' ) . '</span>: ' . esc_html__ ( 'You MUST delete ' , 'redux-framework ' ) . ' <strong> %s </strong>, ' . esc_html__ ( 'or your theme will be rejected by WP.org theme submission because of Redux. ' , 'redux-framework ' ), $ tracking ) . '</div> ' ;
@@ -54,7 +54,6 @@ public function check( $php_files, $css_files, $other_files ) {
5454 // Embedded CDN package
5555 // use_cdn
5656 // Arguments.
57- checkcount ();
5857 $ args = '<ol> ' ;
5958 $ args .= "<li><code>'save_defaults' => false</code></li> " ;
6059 $ args .= "<li><code>'use_cdn' => false</code></li> " ;
@@ -73,7 +72,7 @@ public function check( $php_files, $css_files, $other_files ) {
7372 *
7473 * @return array
7574 */
76- public function getError () {
75+ public function getError (): array {
7776 return $ this ->error ;
7877 }
7978
0 commit comments