Yoast\WP\SEO\Abilities\Infrastructure

Post_Identifier_Resolver::has │ private │ Yoast 1.0

Checks whether a non-empty identifier of the given key is present in the input.

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

Хуков нет.

Возвращает

bool. Whether the identifier is present and non-empty.

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

// private - только в коде основоного (родительского) класса
$result = $this->has( $input, $key ): bool;
$input(array<string, int|строка|true|false|null>) (обязательный)
The input.
$key(строка) (обязательный)
The identifier key.

Код Post_Identifier_Resolver::has() Yoast 28.9

private function has( array $input, string $key ): bool {
	return ( isset( $input[ $key ] ) && $input[ $key ] !== '' );
}