Skip to content

Commit 70b51ba

Browse files
Only show plugin management link to authorized users
Co-authored-by: Felix Arntz <[email protected]>
1 parent a152e45 commit 70b51ba

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

plugins/performance-lab/includes/admin/plugins.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -291,8 +291,11 @@ static function ( string $error_message ): string {
291291
</div>
292292
<div class="clear"></div>
293293
</div>
294-
<p>
295-
<?php
294+
<?php
295+
if ( current_user_can( 'activate_plugins' ) ) {
296+
?>
297+
<p>
298+
<?php
296299
$plugins_url = add_query_arg(
297300
array(
298301
's' => 'WordPress Performance Team',
@@ -310,8 +313,10 @@ static function ( string $error_message ): string {
310313
'a' => array( 'href' => true ),
311314
)
312315
);
313-
?>
314-
</p>
316+
?>
317+
</p>
318+
<?php
319+
}
315320
<?php
316321
}
317322

0 commit comments

Comments
 (0)