Code
global $current_user;
if ( user_can( $current_user, "administrator" ) ){
$calender_menu = add_menu_page( __( 'Reservations', 'dt_themes'), __( 'Calender', 'dt_themes'), 'administrator', 'dt_calender', array( $this, 'calender_menu' ), 'dashicons-clipboard', 24 );
}
else if( user_can( $current_user, "editor" ) ){
$calender_menu = add_menu_page( __( 'Reservations', 'dt_themes'), __( 'Calender', 'dt_themes'), 'editor', 'dt_calender', array( $this, 'calender_menu' ), 'dashicons-clipboard', 24 );
}
Leave A Comment?