On the old support site, I asked you about adding a custom link on the instructor menu bar. You provided the following code:
add_action( 'bp_setup_nav', 'create_lesson_setup_nav');
function create_lesson_setup_nav(){
global $bp;
$check =0;
if(bp_is_my_profile() && current_user_can('edit_posts'))
$check =1;
bp_core_new_nav_item( array(
'name' => __('Lesson Planner', 'Vibe' ),
'slug' => 'lesson-planner',
'position' => 100,
'screen_function' => 'wplms_create_lesson_planner_redirect',
'show_for_displayed_user' => $check
) );
}
function wplms_create_lesson_planner_redirect(){
wp_redirect('http://scholars.thehistorytutor.com/lesson-planner','301');
exit;
}
And that code worked great at creating the desired tab. However, it shows for both students and instructors. I am also using the plugin, User Role Editor, to ensure that the check for 'edit_posts' is not a capability of students. Please advise.</div>