GC_Block_Editor_Context
最后更新于:2021-11-25 19:45:32
GC_Block_Editor_ContextClass representing a current block editor context.
源文件
文件: gc-includes/class-gc-block-editor-context.php
final class GC_Block_Editor_Context {
/**
* Post being edited. Optional.
*
* @since 5.8.0
*
* @var GC_Post|null
*/
public $post = null;
/**
* Constructor.
*
* Populates optional properties for a given block editor context.
*
* @since 5.8.0
*
* @param array $settings The list of optional settings to expose in a given context.
*/
public function __construct( array $settings = array() ) {
if ( isset( $settings['post'] ) ) {
$this->post = $settings['post'];
}
}
}