WP_Block_Editor_Context::__construct()publicWP 5.8.0

Constructor.

Populates optional properties for a given block editor context.

{} It's a method of the class: WP_Block_Editor_Context{}

No Hooks.

Return

null. Nothing.

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.

Code of WP_Block_Editor_Context::__construct() WP 6.0

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