WP_Ability::get_meta_itempublicWP 6.9.0

Retrieves a specific metadata item for the ability.

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

Хуков нет.

Возвращает

Разное. The value of the metadata item, or the default value if not found.

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

$WP_Ability = new WP_Ability();
$WP_Ability->get_meta_item( $key, $default_value );
$key(строка) (обязательный)
The metadata key to retrieve.
$default_value(разное)
The default value to return if the metadata item is not found.
По умолчанию: null

Список изменений

С версии 6.9.0 Введена.

Код WP_Ability::get_meta_item() WP 7.0.2

public function get_meta_item( string $key, $default_value = null ) {
	return array_key_exists( $key, $this->meta ) ? $this->meta[ $key ] : $default_value;
}