__( 'File operations should use the WP_Filesystem methods instead of direct PHP filesystem calls', 'theme-check' ),
);
foreach ( $php_files as $php_key => $phpfile ) {
foreach ( $checks as $key => $check ) {
checkcount();
if ( preg_match_all( $key, $phpfile, $matches ) ) {
$filename = tc_filename( $php_key );
foreach ($matches[1] as $match ) {
$error = ltrim( $match, '(' );
$error = rtrim( $error, '(' );
$grep = tc_grep( $error, $php_key );
$this->error[] = sprintf(''.__('WARNING','theme-check').': '.__('%1$s was found in the file %2$s %3$s.%4$s', 'theme-check'), '' . $error. '', '' . $filename . '', $check, $grep );
$ret = false;
}
}
}
}
return $ret;
}
function getError() { return $this->error; }
}
$themechecks[] = new MalwareCheck;