From ad6f1df33d06ebc577c61af5cc8a953798e73da3 Mon Sep 17 00:00:00 2001 From: Carolina Nymark Date: Thu, 12 Mar 2026 07:15:14 +0100 Subject: [PATCH 1/2] Update class-directories-check.php Fix a bug where excluded directories were not detected because only the filename was checked, not the full path. Add __MACOSX to the list of excluded directories. Update error message. --- checks/class-directories-check.php | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/checks/class-directories-check.php b/checks/class-directories-check.php index 2a847b86..602e0dfa 100644 --- a/checks/class-directories-check.php +++ b/checks/class-directories-check.php @@ -1,14 +1,15 @@ error[] = sprintf( '%s: %s', __( 'REQUIRED', 'theme-check' ), - __( 'Please remove any extraneous directories like .git or .svn from the ZIP file before uploading it.', 'theme-check' ) + __( 'Please remove any extraneous directories like .git, .svn or __MACOSX from the ZIP file before uploading it.', 'theme-check' ) ); - $ret = false; + $ret = false; + break; } } From 33bdee98bb6542ec6a0828fb37af84356ef2cc77 Mon Sep 17 00:00:00 2001 From: Carolina Nymark Date: Thu, 12 Mar 2026 07:30:05 +0100 Subject: [PATCH 2/2] Update class-directories-check.php --- checks/class-directories-check.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/checks/class-directories-check.php b/checks/class-directories-check.php index 602e0dfa..06819c4e 100644 --- a/checks/class-directories-check.php +++ b/checks/class-directories-check.php @@ -55,7 +55,7 @@ public function check( $php_files, $css_files, $other_files ) { __( 'REQUIRED', 'theme-check' ), __( 'Please remove any extraneous directories like .git, .svn or __MACOSX from the ZIP file before uploading it.', 'theme-check' ) ); - $ret = false; + $ret = false; break; } }