Yoast\WP\SEO\Services\Health_Check
Health_Check::get_test_identifier
Returns the identifier of health check implementation. WordPress needs this to manage the health check (https://developer.wordpress.org/reference/hooks/site_status_tests/).
Метод класса: Health_Check{}
Хуков нет.
Возвращает
string. The identifier that WordPress requires.
Использование
$Health_Check = new Health_Check(); $Health_Check->get_test_identifier();
Код Health_Check::get_test_identifier() Health Check::get test identifier Yoast 28.4
public function get_test_identifier() {
$full_class_name = static::class;
$class_name_backslash_index = \strrpos( $full_class_name, '\\' );
$class_name = $full_class_name;
if ( $class_name_backslash_index ) {
$class_name_index = ( $class_name_backslash_index + 1 );
$class_name = \substr( $full_class_name, $class_name_index );
}
$lowercase = \strtolower( $class_name );
$whitespace_as_dashes = \str_replace( '_', '-', $lowercase );
$with_prefix = self::TEST_IDENTIFIER_PREFIX . $whitespace_as_dashes;
return $with_prefix;
}