bugfix
This commit is contained in:
parent
ff31aff5c2
commit
a936333a97
@ -201,12 +201,16 @@ function amp_admin_sublinks( $links ) {
|
||||
} else {
|
||||
|
||||
if ( amp_have_capability( ampCap::ManagePlugins ) !== true) {
|
||||
foreach( $links['plugins'] as $link => $ar ) {
|
||||
if(!in_array($link, $amp_allowed_plugin_pages) )
|
||||
unset($links['plugins'][$link]);
|
||||
if(!empty($links['plugins'])) {
|
||||
foreach( $links['plugins'] as $link => $ar ) {
|
||||
if(!in_array($link, $amp_allowed_plugin_pages) )
|
||||
unset($links['plugins'][$link]);
|
||||
}
|
||||
}
|
||||
}
|
||||
sort($links['plugins']);
|
||||
if(!empty($links['plugins'])) {
|
||||
sort($links['plugins']);
|
||||
}
|
||||
}
|
||||
return $links;
|
||||
}
|
Loading…
Reference in New Issue
Block a user