WP_Block_Editor_Context::__construct() – Constructor.

You appear to be a bot. Output may be restricted

Description

Constructor.

Populates optional properties for a given block editor context.

Usage

WP_Block_Editor_Context::__construct( $settings );

Parameters

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

Returns

void

Source

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

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

 View on GitHub View on Trac