$otherfile) { checkcount(); foreach ($other_files as $other_key => $otherfile) { if (basename($other_key) == 'license.txt') $found = true; } if ( !$found ) { // licence.txt not found, look in header... $css = implode(' ', $css_files); $checks = array( '((^Licence:.*Licence\sURI:)|(^Licence\sURI:.*Licence:))' => ' you must include a licence.txt or put License: and Licence URI: in style.css header.', ); foreach ($checks as $key => $check) { if ( !preg_match( '/' . $key . '/ms', $css, $matches ) ) { $this->error[] = "REQUIREDlicense.txt is missing{$check}."; $ret = false; } } } // return the pass/fail return $ret; } function getError() { return $this->error; } } $themechecks[] = new License_Checks;