Adding new roles to Plugin
-
Hello, I really like your plugin but sadly I have been stuck.
Can you please clarify the adding of a custom Type?
I tried to add the roles from “wpjobster_user_type” to your plugin by changing $wp_roles to it but it only broke the plugin.
Where do I add this variable in the code below?
Thanks a lot
/*
* Add custom roles to Nav Menu Roles menu list
* param: $roles an array of all available roles, by default is global $wp_roles
* return: array
*/
function kia_new_roles( $roles ){
$roles[‘new-role-key’] = ‘new-role’;
return $roles;
}
add_filter( ‘nav_menu_roles’, ‘kia_new_roles’ );
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Adding new roles to Plugin’ is closed to new replies.