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 | core/admin/wpbc-settings-functions.php +7 -2 11.1 → 11.9 View file →
@@ -81,10 +81,13 @@
81 81 if ( ( isset( $_GET['reset'] ) ) && ( 'custom_forms' == $_GET['reset'] ) ) { // FixIn: 8.1.3.21.
82 82
83 83 wpbc_open_meta_box_section( 'wpbc_general_settings_system_info', 'System Info' );
84 84
85 - // Reset Custom Booking Forms to NONE
86 - update_bk_option( 'booking_forms_extended', serialize( array() ) );
85 + global $wpdb;
86 + if ( function_exists( 'wpbc_is_table_exists' ) && wpbc_is_table_exists( 'booking_form_structures' ) ) {
87 + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared
88 + $wpdb->query( "DELETE FROM {$wpdb->prefix}booking_form_structures WHERE form_slug <> 'standard'" );
89 + }
87 90
88 91 wpbc_show_message_in_settings( '<strong>Custom forms</strong> has been reseted!', 'info' );
89 92
90 93 wpbc_close_meta_box_section();
@@ -99,8 +102,10 @@
99 102 * // Link: http://server.com/wp-admin/admin.php?page=wpbc-settings&system_info=show&_wpnonce='. wp_create_nonce( 'wpbc_settings_url_nonce' ) .' &pot=1#wpbc_general_settings_system_info_metabox
100 103 *
101 104 */
102 105 function wpbc_settings__system_info__generate_php_from_pot() {
106 +
107 + return;
103 108
104 109 if ( ! current_user_can( 'activate_plugins' ) ) {
105 110 return;
106 111 }