Skip to content

Commit 35c0575

Browse files
authored
Fix warning when current user can't install plugins (#43)
1 parent 9ee3005 commit 35c0575

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

classes/class-plugin-install.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ public function create_menu() {
6060
}
6161

6262
public function rename_menu() {
63+
if ( ! current_user_can( 'install_plugins' ) ) {
64+
return;
65+
}
66+
6367
global $submenu;
6468
foreach ( $submenu['plugins.php'] as $key => $value ) {
6569
if ( $value[2] !== 'plugin-install.php' ) {

0 commit comments

Comments
 (0)