| Server IP : 66.29.153.156 / Your IP : 216.73.216.104 Web Server : LiteSpeed System : Linux premium322.web-hosting.com 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64 User : lastyfjz ( 1521) PHP Version : 8.1.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/lastyfjz/dermalaserclinic.co.uk/wp-content/themes/theme-check/checks/ |
Upload File : |
<?php
/**
* Checks that gravatars are supported in comments.
*
* @package Theme Check
*/
/**
* Checks that gravatars are supported in comments.
*/
class Gravatar_Check implements themecheck {
/**
* Error messages, warnings and info notices.
*
* @var array $error
*/
protected $error = array();
/**
* Check that return true for good/okay/acceptable, false for bad/not-okay/unacceptable.
*
* @param array $php_files File paths and content for PHP files.
* @param array $css_files File paths and content for CSS files.
* @param array $other_files Folder names, file paths and content for other files.
*/
public function check( $php_files, $css_files, $other_files ) {
$php = implode( ' ', $php_files );
checkcount();
if (
strpos( $php, 'get_avatar' ) === false &&
strpos( $php, 'wp_list_comments' ) === false
) {
$this->error[] = sprintf(
'<span class="tc-lead tc-recommended">%s</span>: %s',
__( 'RECOMMENDED', 'theme-check' ),
__( "This theme doesn't seem to support the standard avatar functions. Use <strong>get_avatar</strong> or <strong>wp_list_comments</strong> to add this support.", 'theme-check' )
);
}
return true;
}
/**
* Get error messages from the checks.
*
* @return array Error message.
*/
public function getError() {
return $this->error;
}
}
$themechecks[] = new Gravatar_Check();