WP_Block_Type::__isset()
Proxies checking for deprecated properties for script and style handles for backward compatibility. Checks whether the corresponding new property has the first item in the array provided.
Метод класса: WP_Block_Type{}
Хуков нет.
Возвращает
true|false
. Returns true when for the new property the first item in the array exists, or false otherwise.
Использование
$WP_Block_Type = new WP_Block_Type(); $WP_Block_Type->__isset( $name );
- $name(строка) (обязательный)
- Deprecated property name.
Список изменений
С версии 6.1.0 | Введена. |
Код WP_Block_Type::__isset() WP Block Type:: isset WP 6.6.2
public function __isset( $name ) { if ( in_array( $name, array( 'variations', 'uses_context' ), true ) ) { return true; } if ( ! in_array( $name, $this->deprecated_properties, true ) ) { return false; } $new_name = $name . '_handles'; return isset( $this->{$new_name}[0] ); }