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

26 lines
861 B
PHP

<?php
class FaviconCheck implements themecheck {
protected $error = array();
function check( $php_files, $css_files, $other_files ) {
$ret = true;
checkcount();
foreach ( $php_files as $file_path => $file_content ) {
$filename = tc_filename( $file_path );
if ( preg_match( '/(<link rel=[\'"]icon[\'"])|(<link rel=[\'"]apple-touch-icon-precomposed[\'"])|(<meta name=[\'"]msapplication-TileImage[\'"])/', $file_content, $matches ) ) {
$this->error[] = sprintf( '<span class="tc-lead tc-info">' . __('INFO','theme-check') . '</span>: ' . __( 'Possible Favicon found in %1$s. Favicons are handled by the Site Icon setting in the customizer since version 4.3.', 'theme-check' ),
'<strong>' . $filename . '</strong>');
}
}
return $ret;
}
function getError() { return $this->error; }
}
$themechecks[] = new FaviconCheck;