WP_Block_Editor_Context::__construct()publicWP 5.8.0

Constructor.

Populates optional properties for a given block editor context.

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

Хуков нет.

Возвращает

null. Ничего (null).

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

$WP_Block_Editor_Context = new WP_Block_Editor_Context();
$WP_Block_Editor_Context->__construct( $settings );
$settings(массив)
The list of optional settings to expose in a given context.
По умолчанию: array()

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

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

Код WP_Block_Editor_Context::__construct() WP 6.5.2

public function __construct( array $settings = array() ) {
	if ( isset( $settings['name'] ) ) {
		$this->name = $settings['name'];
	}
	if ( isset( $settings['post'] ) ) {
		$this->post = $settings['post'];
	}
}