mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Add Site Editor and PHP changes from Gutenberg 10.1 - 11.9
- First pass at adding the site editor from the Gutenberg plugin to wp-admin/site-editor.php. - Adds miscellaneous PHP changes from Gutenberg 10.1 - 11.9. Follows [52042]. See #54337. Props youknowriad, aristath, hellofromtonya, gziolo. git-svn-id: https://develop.svn.wordpress.org/trunk@52069 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -202,8 +202,24 @@ if ( ! is_multisite() && current_user_can( 'update_themes' ) ) {
|
||||
/* translators: %s: Number of available theme updates. */
|
||||
$submenu['themes.php'][5] = array( sprintf( __( 'Themes %s' ), $count ), $appearance_cap, 'themes.php' );
|
||||
|
||||
if ( wp_is_block_template_theme() ) {
|
||||
$submenu['themes.php'][6] = array(
|
||||
sprintf(
|
||||
/* translators: %s: "beta" label */
|
||||
__( 'Editor %s' ),
|
||||
'<span class="awaiting-mod">' . __( 'beta' ) . '</span>'
|
||||
),
|
||||
'edit_theme_options',
|
||||
'site-editor.php',
|
||||
);
|
||||
}
|
||||
|
||||
// Hide Customize link on block themes unless a plugin or theme is using
|
||||
// customize_register to add a setting.
|
||||
if ( ! wp_is_block_template_theme() || has_action( 'customize_register' ) ) {
|
||||
$customize_url = add_query_arg( 'return', urlencode( remove_query_arg( wp_removable_query_args(), wp_unslash( $_SERVER['REQUEST_URI'] ) ) ), 'customize.php' );
|
||||
$submenu['themes.php'][6] = array( __( 'Customize' ), 'customize', esc_url( $customize_url ), '', 'hide-if-no-customize' );
|
||||
$submenu['themes.php'][7] = array( __( 'Customize' ), 'customize', esc_url( $customize_url ), '', 'hide-if-no-customize' );
|
||||
}
|
||||
|
||||
if ( current_theme_supports( 'menus' ) || current_theme_supports( 'widgets' ) ) {
|
||||
$submenu['themes.php'][10] = array( __( 'Menus' ), 'edit_theme_options', 'nav-menus.php' );
|
||||
|
||||
Reference in New Issue
Block a user