diff --git a/Herbert/Framework/Panel.php b/Herbert/Framework/Panel.php index d7102df..c23d43b 100644 --- a/Herbert/Framework/Panel.php +++ b/Herbert/Framework/Panel.php @@ -206,7 +206,7 @@ protected function addPanel($panel) add_menu_page( $panel['title'], $panel['title'], - 'manage_options', + isset($panel['capability']) && $panel['capability'] ? $panel['capability'] : 'manage_options', $panel['slug'], $this->makeCallable($panel), isset($panel['icon']) ? $this->fetchIcon($panel['icon']) : '', @@ -246,7 +246,7 @@ protected function addSubPanel($panel) $panel['parent'], $panel['title'], $panel['title'], - 'manage_options', + isset($panel['capability']) && $panel['capability'] ? $panel['capability'] : 'manage_options', $panel['slug'], isset($panel['rename']) && $panel['rename'] ? null : $this->makeCallable($panel) );