我对PHP是相当陌生的,对我来说太简单了。因此,我在backoffice设置中有一个子菜单,我需要为特定用户授予此子菜单的例外,但我不知道如何做到这一点。这是子菜单:
private function setup() {
fm_register_submenu_page( \'app-items\', \'options-page\', \'Definições das Apps\', \'Definições das Apps\', \'edit_theme_options\' );
add_action( \'fm_submenu_app-items\', array( $this, \'submenu_apps_init\' ) );
}
public function submenu_apps_init() {
$news_push = new Fieldmanager_TextField( \'Prefixo do push das notícias\', array(
\'input_type\' => \'text\',
\'description\' => \'O prefixo escolhido será utilizado no push das notícias para a app\',
\'attributes\' => array(
\'maxlength\' => 40,
)
));
$fm = new Fieldmanager_Group( array(
\'name\' => \'app-items\',
\'children\' => array(
\'news_push\' => $news_push,
)
) );
$fm->activate_submenu_page();
}
我需要为我拥有的特定角色添加一个例外,默认情况下,该角色没有访问此子菜单的权限。