Files
Testing/tbb/wp-content/plugins/theme-check/checks/style_suggested.php
sean 0e8a8b3028
Some checks failed
deploy-testing / deploy (push) Has been cancelled
Initial testing snapshot
2026-11-17 16:15:01 -05:00

29 lines
829 B
PHP

<?php
class Style_Suggested implements themecheck {
protected $error = array();
function check( $php_files, $css_files, $other_files ) {
// combine all the css files into one string to make it easier to search
$css = implode( ' ', $css_files );
checkcount();
$ret = true;
$checks = array(
'[ \t\/*#]*Theme URI:' => 'Theme URI:',
'[ \t\/*#]*Author URI:' => 'Author URI:',
);
foreach ($checks as $key => $check) {
if ( !preg_match( '/' . $key . '/i', $css, $matches ) ) {
$this->error[] = sprintf('<span class="tc-lead tc-recommended">'.__('RECOMMENDED','theme-check').'</span>: '.__('%s is missing from your style.css header.', 'theme-check'), '<strong>' . $check . '</strong>' );
}
}
return $ret;
}
function getError() { return $this->error; }
}
$themechecks[] = new Style_Suggested;