Skip to content

Commit

Permalink
Toolbar: Add a Plugins link to the admin bar menu.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
SergeyBiryukov committed Dec 13, 2023
1 parent 144d098 commit 09ec7e2
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/wp-includes/admin-bar.php
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,18 @@ function wp_admin_bar_site_menu( $wp_admin_bar ) {

// Add the appearance submenu items.
wp_admin_bar_appearance_menu( $wp_admin_bar );

// Add a Plugins link.
if ( current_user_can( 'activate_plugins' ) ) {
$wp_admin_bar->add_node(
array(
'parent' => 'site-name',
'id' => 'plugins',
'title' => __( 'Plugins' ),
'href' => admin_url( 'plugins.php' ),
)
);
}
}
}

Expand Down

0 comments on commit 09ec7e2

Please sign in to comment.