Created
February 23, 2016 18:43
-
-
Save alandbh/9fefab27f3fa9f06415b to your computer and use it in GitHub Desktop.
Altera as capacidades de um role user
Change user role capabilities
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ---------------- | |
Dá ao perfil "Editor" a permissão de editar o Menu em Aparência > Menus | |
Alan | |
----------------- */ | |
// pega o objeto "Role" do tipo "Editor" que é o caso do usuário "MMA" | |
$role_object = get_role( 'editor' ); | |
// Adiciona a capacidade de "Editar a aparência" a esse objeto | |
$role_object->add_cap( 'edit_theme_options' ); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment