WP_Block_Type::get_attributes()publicWP 5.0.0

Get all available block attributes including possible layout attribute from Columns block.

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

Хуков нет.

Возвращает

Массив. Array of attributes.

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

$WP_Block_Type = new WP_Block_Type();
$WP_Block_Type->get_attributes();

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

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

Код WP_Block_Type::get_attributes() WP 6.5.2

public function get_attributes() {
	return is_array( $this->attributes ) ?
		$this->attributes :
		array();
}