Reply To: Remove “New Announcement” Link from Menu


Home Forums Front End PM PRO Remove “New Announcement” Link from Menu Reply To: Remove “New Announcement” Link from Menu

#38430
shamim
Keymaster

Yes, your code is not returning anything if user do not have manage_options capability. Use like following

add_filter( 'fep_menu_buttons', 'fep_cus_fep_menu_buttons', 99 );

function fep_cus_fep_menu_buttons( $menu )
{
  if( ! current_user_can('manage_options') ){
    unset( $menu['new_announcement'] );
  }
  return $menu;
}