Skip to content

Commit

Permalink
Change Site Editor to Edit site (#62501)
Browse files Browse the repository at this point in the history
Co-authored-by: up1512001 <[email protected]>
Co-authored-by: akasunil <[email protected]>
Co-authored-by: youknowriad <[email protected]>
  • Loading branch information
4 people authored and ellatrix committed Jun 18, 2024
1 parent e5ed9dc commit a3e5a5c
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 a3e5a5c

Please sign in to comment.