This commit is contained in:
Mario Voigt 2023-04-12 02:02:18 +02:00
parent ff31aff5c2
commit a936333a97

View File

@ -201,12 +201,16 @@ function amp_admin_sublinks( $links ) {
} else { } else {
if ( amp_have_capability( ampCap::ManagePlugins ) !== true) { if ( amp_have_capability( ampCap::ManagePlugins ) !== true) {
foreach( $links['plugins'] as $link => $ar ) { if(!empty($links['plugins'])) {
if(!in_array($link, $amp_allowed_plugin_pages) ) foreach( $links['plugins'] as $link => $ar ) {
unset($links['plugins'][$link]); if(!in_array($link, $amp_allowed_plugin_pages) )
unset($links['plugins'][$link]);
}
} }
} }
sort($links['plugins']); if(!empty($links['plugins'])) {
sort($links['plugins']);
}
} }
return $links; return $links;
} }