PluginProbe
Booking Calendar / 11.9
Booking Calendar v11.9
11.9 11.8.4 11.8.3 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 All 205 releases
← All changes | includes/page-resource-free/page-resource-free.php +2 -63 11.8 → 11.9 View file →
@@ -135,11 +135,9 @@
135 135 <div class="clear"></div>
136 136 </span>
137 137 <?php
138 138
139 - do_action( 'wpbc_hook_settings_page_footer', 'resources' );
140 -
141 - $this->enqueue_js();
139 + do_action( 'wpbc_hook_settings_page_footer', 'resources' );
142 140 }
143 141
144 142
145 143 // <editor-fold defaultstate="collapsed" desc=" CSS & JS " >
@@ -178,68 +176,9 @@
178 176 }
179 177 </style>
180 178 <?php
181 179 }
182 -
183 -
184 -
185 - /**
186 - * Add Custom JavaScript - for some specific settings options
187 - * Executed After post content, after initial definition of settings, and possible definition after POST request.
188 - *
189 - * @param type $menu_slug
190 - */
191 - private function enqueue_js(){
192 -
193 - // JavaScript //////////////////////////////////////////////////////////////
194 -
195 - $js_script = '';
196 -
197 - /*
198 - // Hide|Show on Click Checkbox
199 - $js_script .= " jQuery('#bresources_booking_gcal_auto_import_is_active').on( 'change', function(){
200 - if ( this.checked ) {
201 - jQuery('.wpbc_tr_auto_import').removeClass('hidden_items');
202 - } else {
203 - jQuery('.wpbc_tr_auto_import').addClass('hidden_items');
204 - }
205 - } ); ";
206 - */
207 -
208 - // Open the publish controls when this page is used as the Setup Wizard "Publish" step.
209 - // phpcs:ignore WordPress.Security.NonceVerification.Recommended
210 - if ( isset( $_GET['wpbc_setup_step'] ) && ( 'wizard_publish' === sanitize_key( wp_unslash( $_GET['wpbc_setup_step'] ) ) ) ) {
211 - $js_script .= "
212 - jQuery( document ).ready( function() {
213 - setTimeout( function() {
214 - var publishSelector = '.ui_group__publish_btn:visible';
215 - var tableSelector = '#wpbc_booking_resource_table:visible';
216 - var \$publishTarget = jQuery( publishSelector ).first();
217 - var targetSelector = \$publishTarget.length ? publishSelector : tableSelector;
218 -
219 - if ( ! jQuery( targetSelector ).length ) {
220 - return;
221 - }
222 -
223 - if ( 'function' === typeof wpbc_scroll_to ) {
224 - wpbc_scroll_to( targetSelector );
225 - } else {
226 - jQuery( 'html, body' ).animate( { scrollTop: jQuery( targetSelector ).first().offset().top - 80 }, 300 );
227 - }
228 -
229 - if ( 'function' === typeof wpbc_blink_element ) {
230 - wpbc_blink_element( targetSelector, 3, 300 );
231 - }
232 - }, 350 );
233 - } );
234 - ";
235 - }
236 -
237 - // Enqueue JS to the footer of the page
238 - wpbc_enqueue_js( $js_script );
239 - }
240 -
241 - // </editor-fold>
180 + // </editor-fold>
242 181
243 182
244 183 // -----------------------------------------------------------------------------------------------------------------
245 184 // Toolbar