| Server IP : 89.46.110.62 / Your IP : 216.73.217.34 Web Server : Apache System : Linux hlpi1ws-c315s01.ad.aruba.it 6.8.0-138-generic #138-Ubuntu SMP PREEMPT_DYNAMIC Fri Jul 31 22:41:49 UTC 2026 x86_64 User : ID18854181 ( 18854181) PHP Version : 8.4.28 Disable Function : popen,exec,passthru,pcntl_exec,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,show_source,shell_exec,system,posix_getpwuid,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /web/htdocs/website/home/wp-includes/ |
Upload File : |
<?php
/**
* Blocks API: WP_Block_Editor_Context class
*
* @package WordPress
* @since 5.8.0
*/
/**
* Contains information about a block editor being rendered.
*
* @since 5.8.0
*/
#[AllowDynamicProperties]
final class WP_Block_Editor_Context {
/**
* String that identifies the block editor being rendered. Can be one of:
*
* - `'core/edit-post'` - The post editor at `/wp-admin/edit.php`.
* - `'core/edit-widgets'` - The widgets editor at `/wp-admin/widgets.php`.
* - `'core/customize-widgets'` - The widgets editor at `/wp-admin/customize.php`.
* - `'core/edit-site'` - The site editor at `/wp-admin/site-editor.php`.
*
* Defaults to 'core/edit-post'.
*
* @since 6.0.0
*
* @var string
*/
public $name = 'core/edit-post';
/**
* The post being edited by the block editor. Optional.
*
* @since 5.8.0
*
* @var WP_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['name'] ) ) {
$this->name = $settings['name'];
}
if ( isset( $settings['post'] ) ) {
$this->post = $settings['post'];
}
}
}