Yoast\WP\SEO\Helpers\Schema

HTML_Helper::is_non_empty_string_or_stringable()privateYoast 1.0

Verifies that the received input is either a string or stringable object.

Метод класса: HTML_Helper{}

Хуков нет.

Возвращает

true|false.

Использование

// private - только в коде основоного (родительского) класса
$result = $this->is_non_empty_string_or_stringable( $html );
$html(строка) (обязательный)
The original HTML.

Код HTML_Helper::is_non_empty_string_or_stringable() Yoast 22.4

private function is_non_empty_string_or_stringable( $html ) {
	return ( \is_string( $html ) || \is_object( $html ) && \method_exists( $html, '__toString' ) ) && ! empty( $html );
}