From 0f44773739dc8355563b90a56cefee3a441f97c9 Mon Sep 17 00:00:00 2001 From: Carolina Nymark Date: Fri, 21 Feb 2025 03:51:39 +0100 Subject: [PATCH 1/3] Admin bar: Update the Edit Site link --- lib/compat/wordpress-6.8/admin-bar.php | 32 ++++++++++++++++++++++++++ lib/load.php | 1 + 2 files changed, 33 insertions(+) create mode 100644 lib/compat/wordpress-6.8/admin-bar.php diff --git a/lib/compat/wordpress-6.8/admin-bar.php b/lib/compat/wordpress-6.8/admin-bar.php new file mode 100644 index 00000000000000..8e9a6b3fe01432 --- /dev/null +++ b/lib/compat/wordpress-6.8/admin-bar.php @@ -0,0 +1,32 @@ +add_node( + array( + 'id' => 'site-editor', + 'title' => _x( 'Edit Site', 'site editor link from admin bar' ), + 'href' => admin_url( 'site-editor.php' ), + ) + ); +} + +add_action( 'admin_bar_menu', 'gutenberg_wp_admin_bar_edit_site_menu', 41 ); diff --git a/lib/load.php b/lib/load.php index 789c9f9980e9a3..0549a91c4f0157 100644 --- a/lib/load.php +++ b/lib/load.php @@ -98,6 +98,7 @@ function gutenberg_is_experiment_enabled( $name ) { require __DIR__ . '/compat/wordpress-6.7/post-formats.php'; // WordPress 6.8 compat. +require __DIR__ . '/compat/wordpress-6.8/admin-bar.php'; require __DIR__ . '/compat/wordpress-6.8/preload.php'; require __DIR__ . '/compat/wordpress-6.8/blocks.php'; require __DIR__ . '/compat/wordpress-6.8/functions.php'; From df3e98382e835abadf980e5e8edbc7207cc1a96f Mon Sep 17 00:00:00 2001 From: Carolina Nymark Date: Fri, 21 Feb 2025 04:28:20 +0100 Subject: [PATCH 2/3] change the translation function --- lib/compat/wordpress-6.8/admin-bar.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/compat/wordpress-6.8/admin-bar.php b/lib/compat/wordpress-6.8/admin-bar.php index 8e9a6b3fe01432..9fbc840d9fa084 100644 --- a/lib/compat/wordpress-6.8/admin-bar.php +++ b/lib/compat/wordpress-6.8/admin-bar.php @@ -23,7 +23,7 @@ function gutenberg_wp_admin_bar_edit_site_menu( $wp_admin_bar ) { $wp_admin_bar->add_node( array( 'id' => 'site-editor', - 'title' => _x( 'Edit Site', 'site editor link from admin bar' ), + 'title' => __( 'Edit Site' ), 'href' => admin_url( 'site-editor.php' ), ) ); From 9e2d9b10980cacdb7e8b1bb7b0661eab38af6c6f Mon Sep 17 00:00:00 2001 From: Carolina Nymark Date: Fri, 21 Feb 2025 05:12:08 +0100 Subject: [PATCH 3/3] Add changelog entry --- backport-changelog/6.8/8372.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 backport-changelog/6.8/8372.md diff --git a/backport-changelog/6.8/8372.md b/backport-changelog/6.8/8372.md new file mode 100644 index 00000000000000..ae17bf6fdc4610 --- /dev/null +++ b/backport-changelog/6.8/8372.md @@ -0,0 +1,3 @@ +https://github.com/WordPress/wordpress-develop/pull/8372 + +* https://github.com/WordPress/gutenberg/pull/69271