I have a members section on my site and they see specific custom menu items. I'm seeking a way to simply apply a star to the <li> based on it's permission level and what the user's role is.
Something to the effect of.
if( current_user_can('integrator') || current_user_can('distributor')) :
This is what I have so far and it applies a class to every menu item if the user's role is (whatever). I essentially need to apply the class if another class is present and the user's role is (whatever)...
add_filter('nav_menu_css_class' , 'my_nav_special_class' , 10 , 2);
function my_nav_special_class($classes, $item){
if (current_user_can('integrator') || current_user_can('distributor')){
$classes[] = 'PARTNER_STAR';
}
return $classes;
}
Courtesy Bainternet from this post
Any ideas would be appreciated
Update: I also want to note that I'm using "Role Scoper" to handle permissions. They do have a template function is_restricted_rs() but I'm honestly unsure how to use it currently.