# gutenberg/23.4.0/lib/experimental/extensible-site-editor.php

Gutenberg, version 23.4.0. 33 lines.

- Page: https://pluginprobe.com/plugins/gutenberg/23.4.0/code/lib/experimental/extensible-site-editor.php
- Raw: https://pluginprobe.com/plugins/gutenberg/23.4.0/raw/lib/experimental/extensible-site-editor.php
- Modified: 2026-02-04T14:57:28+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/gutenberg/23.4.0/code/lib/experimental/extensible-site-editor.php#L10-L20`.

```php
<?php
/**
 * Extensible Site Editor experiment integration.
 *
 * @package gutenberg
 */

/**
 * Redirect the Appearance > Design menu to the extensible site editor
 * when the experiment is enabled.
 *
 * @global array $submenu WordPress admin submenu array.
 */
function gutenberg_redirect_to_extensible_site_editor() {
	// Only proceed if the experiment is enabled.
	if ( ! gutenberg_is_experiment_enabled( 'gutenberg-extensible-site-editor' ) ) {
		return;
	}

	// Update the Design submenu item to point to the extensible site editor.
	global $submenu;
	if ( $submenu && isset( $submenu['themes.php'] ) ) {
		foreach ( $submenu['themes.php'] as $key => $item ) {
			// Find the Design/site-editor menu item and update its URL.
			if ( isset( $item[2] ) && 'site-editor.php' === $item[2] ) {
				$submenu['themes.php'][ $key ][2] = 'admin.php?page=site-editor-v2';
				break;
			}
		}
	}
}
add_action( 'admin_menu', 'gutenberg_redirect_to_extensible_site_editor', 100 );

```
