Im fairly new to PHP so bare with me. So i have a sub menu in the backoffice settings and i need to grant an exception for this sub menu for specific users, but i have no ideia how to do that. This is the sub menu:
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();
}
I need to add an exception for a specific role i have, that by default doesn't have the privileges to access this submenus.