Skip to content

Commit 09ec7e2

Browse files
Toolbar: Add a Plugins link to the admin bar menu.
Props colomet, Girishpanchal, afercia, danieltj, rishishah, sabernhardt, joedolson, huzaifaalmesbah, shailu25, zunaid321, devmuhib, sumitbagthariya16, yuvrajsinh2211, SergeyBiryukov. Fixes #40683. git-svn-id: https://develop.svn.wordpress.org/trunk@57188 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 144d098 commit 09ec7e2

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

src/wp-includes/admin-bar.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,18 @@ function wp_admin_bar_site_menu( $wp_admin_bar ) {
436436

437437
// Add the appearance submenu items.
438438
wp_admin_bar_appearance_menu( $wp_admin_bar );
439+
440+
// Add a Plugins link.
441+
if ( current_user_can( 'activate_plugins' ) ) {
442+
$wp_admin_bar->add_node(
443+
array(
444+
'parent' => 'site-name',
445+
'id' => 'plugins',
446+
'title' => __( 'Plugins' ),
447+
'href' => admin_url( 'plugins.php' ),
448+
)
449+
);
450+
}
439451
}
440452
}
441453

0 commit comments

Comments
 (0)