WP_Block_Editor_Context::__construct()publicWP 5.8.0

Constructor.

Populates optional properties for a given block editor context.

Method of the class: WP_Block_Editor_Context{}

No Hooks.

Return

null. Nothing (null).

Usage

$WP_Block_Editor_Context = new WP_Block_Editor_Context();
$WP_Block_Editor_Context->__construct( $settings );
$settings(array)
The list of optional settings to expose in a given context.
Default: array()

Changelog

Since 5.8.0 Introduced.

WP_Block_Editor_Context::__construct() code 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'];
	}
}