Support » Plugin: Nav Menu Roles » Remove delete roles from role choices

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author HelgaTheViking

    (@helgatheviking)

    Are you sure you have deleted the roles properly? You can see in the source:

    $display_roles = apply_filters( 'nav_menu_roles', $wp_roles->role_names, $item );

    that the roles are simply pulled from the global $wp_roles. They aren’t cached in any way so NMR will automatically detect changes to the global roles.

    Thread Starter Squrrell

    (@squrrell)

    Right! That was the issue, the Roles weren’t being removed. I used the following code in my functions file to remove them:

    $wp_roles = new WP_Roles();
    $wp_roles->remove_role("role_name_goes_here");

    Plugin picked up the changes immediately and continues to work brilliantly, thanks!

    Plugin Author HelgaTheViking

    (@helgatheviking)

    Great, glad that you found the solution

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Remove delete roles from role choices’ is closed to new replies.