Skip to content

Commit

Permalink
Change Site Editor to Edit site (WordPress#62501)
Browse files Browse the repository at this point in the history
Co-authored-by: up1512001 <up1512001@git.wordpress.org>
Co-authored-by: akasunil <sunil25393@git.wordpress.org>
Co-authored-by: youknowriad <youknowriad@git.wordpress.org>
  • Loading branch information
4 people authored and patil-vipul committed Jun 17, 2024
1 parent afd5ba9 commit 7c2ae0f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/compat/wordpress-6.6/admin-bar.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 7c2ae0f

Please sign in to comment.