-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2280462
commit 6b1207b
Showing
2 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
lib/compat/wordpress-6.0/edit-site-routes-backwards-compat.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters