bugfix
This commit is contained in:
parent
ff31aff5c2
commit
a936333a97
@ -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;
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user