add_filter('job_bm_dashboard_tabs', 'job_bm_dashboard_tabs'); function job_bm_dashboard_tabs($tabs){ $tabs['custom'] =array( 'title'=>__('Custom', 'job-board-manager'), ); return $tabs; }
add_action( 'job_bm_dashboard_tabs_content_custom', 'job_bm_dashboard_tabs_content_custom_29072019', 5 ); if ( ! function_exists( 'job_bm_dashboard_tabs_content_custom_29072019' ) ) { function job_bm_dashboard_tabs_content_custom_29072019(){ ?> <pre>Content custom tabs</pre> <?php } }
Remove existing tabs based on user roles.
add_filter('job_bm_dashboard_tabs', 'job_bm_dashboard_tabs'); function job_bm_dashboard_tabs($tabs){ $current_user = wp_get_current_user(); if(in_array('job_seeker', $current_user->roles)){ unset($tabs['applications']); unset($tabs['my_jobs']); } return $tabs; }