Pregnancy: How to enable the calendar menu for editor role

When you have added a user with editor role, by default it does not display the calendar menu in the editor panel.

Get into the file path /wp-content/plugins/designthemes-pregnancy-addon/reservation/dt-calender-menu.php and add the below 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?

The reCAPTCHA verification period has expired. Please reload the page.

This site uses Akismet to reduce spam. Learn how your comment data is processed.