From 7c2ae0f220f7d39aa4b3fe25633e4d57852ef2ce Mon Sep 17 00:00:00 2001 From: Utsav Patel <75293077+up1512001@users.noreply.github.com> Date: Wed, 12 Jun 2024 14:18:31 +0530 Subject: [PATCH] Change `Site Editor` to `Edit site` (#62501) Co-authored-by: up1512001 Co-authored-by: akasunil Co-authored-by: youknowriad --- lib/compat/wordpress-6.6/admin-bar.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/compat/wordpress-6.6/admin-bar.php b/lib/compat/wordpress-6.6/admin-bar.php index 8892559cd7f62a..b7a77faebea72a 100644 --- a/lib/compat/wordpress-6.6/admin-bar.php +++ b/lib/compat/wordpress-6.6/admin-bar.php @@ -25,14 +25,14 @@ function gutenberg_admin_bar_edit_site_menu( $wp_admin_bar ) { } // Don't show for users who can't edit theme options or when in the admin. - if ( ! current_user_can( 'edit_theme_options' ) || is_admin() ) { + if ( ! current_user_can( 'edit_theme_options' ) || is_admin() || ( is_blog_admin() && is_multisite() && current_user_can( 'manage_sites' ) ) ) { return; } $wp_admin_bar->add_node( array( 'id' => 'site-editor', - 'title' => __( 'Site Editor' ), + 'title' => __( 'Edit site' ), 'href' => add_query_arg( array( 'postType' => 'wp_template',