WP_Block_Editor_Context::__construct() WordPress Method

The wordpress context constructor sets up the global wordpress context. It takes two parameters: the wordpress version and the wordpress locale. The wordpress context constructor sets up the global wordpress context. It takes two parameters: the wordpress version and the wordpress locale. The wordpress context constructor sets up the global wordpress context. It takes two parameters: the wordpress version and the wordpress locale. The wordpress context constructor sets up the global wordpress context. It takes two parameters: the wordpress version and the wordpress locale.

WP_Block_Editor_Context::__construct( array $settings = array() ) #

Constructor.


Description

Populates optional properties for a given block editor context.


Top ↑

Parameters

$settings

(array)(Optional)The list of optional settings to expose in a given context.

Default value: array()


Top ↑

Source

File: wp-includes/class-wp-block-editor-context.php

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


Top ↑

Changelog

Changelog
VersionDescription
5.8.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.