PluginProbe
Booking Calendar / 11.8.2
Booking Calendar v11.8.2
11.8.2 11.8.1 11.8 11.7 11.6.1 11.6 11.5 11.4.3 11.4.2 11.4.1 11.4 11.3 11.2.1 11.2 11.1 11.0 10.15.7 10.15.6 10.1.3 10.10 10.10.1 10.10.2 10.11 10.11.2 10.11.3 All 202 releases
← All changes | core/wpbc-css.php +171 -175 10.1011.8.2 View file →
@@ -9,180 +9,174 @@
9 9 *
10 10 * @modified 2013.10.16
11 11 */
12 12
13 -class WPBC_CSS extends WPBC_JS_CSS{
13 +if ( ! defined( 'ABSPATH' ) ) {
14 + exit; // Exit if accessed directly.
15 +}
14 16
15 - public function define() {
16 -
17 - $this->setType('css');
18 -
19 - /*
20 - // Exmaples of usage Font Avesome: http://fontawesome.io/icons/
21 -
22 - $this->add( array(
23 - 'handle' => 'font-awesome',
24 - 'src' => WPBC_PLUGIN_URL . 'assets/libs/font-awesome-4.3.0/css/font-awesome.css' ,
25 - 'deps' => false,
26 - 'version' => '4.3.0',
27 - 'where_to_load' => array( 'admin' ),
28 - 'condition' => false
29 - ) );
30 -
31 - // Exmaples of usage Font Avesome 3.2.1 (benefits of this version - support IE7): http://fontawesome.io/3.2.1/examples/
32 - $this->add( array(
33 - 'handle' => 'font-awesome',
34 - 'src' => WPBC_PLUGIN_URL . '/assets/libs/font-awesome/css/font-awesome.css' ,
35 - 'deps' => false,
36 - 'version' => '3.2.1',
37 - 'where_to_load' => array( 'admin' ),
38 - 'condition' => false
39 - ) );
40 - $this->add( array(
41 - 'handle' => 'font-awesome-ie7',
42 - 'src' => WPBC_PLUGIN_URL . '/assets/libs/font-awesome/css/font-awesome-ie7.css' ,
43 - 'deps' => array('font-awesome'),
44 - 'version' => '3.2.1',
45 - 'where_to_load' => array( 'admin' ),
46 - 'condition' => 'IE 7' // CSS condition. Exmaple: <!--[if IE 7]>
47 - ) );
48 - */
49 - }
17 +class WPBC_CSS extends WPBC_JS_CSS {
50 18
19 + public function define() {
51 20
21 + $this->setType( 'css' );
22 +
23 + /**
24 + * // Exmaples of usage Font Avesome: http://fontawesome.io/icons/
25 + *
26 + * $this->add( array(
27 + * 'handle' => 'font-awesome',
28 + * 'src' => WPBC_PLUGIN_URL . 'assets/libs/font-awesome-4.3.0/css/font-awesome.css' ,
29 + * 'deps' => false,
30 + * 'version' => '4.3.0',
31 + * 'where_to_load' => array( 'admin' ),
32 + * 'condition' => false
33 + * ) );
34 + *
35 + * // Exmaples of usage Font Avesome 3.2.1 (benefits of this version - support IE7): http://fontawesome.io/3.2.1/examples/
36 + * $this->add( array(
37 + * 'handle' => 'font-awesome',
38 + * 'src' => WPBC_PLUGIN_URL . '/assets/libs/font-awesome/css/font-awesome.css' ,
39 + * 'deps' => false,
40 + * 'version' => '3.2.1',
41 + * 'where_to_load' => array( 'admin' ),
42 + * 'condition' => false
43 + * ) );
44 + * $this->add( array(
45 + * 'handle' => 'font-awesome-ie7',
46 + * 'src' => WPBC_PLUGIN_URL . '/assets/libs/font-awesome/css/font-awesome-ie7.css' ,
47 + * 'deps' => array('font-awesome'),
48 + * 'version' => '3.2.1',
49 + * 'where_to_load' => array( 'admin' ),
50 + * 'condition' => 'IE 7' // CSS condition. Exmaple: <!--[if IE 7]>
51 + * ) );
52 + */
53 + }
54 +
55 +
52 56 public function enqueue( $where_to_load ) {
53 - //FixIn: 9.8.1
54 - wp_enqueue_style( 'wpdevelop-bts', wpbc_plugin_url( '/assets/libs/bootstrap-css/css/bootstrap.css' ), array(), WP_BK_VERSION_NUM ); //FixIn: 9.0.1.1.1
55 - wp_enqueue_style( 'wpdevelop-bts-theme', wpbc_plugin_url( '/assets/libs/bootstrap-css/css/bootstrap-theme.css' ), array(), WP_BK_VERSION_NUM ); //FixIn: 9.0.1.1.1
56 - wp_enqueue_style( 'wpbc-tippy-popover', wpbc_plugin_url( '/assets/libs/tippy.js/themes/wpbc-tippy-popover.css' ), array(), WP_BK_VERSION_NUM ); // FixIn: 9.0.1.1.
57 - wp_enqueue_style( 'wpbc-tippy-times', wpbc_plugin_url( '/assets/libs/tippy.js/themes/wpbc-tippy-times.css' ), array(), WP_BK_VERSION_NUM ); // FixIn: 9.0.1.1.
58 - wp_enqueue_style( 'wpbc-material-design-icons', wpbc_plugin_url( '/assets/libs/material-design-icons/material-design-icons.css' ), array(), WP_BK_VERSION_NUM ); //FixIn: 9.2.1.4 // FixIn: 9.0.1.1.
59 - wp_enqueue_style( 'wpbc-ui-both', wpbc_plugin_url( '/css/wpbc_ui_both.css' ), array(), WP_BK_VERSION_NUM ); // FixIn: 10.0.0.25.
60 57
61 - if ( $where_to_load == 'admin' ) { // Admin CSS files
62 - wp_enqueue_style( 'wpbc-bootstrap-icons', wpbc_plugin_url( '/assets/libs/bootstrap-icons/bootstrap-icons.css' ), array(), WP_BK_VERSION_NUM ); // FixIn: 9.0.1.1.
63 - // Several concataned css files.
64 - wp_enqueue_style( 'wpbc-all-admin', wpbc_plugin_url( '/_dist/all/_out/wpbc_all_admin.min.css' ), array(), WP_BK_VERSION_NUM);
58 + wp_enqueue_style( 'wpdevelop-bts', wpbc_plugin_url( '/vendors/_custom/bootstrap-css/css/bootstrap.css' ), array(), WP_BK_VERSION_NUM ); // FixIn: 9.0.1.1.1.
59 + wp_enqueue_style( 'wpdevelop-bts-theme', wpbc_plugin_url( '/vendors/_custom/bootstrap-css/css/bootstrap-theme.css' ), array(), WP_BK_VERSION_NUM );
60 + wp_enqueue_style( 'wpbc-tippy-popover', wpbc_plugin_url( '/vendors/_custom/tippy.js/themes/wpbc-tippy-popover.css' ), array(), WP_BK_VERSION_NUM );
61 + wp_enqueue_style( 'wpbc-tippy-times', wpbc_plugin_url( '/vendors/_custom/tippy.js/themes/wpbc-tippy-times.css' ), array(), WP_BK_VERSION_NUM );
62 + wp_enqueue_style( 'wpbc-material-design-icons', wpbc_plugin_url( '/vendors/_custom/material-design-icons/material-design-icons.css' ), array(), WP_BK_VERSION_NUM ); // FixIn: 9.2.1.4.
63 + wp_enqueue_style( 'wpbc-ui-both', wpbc_plugin_url( '/css/wpbc_ui_both.css' ), array(), WP_BK_VERSION_NUM ); // FixIn: 10.0.0.25.
65 64
66 - wp_enqueue_style( 'wpbc-chosen', wpbc_plugin_url( '/assets/libs/chosen/chosen.css' ), array(), WP_BK_VERSION_NUM);
67 - wp_enqueue_style( 'wpbc-admin-support', wpbc_plugin_url( '/core/any/css/admin-support.css' ), array(), WP_BK_VERSION_NUM);
65 + if ( 'admin' === $where_to_load ) { // Admin CSS files.
66 + wp_enqueue_style( 'wpbc-bootstrap-icons', wpbc_plugin_url( '/vendors/_custom/bootstrap-icons/bootstrap-icons.css' ), array(), WP_BK_VERSION_NUM ); // FixIn: 9.0.1.1.
67 + wp_enqueue_style( 'wpbc-all-admin', wpbc_plugin_url( '/_dist/all/_out/wpbc_all_admin.min.css' ), array(), WP_BK_VERSION_NUM ); // Several concataned css files.
68 + wp_enqueue_style( 'wpbc-admin-support', wpbc_plugin_url( '/core/any/css/admin-support.css' ), array(), WP_BK_VERSION_NUM);
68 69 wp_enqueue_style( 'wpbc-admin-menu', wpbc_plugin_url( '/core/any/css/admin-menu.css' ), array(), WP_BK_VERSION_NUM);
69 70 wp_enqueue_style( 'wpbc-admin-toolbar', wpbc_plugin_url( '/core/any/css/admin-toolbar.css' ), array(), WP_BK_VERSION_NUM);
70 - wp_enqueue_style( 'wpbc-settings-page', wpbc_plugin_url( '/core/any/css/settings-page.css' ), array(), WP_BK_VERSION_NUM);
71 - wp_enqueue_style( 'wpbc-admin-listing-table', wpbc_plugin_url( '/core/any/css/admin-listing-table.css' ), array(), WP_BK_VERSION_NUM);
72 - wp_enqueue_style( 'wpbc-br-table', wpbc_plugin_url( '/core/any/css/admin-br-table.css' ), array(), WP_BK_VERSION_NUM);
73 - wp_enqueue_style( 'wpbc-flex-table', wpbc_plugin_url( '/core/any/css/wpbc_flextable.css' ), array(), WP_BK_VERSION_NUM); // Flex: Booking resources Table // FixIn: 9.9.0.7.
71 + wp_enqueue_style( 'wpbc-settings-page', wpbc_plugin_url( '/core/any/css/settings-page.css' ), array(), WP_BK_VERSION_NUM);
72 + wp_enqueue_style( 'wpbc-admin-listing-table', wpbc_plugin_url( '/core/any/css/admin-listing-table.css' ), array(), WP_BK_VERSION_NUM);
73 + wp_enqueue_style( 'wpbc-br-table', wpbc_plugin_url( '/core/any/css/admin-br-table.css' ), array(), WP_BK_VERSION_NUM);
74 + wp_enqueue_style( 'wpbc-flex-table', wpbc_plugin_url( '/core/any/css/wpbc_flextable.css' ), array(), WP_BK_VERSION_NUM); // Flex: Booking resources Table // FixIn: 9.9.0.7.
74 75 wp_enqueue_style( 'wpbc-admin-modal-popups', wpbc_plugin_url( '/css/modal.css' ), array(), WP_BK_VERSION_NUM);
75 - wp_enqueue_style( 'wpbc-admin-pages', wpbc_plugin_url( '/css/admin.css' ), array(), WP_BK_VERSION_NUM);
76 - wp_enqueue_style( 'wpbc-admin-skin', wpbc_plugin_url( '/css/admin-skin.css' ), array( 'wpbc-admin-pages' ), WP_BK_VERSION_NUM ); // FixIn: 8.0.2.4.
77 - wp_enqueue_style( 'wpbc-admin-skin-modern_1', wpbc_plugin_url( '/css/admin-skin-modern_1.css' ), array( 'wpbc-admin-skin' ), WP_BK_VERSION_NUM ); // FixIn: 9.5.5.1.
76 + wp_enqueue_style( 'wpbc-admin-pages', wpbc_plugin_url( '/css/admin.css' ), array(), WP_BK_VERSION_NUM);
77 + wp_enqueue_style( 'wpbc-admin-skin', wpbc_plugin_url( '/css/admin-skin.css' ), array( 'wpbc-admin-pages' ), WP_BK_VERSION_NUM ); // FixIn: 8.0.2.4.
78 + wp_enqueue_style( 'wpbc-admin-components', wpbc_plugin_url( '/includes/_toolbar_ui/_out/wpbc_admin_components.css' ), array( 'wpbc-admin-skin' ), WP_BK_VERSION_NUM ); // Reusable components that must override legacy administration compatibility styles.
78 79
79 - global $wp_version;
80 -
81 - if ( ( version_compare( $wp_version, '5.3', '>=' ) )
82 - || ( version_compare( $wp_version, '5.3-RC2-46574', '>=' ) )
83 - ){
84 - /* The SVG is arrow-down-alt2 from Dashicons. */
85 - $css = "
86 - .wp-core-ui .wpdevelop .control-group .btn-toolbar .input-group > select,
87 - .wp-core-ui .wpdevelop select.form-control {
88 - background: #fff url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%206l5%205%205-5%202%201-7%207-7-7%202-1z%22%20fill%3D%22%23555%22%2F%3E%3C%2Fsvg%3E') no-repeat right 5px top 55%;
89 - padding: 2px 30px 2px 10px;
90 - }
91 - ";
92 - wp_add_inline_style( 'wpbc-admin-pages', $css );
80 + $wpbc_inline_css = '';
81 + if ( wpbc_mu__is_simulated_login_as_user() ) {
82 + // Mark last item in menu as a button.
83 + $wpbc_inline_css .= ' #adminmenu #toplevel_page_wpbc .wp-submenu li:nth-last-child(1) a { font-weight: 600;background-color: #075c00;color: #fff;margin: 10px 10px 0;display: block;text-align: center;border-radius: 3px;transition: all .3s;box-shadow: none; } ';
84 + $wpbc_inline_css .= ' #adminmenu #toplevel_page_wpbc .wp-submenu li:nth-last-child(1) { margin-top: 10px;border-top: 1px solid #535454; } ';
85 + } else {
86 + // Horizontal Lines in Menu. // FixIn: 10.1.3.1.
87 + $wpbc_inline_css .= ' #adminmenu #toplevel_page_wpbc .wp-submenu li:nth-child(4) a { border-top: 1px solid #535454;padding-top: 10px;margin-top: 6px; } ';
88 + $wpbc_inline_css .= ' #adminmenu #toplevel_page_wpbc .wp-submenu li:nth-last-child(1) a { border-top: 1px solid #535454;padding-top: 10px;margin-top: 6px; } ';
93 89 }
90 + wp_add_inline_style( 'wpbc-admin-pages', $wpbc_inline_css );
91 + }
94 92
95 - $wpbc_inline_css = '';
96 - if ( ( ! class_exists( 'wpdev_bk_personal' ) ) || ( wpbc_mu__is_simulated_login_as_user() ) ) { // FixIn: 10.1.5.2.
97 - // FixIn: 10.1.3.1.
98 - //$wpbc_inline_css .= " #adminmenu #toplevel_page_wpbc .wp-submenu li:nth-last-child(-n+1) a { color: #adc636; } ";
99 - if ( 'hide' !== get_bk_option( 'booking_menu_go_pro' ) ) {
100 - // Mark last item in menu 'Get Pro' as a button
101 - //$wpbc_inline_css .= " #adminmenu #toplevel_page_wpbc .wp-submenu li:nth-last-child(1) a { font-weight: 600;background-color: #0b9300;color: #fff;margin: 10px 10px 0;display: block;text-align: center;border-radius: 3px;transition: all .3s;box-shadow: none; } ";
102 - $wpbc_inline_css .= " #adminmenu #toplevel_page_wpbc .wp-submenu li:nth-last-child(1) a { font-weight: 600;background-color: #075c00;color: #fff;margin: 10px 10px 0;display: block;text-align: center;border-radius: 3px;transition: all .3s;box-shadow: none; } ";
103 - $wpbc_inline_css .= " #adminmenu #toplevel_page_wpbc .wp-submenu li:nth-last-child(1) { margin-top: 10px;border-top: 1px solid #535454; } ";
104 - }
105 - } else {
106 -
107 - $wpbc_inline_css .= " #adminmenu #toplevel_page_wpbc .wp-submenu li:nth-child(4) a { border-top: 1px solid #535454;padding-top: 10px;margin-top: 6px; } "; // FixIn: 10.1.3.1.
108 - $wpbc_inline_css .= " #adminmenu #toplevel_page_wpbc .wp-submenu li:nth-last-child(1) a { border-top: 1px solid #535454;padding-top: 10px;margin-top: 6px; } "; // FixIn: 10.1.3.1.
109 - }
110 -
111 - wp_add_inline_style( 'wpbc-admin-pages', $wpbc_inline_css );
112 - }
113 -
114 93 $server_request_uri = ( ( isset( $_SERVER['REQUEST_URI'] ) ) ? sanitize_text_field( $_SERVER['REQUEST_URI'] ) : '' ); /* phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.MissingUnslash */ /* FixIn: sanitize_unslash */
115 94 if (
116 95 ( 'admin' !== $where_to_load ) ||
117 - ( wpbc_is_new_booking_page() ) ||
118 - ( wpbc_is_setup_wizard_page() ) ||
119 - ( wpbc_is_settings_form_page() ) ||
96 + ( wpbc_is_admin_page_with_frontend_booking_preview() ) ||
120 97 ( ( wpbc_is_settings_page() ) && ( strpos( $server_request_uri, 'tab=payment' ) !== false ) )
121 - // || ( wpbc_is_availability_page() ) // FixIn: 10.0.0.5 Error at -> WP Booking Calendar > Availability > Season Availability page.
122 98 ) {
123 - // Client or Add New Booking page.
99 + wpbc_enqueue_styles__front_end();
100 + }
124 101
125 - if ( ( 'On' === get_bk_option( 'booking_timeslot_picker' ) ) || ( wpbc_is_setup_wizard_page() ) ) { // FixIn: 8.7.11.10.
126 - wp_enqueue_style( 'wpbc-time_picker', wpbc_plugin_url( '/css/wpbc_time-selector.css' ), array(), WP_BK_VERSION_NUM );
102 + wpbc_enqueue_styles__calendar();
127 103
128 - $time_picker_skin_path = wpbc_get_time_picker_skin_url();
129 - if ( ! empty( $time_picker_skin_path ) ) {
130 - wp_enqueue_style( 'wpbc-time_picker-skin', $time_picker_skin_path, array( 'wpbc-time_picker' ), WP_BK_VERSION_NUM );
131 - }
104 + do_action( 'wpbc_enqueue_css_files', $where_to_load );
105 + }
106 +
107 +
108 + public function remove_conflicts( $where_to_load ) {
109 +
110 + // FixIn: 8.1.3.12.
111 + if (
112 + wpbc_is_bookings_page() ||
113 + wpbc_is_new_booking_page() ||
114 + wpbc_is_setup_wizard_page() ||
115 + wpbc_is_settings_form_page() ||
116 + wpbc_is_resources_page() ||
117 + wpbc_is_settings_page()
118 + ) {
119 + if ( function_exists( 'wp_dequeue_style' ) ) {
120 + /**
121 + // wp_dequeue_style( 'cs-alert' );
122 + // wp_dequeue_style( 'cs-framework' );
123 + // wp_dequeue_style( 'cs-font-awesome' );
124 + // wp_dequeue_style( 'icomoon' );
125 + */
126 + wp_dequeue_style( 'chosen' );
127 + wp_dequeue_style( 'toolset-font-awesome-css' ); // Remove this script sitepress-multilingual-cms/res/css/font-awesome.min.css?ver=3.1.6, which is load by the "sitepress-multilingual-cms".
128 + wp_dequeue_style( 'toolset-font-awesome' ); // FixIn: 5.4.5.8.
129 + wp_dequeue_style( 'the7-fontello-css' );
130 + wp_dequeue_style( 'dt-awsome-fonts-back-css' ); // FixIn: 8.2.1.10 fix conflict with https://the7.io/.
131 + wp_dequeue_style( 'dt-awsome-fonts-css' );
132 + wp_dequeue_style( 'dt-fontello-css' );
133 + wp_dequeue_style( 'cs_icons_data_css_default' ); // FixIn: 8.1.3.12.
134 + wp_dequeue_style( 'icons-style' ); // FixIn: 8.2.1.22.
135 + wp_dequeue_style( 'fontawesome-style' ); // FixIn: 8.2.1.22.
136 + wp_dequeue_style( 'bootstrap-style' ); // FixIn: 8.2.1.22.
137 + wp_dequeue_style( 'bootstrap-theme-style' ); // FixIn: 8.2.1.22.
132 138 }
133 - wp_enqueue_style( 'wpbc-client-pages', wpbc_plugin_url( '/css/client.css' ), array(), WP_BK_VERSION_NUM );
134 - // Several concataned css files.
135 - wp_enqueue_style( 'wpbc-all-client', wpbc_plugin_url( '/_dist/all/_out/wpbc_all_client.css' ), array( 'wpbc-client-pages' ), WP_BK_VERSION_NUM );
136 139 }
140 + }
141 +}
137 142
138 - wp_enqueue_style( 'wpbc-calendar', wpbc_plugin_url( '/css/calendar.css' ), array(), WP_BK_VERSION_NUM );
139 - // Calendar Skins.
140 - $calendar_skin_path = wpbc_get_calendar_skin_url();
141 - if ( ! empty( $calendar_skin_path ) ) {
142 - wp_enqueue_style( 'wpbc-calendar-skin', $calendar_skin_path, array(), WP_BK_VERSION_NUM );
143 +
144 +/**
145 + * Integrate CSS files required for front-end side.
146 + *
147 + * @return void
148 + */
149 +function wpbc_enqueue_styles__front_end() {
150 +
151 + // Client or Add New Booking page.
152 + if ( ( 'On' === get_bk_option( 'booking_timeslot_picker' ) ) || wpbc_is_setup_wizard_page() || wpbc_is_builder_booking_form_page() || wpbc_is_settings_themes_page() ) { // FixIn: 8.7.11.10.
153 + wp_enqueue_style( 'wpbc-time_picker', wpbc_plugin_url( '/css/wpbc_time-selector.css' ), array(), WP_BK_VERSION_NUM );
154 +
155 + $time_picker_skin_path = wpbc_get_time_picker_skin_url();
156 + if ( ! empty( $time_picker_skin_path ) ) {
157 + wp_enqueue_style( 'wpbc-time_picker-skin', $time_picker_skin_path, array( 'wpbc-time_picker' ), WP_BK_VERSION_NUM );
143 158 }
159 + }
160 + wp_enqueue_style( 'wpbc-client-pages', wpbc_plugin_url( '/css/client.css' ), array(), WP_BK_VERSION_NUM );
161 + wp_enqueue_style( 'wpbc-all-client', wpbc_plugin_url( '/_dist/all/_out/wpbc_all_client.css' ), array( 'wpbc-client-pages' ), WP_BK_VERSION_NUM ); // Several concataned css files.
144 162
145 - do_action( 'wpbc_enqueue_css_files', $where_to_load );
146 - }
163 +}
147 164
165 +function wpbc_enqueue_styles__calendar() {
148 166
149 - public function remove_conflicts( $where_to_load ) {
167 + wp_enqueue_style( 'wpbc-calendar', wpbc_plugin_url( '/css/calendar.css' ), array(), WP_BK_VERSION_NUM );
150 168
151 - // FixIn: 8.1.3.12.
152 - if (
153 - wpbc_is_bookings_page()
154 - || wpbc_is_new_booking_page()
155 - || wpbc_is_setup_wizard_page()
156 - || wpbc_is_settings_form_page()
157 - || wpbc_is_resources_page()
158 - || wpbc_is_settings_page()
159 - ) {
160 - if (function_exists('wp_dequeue_style')) {
161 - /*
162 - wp_dequeue_style( 'cs-alert' );
163 - wp_dequeue_style( 'cs-framework' );
164 - wp_dequeue_style( 'cs-font-awesome' );
165 - wp_dequeue_style( 'icomoon' );
166 - */
167 - wp_dequeue_style( 'chosen');
168 - wp_dequeue_style( 'toolset-font-awesome-css' ); // Remove this script sitepress-multilingual-cms/res/css/font-awesome.min.css?ver=3.1.6, which is load by the "sitepress-multilingual-cms"
169 - wp_dequeue_style( 'toolset-font-awesome' ); // FixIn: 5.4.5.8.
170 - wp_dequeue_style( 'the7-fontello-css' );
171 - wp_dequeue_style( 'dt-awsome-fonts-back-css' ); //FixIn: 8.2.1.10 fix conflict with https://the7.io/
172 - wp_dequeue_style( 'dt-awsome-fonts-css' );
173 - wp_dequeue_style( 'dt-fontello-css' );
174 - wp_dequeue_style( 'cs_icons_data_css_default'); // FixIn: 8.1.3.12.
175 - wp_dequeue_style( 'icons-style' ); // FixIn: 8.2.1.22.
176 - wp_dequeue_style( 'fontawesome-style' ); // FixIn: 8.2.1.22.
177 - wp_dequeue_style( 'bootstrap-style' ); // FixIn: 8.2.1.22.
178 - wp_dequeue_style( 'bootstrap-theme-style' ); // FixIn: 8.2.1.22.
179 - }
180 - }
181 - }
169 + // Calendar Skins.
170 + $calendar_skin_path = wpbc_get_calendar_skin_url();
171 + if ( ! empty( $calendar_skin_path ) ) {
172 + wp_enqueue_style( 'wpbc-calendar-skin', $calendar_skin_path, array(), WP_BK_VERSION_NUM );
173 + }
174 +
182 175 }
183 176
184 177
178 +
185 179 /**
186 180 * Get URL to Calendar Skin ( CSS file )
187 181 *
188 182 * @return string - URL to calendar skin
@@ -188,9 +182,9 @@
188 182 * @return string - URL to calendar skin
189 183 */
190 184 function wpbc_get_calendar_skin_url() {
191 185
192 - // -- Old 'inc' path -> Re-update // FixIn: 8.7.11.11.
186 + // -- Old 'inc' path -> Re-update // FixIn: 8.7.11.11.
193 187 $check_skin_path = get_bk_option( 'booking_skin' );
194 188 if ( false !== strpos( $check_skin_path, 'inc/skins/' ) ) {
195 189 $check_skin_path = str_replace( 'inc/skins/', 'css/skins/', $check_skin_path );
196 190 update_bk_option( 'booking_skin', $check_skin_path );
@@ -203,60 +197,62 @@
203 197
204 198
205 199 $calendar_skin_path = false;
206 200 // -----------------------------------------------------------------------------------------------------------------
207 - // Check if this skin exist in Usual folder
201 + // Check if this skin exist in Usual folder.
208 202 // -----------------------------------------------------------------------------------------------------------------
209 - if ( file_exists( WPBC_PLUGIN_DIR . str_replace( WPBC_PLUGIN_URL, '', get_bk_option( 'booking_skin') ) ) ) {
210 - $calendar_skin_path = WPBC_PLUGIN_URL . str_replace( WPBC_PLUGIN_URL, '', get_bk_option( 'booking_skin') );
211 - }
203 + if ( file_exists( WPBC_PLUGIN_DIR . str_replace( WPBC_PLUGIN_URL, '', get_bk_option( 'booking_skin') ) ) ) {
204 + $calendar_skin_path = WPBC_PLUGIN_URL . str_replace( WPBC_PLUGIN_URL, '', get_bk_option( 'booking_skin') );
205 + }
212 206
213 207 // -----------------------------------------------------------------------------------------------------------------
214 - // Check if skin exist in the Custom User folder at the http://example.com/wp-content/uploads/wpbc_skins/
208 + // Check if skin exist in the Custom User folder at the http://example.com/wp-content/uploads/wpbc_skins/
215 209 // -----------------------------------------------------------------------------------------------------------------
216 - $upload_dir = wp_upload_dir();
217 - $custom_user_skin_folder = $upload_dir['basedir'] ;
218 - $custom_user_skin_url = $upload_dir['baseurl'] ; //$custom_user_skin_url = str_replace( 'http:', 'https:', $custom_user_skin_url );
210 + $upload_dir = wp_upload_dir();
211 + $custom_user_skin_folder = $upload_dir['basedir'];
212 + $custom_user_skin_url = $upload_dir['baseurl'];
219 213
220 - if ( file_exists( $custom_user_skin_folder . str_replace( array( WPBC_PLUGIN_URL , $custom_user_skin_url ), '', get_bk_option( 'booking_skin') ) ) ) {
221 - $calendar_skin_path = $custom_user_skin_url . str_replace( array(WPBC_PLUGIN_URL, $custom_user_skin_url ), '', get_bk_option( 'booking_skin') );
222 - }
214 + if ( file_exists( $custom_user_skin_folder . str_replace( array( WPBC_PLUGIN_URL , $custom_user_skin_url ), '', get_bk_option( 'booking_skin') ) ) ) {
215 + $calendar_skin_path = $custom_user_skin_url . str_replace( array(WPBC_PLUGIN_URL, $custom_user_skin_url ), '', get_bk_option( 'booking_skin') );
216 + }
223 217
224 218 // -----------------------------------------------------------------------------------------------------------------
225 219 // If still no file, then Default
226 220 // -----------------------------------------------------------------------------------------------------------------
227 221 if ( empty( $calendar_skin_path ) ) {
228 - $calendar_skin_path = WPBC_PLUGIN_URL . '/css/skins/24_9__light.css';
222 + $calendar_skin_path = WPBC_PLUGIN_URL . '/css/skins/25_5__round_1.css';
229 223 }
230 224
231 - return $calendar_skin_path;
225 + return $calendar_skin_path;
232 226 }
233 227
234 228
235 -function wpbc_get_time_picker_skin_url(){ // FixIn: 8.7.11.10.
229 +/**
230 + * Get URL of Time Picker Skin - checked by default of this skin exists.
231 + *
232 + * @return false|string
233 + */
234 +function wpbc_get_time_picker_skin_url() {
236 235
237 - // time_picker Skin ///////////////////////////////////////////////////////
236 + // Time_picker Skin.
238 237 $time_picker_skin_path = false;
239 238
240 - // Just default value, if previously was not saved any options.
239 + // Just default value, if previously was not saved any options.
241 240 if ( empty( get_bk_option( 'booking_timeslot_picker_skin' ) ) ) {
242 - // update_bk_option( 'booking_timeslot_picker_skin', '/css/time_picker_skins/grey.css' );
243 - update_bk_option( 'booking_timeslot_picker_skin', '/css/time_picker_skins/light__24_8.css' ); // FixIn: 10.4.0.1.
241 + update_bk_option( 'booking_timeslot_picker_skin', '/css/time_picker_skins/form_style.css' ); // FixIn: 11.4.4.
244 242 }
245 243
246 - // Check if this skin exist in the plugin folder //////////////////////
247 - if ( file_exists( WPBC_PLUGIN_DIR . str_replace( WPBC_PLUGIN_URL, '', get_bk_option( 'booking_timeslot_picker_skin') ) ) ) {
248 - $time_picker_skin_path = WPBC_PLUGIN_URL . str_replace( WPBC_PLUGIN_URL, '', get_bk_option( 'booking_timeslot_picker_skin') );
249 - }
244 + // Check if this skin exist in the plugin folder.
245 + if ( file_exists( WPBC_PLUGIN_DIR . str_replace( WPBC_PLUGIN_URL, '', get_bk_option( 'booking_timeslot_picker_skin' ) ) ) ) {
246 + $time_picker_skin_path = WPBC_PLUGIN_URL . str_replace( WPBC_PLUGIN_URL, '', get_bk_option( 'booking_timeslot_picker_skin' ) );
247 + }
250 248
251 - // Check if this skin exist in the Custom User folder at the http://example.com/wp-content/uploads/wpbc_skins/
252 - $upload_dir = wp_upload_dir();
253 - $custom_user_skin_folder = $upload_dir['basedir'] ;
254 - $custom_user_skin_url = $upload_dir['baseurl'] ;
255 - if ( file_exists( $custom_user_skin_folder . str_replace( array( WPBC_PLUGIN_URL , $custom_user_skin_url ), '', get_bk_option( 'booking_timeslot_picker_skin') ) ) ) {
256 - $time_picker_skin_path = $custom_user_skin_url . str_replace( array(WPBC_PLUGIN_URL, $custom_user_skin_url ), '', get_bk_option( 'booking_timeslot_picker_skin') );
257 - }
249 + // Check if this skin exist in the Custom User folder at the http://example.com/wp-content/uploads/wpbc_skins/ .
250 + $upload_dir = wp_upload_dir();
251 + $custom_user_skin_folder = $upload_dir['basedir'];
252 + $custom_user_skin_url = $upload_dir['baseurl'];
253 + if ( file_exists( $custom_user_skin_folder . str_replace( array( WPBC_PLUGIN_URL, $custom_user_skin_url, ), '', get_bk_option( 'booking_timeslot_picker_skin' ) ) ) ) {
254 + $time_picker_skin_path = $custom_user_skin_url . str_replace( array( WPBC_PLUGIN_URL, $custom_user_skin_url, ), '', get_bk_option( 'booking_timeslot_picker_skin' ) );
255 + }
258 256
259 - return $time_picker_skin_path;
257 + return $time_picker_skin_path;
260 258 }
261 -
262 -