| @@ -1,4 +1,4 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | 3 | * @version 1.0 |
| 4 | 4 | * @package Booking Calendar |
| @@ -37,22 +37,14 @@ | ||
| 37 | 37 | $is_super_admin = apply_bk_filter('multiuser_is_user_can_be_here', false, 'only_super_admin'); |
| 38 | 38 | if ( ( ($current_user->user_level < $level) && (! $is_super_admin) ) || !is_admin_bar_showing() ) return; |
| 39 | 39 | |
| 40 | 40 | |
| 41 | - $update_count = wpbc_db_get_number_new_bookings(); | |
| 41 | + $update_title = wpbc_get_svg_logo_for_html() . ' ' . 'Booking Calendar'; | |
| 42 | 42 | |
| 43 | - $title = 'Booking Calendar';//__('Booking Calendar' ,'booking'); // FixIn: 9.1.3.3. | |
| 44 | - $update_title = ''// '<img src="'.WPBC_PLUGIN_URL .'/assets/img/icon-16x16.png" style="height: 16px;vertical-align: sub;" /> ' | |
| 45 | - . $title; | |
| 46 | - | |
| 47 | - | |
| 48 | - | |
| 49 | - $is_user_activated = apply_bk_filter('multiuser_is_current_user_active', true ); // FixIn: 6.0.1.17. | |
| 50 | - if ( ( $update_count > 0) && ( $is_user_activated ) ) { | |
| 51 | - $update_count_title = " <span class='booking-count bk-update-count' style='background: #f0f0f1;color: #2c3338;display: inline;padding: 2px 5px;font-weight: 600;border-radius: 10px;'>" | |
| 52 | - . number_format_i18n($update_count) | |
| 53 | - . "</span>" ; //id='booking-count' | |
| 54 | - $update_title .= $update_count_title; | |
| 43 | + $is_user_activated = apply_bk_filter( 'multiuser_is_current_user_active', true ); // FixIn: 6.0.1.17. | |
| 44 | + $update_count = wpbc_db_get_number_new_bookings(); | |
| 45 | + if ( ( $update_count > 0 ) && ( $is_user_activated ) ) { | |
| 46 | + $update_title .= " <span class='booking-count bk-update-count' style='background: #f0f0f1;color: #2c3338;display: inline;padding: 2px 5px;font-weight: 600;border-radius: 10px;'>" . number_format_i18n( $update_count ) . '</span>'; | |
| 55 | 47 | } |
| 56 | 48 | |
| 57 | 49 | $link_bookings = wpbc_get_bookings_url(); |
| 58 | 50 | $link_res = wpbc_get_resources_url(); |
| @@ -78,9 +70,9 @@ | ||
| 78 | 70 | $wp_admin_bar->add_menu( |
| 79 | 71 | array( |
| 80 | 72 | 'id' => 'wpbc_bar_booking_listing', |
| 81 | 73 | 'title' => __( 'Booking Listing', 'booking' ), |
| 82 | - 'href' => wpbc_get_bookings_url() . '&view_mode=vm_listing', | |
| 74 | + 'href' => wpbc_get_bookings_url() . '&tab=vm_booking_listing', | |
| 83 | 75 | 'parent' => 'wpbc_bar_bookings', |
| 84 | 76 | ) |
| 85 | 77 | ); |
| 86 | 78 | $wp_admin_bar->add_menu( |
| @@ -86,9 +78,9 @@ | ||
| 86 | 78 | $wp_admin_bar->add_menu( |
| 87 | 79 | array( |
| 88 | 80 | 'id' => 'wpbc_bar_calendar_overview', |
| 89 | 81 | 'title' => __( 'Timeline View', 'booking' ), |
| 90 | - 'href' => wpbc_get_bookings_url() . '&view_mode=vm_calendar', | |
| 82 | + 'href' => wpbc_get_bookings_url() . '&tab=vm_calendar', | |
| 91 | 83 | 'parent' => 'wpbc_bar_bookings', |
| 92 | 84 | ) |
| 93 | 85 | ); |
| 94 | 86 | |
| @@ -124,18 +116,36 @@ | ||
| 124 | 116 | ); |
| 125 | 117 | $wp_admin_bar->add_menu( |
| 126 | 118 | array( |
| 127 | 119 | 'id' => 'wpbc_bar_days_availability', |
| 128 | - 'title' => __( 'Days Availability', 'booking' ), | |
| 129 | - 'href' => wpbc_get_availability_url() , | |
| 130 | - 'parent' => 'wpbc_bar_availability' | |
| 131 | - ) | |
| 132 | - ); | |
| 120 | + 'title' => __( 'Block Dates', 'booking' ), | |
| 121 | + 'href' => wpbc_get_availability_url() , | |
| 122 | + 'parent' => 'wpbc_bar_availability' | |
| 123 | + ) | |
| 124 | + ); | |
| 125 | + $wp_admin_bar->add_menu( | |
| 126 | + array( | |
| 127 | + 'id' => 'wpbc_bar_time_slots_availability', | |
| 128 | + 'title' => __( 'Block Times', 'booking' ), | |
| 129 | + 'href' => function_exists( 'wpbc_get_time_slots_availability_url' ) ? wpbc_get_time_slots_availability_url() : admin_url( 'admin.php?page=wpbc-availability&tab=time_slots_availability' ), | |
| 130 | + 'parent' => 'wpbc_bar_availability' | |
| 131 | + ) | |
| 132 | + ); | |
| 133 | + if ( wpbc_is_mu_user_can_be_here( 'only_super_admin' ) ) | |
| 134 | + $wp_admin_bar->add_menu( | |
| 135 | + array( | |
| 136 | + 'id' => 'wpbc_bar_general_availability', | |
| 137 | + 'title' => __( 'Schedule & Rules', 'booking' ), | |
| 138 | + 'href' => function_exists( 'wpbc_get_general_availability_url' ) ? wpbc_get_general_availability_url() : admin_url( 'admin.php?page=wpbc-availability&tab=general_availability' ), | |
| 139 | + 'parent' => 'wpbc_bar_availability' | |
| 140 | + ) | |
| 141 | + ); | |
| 142 | + | |
| 133 | 143 | if ( class_exists( 'wpdev_bk_biz_m' ) ){ |
| 134 | 144 | $wp_admin_bar->add_menu( |
| 135 | 145 | array( |
| 136 | 146 | 'id' => 'wpbc_bar_seasons_availability', |
| 137 | - 'title' => __( 'Season Availability', 'booking' ), | |
| 147 | + 'title' => __( 'Seasonal Availability', 'booking' ), | |
| 138 | 148 | 'href' => wpbc_get_availability_url() . '&tab=season_availability', |
| 139 | 149 | 'parent' => 'wpbc_bar_availability' |
| 140 | 150 | ) |
| 141 | 151 | ); |
| @@ -143,22 +153,13 @@ | ||
| 143 | 153 | $wp_admin_bar->add_menu( |
| 144 | 154 | array( |
| 145 | 155 | 'id' => 'wpbc_bar_seasons_filters', |
| 146 | 156 | 'title' => __( 'Seasons', 'booking' ), |
| 147 | - 'href' => wpbc_get_availability_url() . '&tab=filter', | |
| 157 | + 'href' => wpbc_get_availability_url() . '', | |
| 148 | 158 | 'parent' => 'wpbc_bar_availability' |
| 149 | 159 | ) |
| 150 | 160 | ); |
| 151 | 161 | } |
| 152 | - if ( wpbc_is_mu_user_can_be_here( 'only_super_admin' ) ) | |
| 153 | - $wp_admin_bar->add_menu( | |
| 154 | - array( | |
| 155 | - 'id' => 'wpbc_bar_general_availability', | |
| 156 | - 'title' => __( 'General Availability', 'booking' ), | |
| 157 | - 'href' => wpbc_get_settings_url() . '&scroll_to_section=wpbc_general_settings_availability_tab', | |
| 158 | - 'parent' => 'wpbc_bar_availability' | |
| 159 | - ) | |
| 160 | - ); | |
| 161 | 162 | |
| 162 | 163 | // Booking > Prices page |
| 163 | 164 | if ( class_exists( 'wpdev_bk_biz_m' ) ){ |
| 164 | 165 | |
| @@ -199,9 +200,9 @@ | ||
| 199 | 200 | $wp_admin_bar->add_menu( |
| 200 | 201 | array( |
| 201 | 202 | 'id' => 'wpbc_bar_seasons_costs', |
| 202 | 203 | 'title' => __( 'Seasons', 'booking' ), |
| 203 | - 'href' => wpbc_get_price_url() . '&tab=filter', | |
| 204 | + 'href' => wpbc_get_price_url() . '', | |
| 204 | 205 | 'parent' => 'wpbc_bar_prices' |
| 205 | 206 | ) |
| 206 | 207 | ); |
| 207 | 208 | $wp_admin_bar->add_menu( |
| @@ -278,9 +279,9 @@ | ||
| 278 | 279 | $wp_admin_bar->add_menu( |
| 279 | 280 | array( |
| 280 | 281 | 'id' => 'wpbc_bar_settings_form', |
| 281 | 282 | 'title' => __( 'Booking Form', 'booking' ), |
| 282 | - 'href' => $link_settings . '&tab=form', | |
| 283 | + 'href' => $link_settings . '&tab=builder_booking_form', | |
| 283 | 284 | 'parent' => 'wpbc_bar_settings' |
| 284 | 285 | ) |
| 285 | 286 | ); |
| 286 | 287 | $wp_admin_bar->add_menu( |