Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
fullofcaffeine committed Jul 22, 2022
1 parent 2280462 commit 6b1207b
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
31 changes: 31 additions & 0 deletions lib/compat/wordpress-6.0/edit-site-routes-backwards-compat.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php

/**
* Site editor's Menu.
*
* Adds a new wp-admin menu item for the Site editor.
*
* @since 9.4.0
*/
function gutenberg_site_editor_menu() {
if ( wp_is_block_theme() ) {
add_theme_page(
__( 'Editor (beta)', 'gutenberg' ),
sprintf(
/* translators: %s: "beta" label. */
__( 'Editor %s', 'gutenberg' ),
'<span class="awaiting-mod">' . __( 'beta', 'gutenberg' ) . '</span>'
),
'edit_theme_options',
'gutenberg-edit-site',
'gutenberg_edit_site_page'
);
}
}
add_action( 'admin_menu', 'gutenberg_site_editor_menu', 9 );

function gutenberg_redirect_deprecated_to_new_site_editor_page() {
wp_safe_redirect( 'site-editor.php' );
}

add_action( 'load-appearance_page_gutenberg-edit-site', 'gutenberg_redirect_deprecated_to_new_site_editor_page' );
1 change: 1 addition & 0 deletions lib/load.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ function gutenberg_is_experiment_enabled( $name ) {
require __DIR__ . '/compat/wordpress-6.0/edit-form-blocks.php';
require __DIR__ . '/compat/wordpress-6.0/block-patterns-update.php';
require __DIR__ . '/compat/wordpress-6.0/client-assets.php';
require __DIR__ . '/compat/wordpress-6.0/edit-site-routes-backwards-compat.php';

// WordPress 6.1 compat.
require __DIR__ . '/compat/wordpress-6.1/blocks.php';
Expand Down

0 comments on commit 6b1207b

Please sign in to comment.