From a5c6a766a38be91be3f80ad8127643137f46e2a8 Mon Sep 17 00:00:00 2001 From: Colin Stewart Date: Tue, 26 Sep 2023 16:27:58 +0000 Subject: [PATCH] Toolbar: Link to Learn WordPress in the WordPress Logo menu. This aims to make the various resources on learn.wordpress.org more easily available. Props jeherve, mikinc860, audrasjb, sabernhardt, courane01, devmuhib, dhrumilk, estelaris, hellofromTonya. Fixes #58820. git-svn-id: https://develop.svn.wordpress.org/trunk@56720 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/admin-bar.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/wp-includes/admin-bar.php b/src/wp-includes/admin-bar.php index d58e9874ed..b22a7a77c3 100644 --- a/src/wp-includes/admin-bar.php +++ b/src/wp-includes/admin-bar.php @@ -194,6 +194,16 @@ function wp_admin_bar_wp_menu( $wp_admin_bar ) { ) ); + // Add learn link. + $wp_admin_bar->add_node( + array( + 'parent' => 'wp-logo-external', + 'id' => 'learn', + 'title' => __( 'Learn WordPress' ), + 'href' => 'https://learn.wordpress.org/', + ) + ); + // Add forums link. $wp_admin_bar->add_node( array(