Plugin Directory

Changeset 3457754


Ignore:
Timestamp:
02/10/2026 08:19:20 AM (7 weeks ago)
Author:
wpdevelop
Message:

Update 10.14.16

Location:
booking/trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • booking/trunk/includes/_functions/admin_menu_url.php

    r3338785 r3457754  
    370370
    371371/**
     372 * Check if this WP Booking Calendar > Settings > Booking Form Builder (BFB) page.
     373 *
     374 * @param string $server_param -  'REQUEST_URI' | 'HTTP_REFERER'  Default: 'REQUEST_URI'
     375 *
     376 * @return boolean true | false
     377 */
     378function wpbc_is_settings_bfb_page( $server_param = 'REQUEST_URI' ) {
     379    // Regular  user overwrite settings.
     380
     381    // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.InputNotValidated, WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
     382    if ( ( is_admin() ) && ( strpos( $_SERVER[ $server_param ], 'page=wpbc-settings' ) !== false ) && ( ( strpos( $_SERVER[ $server_param ], '&tab=builder_booking_form' ) !== false ) || ( ( class_exists( 'wpdev_bk_multiuser' ) ) && ( ! empty( $_REQUEST['tab'] ) ) && ( 'builder_booking_form' === $_REQUEST['tab'] ) ) ) ) {
     383        return true;
     384    }
     385
     386    return false;
     387}
     388
     389
     390/**
    372391 * Check if this WP Booking Calendar > Settings > Booking Form page
    373392 *
  • booking/trunk/includes/_toolbar_ui/ui__settings_panel.php

    r3291612 r3457754  
    599599        wpbc_ui_settings__panel_start();
    600600
     601        if ( WPBC_Frontend_Settings::is_bfb_enabled( null ) ) {
     602            wpbc_ui_settings_panel__card__bfb( $params );
     603        } else {
    601604            wpbc_ui_settings_panel__card__form_fields( $params );
    602605            wpbc_ui_settings_panel__card__time_fields( $params );
    603606            wpbc_ui_settings_panel__card__time_slots_options( $params );
    604607            wpbc_ui_settings_panel__card__form_options( $params );
     608        }
    605609
    606610        wpbc_ui_settings__panel_end();
     
    630634                    echo $url; ?>>
    631635                        <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html__('Booking Form Fields','booking'); ?></span>
     636                    </a>
     637                </h1>
     638            </div>
     639            <div class="wpbc_ui_settings__text_row">
     640                <a class="wpbc_ui_settings__text_color__black" onclick="<?php
     641    // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
     642    echo $onclick; ?>" <?php
     643                // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
     644                echo $url; ?>> <?php esc_html_e( 'Add, remove, or customize fields in your booking form.', 'booking' ); ?>
     645                </a>
     646            </div>
     647        </div><?php
     648
     649    }
     650
     651
     652    /**
     653     * Show   == Dashboard Card  -  Booking Form Fields ==
     654     *
     655     * @return void
     656     */
     657    function wpbc_ui_settings_panel__card__bfb( $params = array() ){
     658
     659        $onclick = '';//  ' onclick="' . "javascript:wpbc_navigation_click_show_section(this,'#wpbc_general_settings_calendar_metabox' );" . '" ';
     660        $url = ' href="' . esc_url( wpbc_get_settings_url() . '&tab=builder_booking_form' ) . '" ';
     661
     662        ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_text_small wpbc_ui_settings__card_divider_right wpbc_ui_settings_panel__card__form_fields">
     663            <div class="wpbc_ui_settings__text_row">
     664                <i class="menu_icon icon-1x wpbc_icn_dashboard"></i>
     665                <h1>
     666                    <a onclick="<?php
     667    // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
     668    echo $onclick; ?>" <?php
     669                    // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
     670                    echo $url; ?>>
     671                        <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html__('Drag & Drop Booking Form Builder','booking'); ?></span>
    632672                    </a>
    633673                </h1>
  • booking/trunk/includes/page-bookings/bookings__sql.php

    r3456856 r3457754  
    10441044
    10451045                } else if ($wh_booking_date  === '4') {                                     // Next
     1046                    $wh_booking_date2 = intval( $wh_booking_date2 );                      // FixIn: 10.14.16.1.
    10461047                    $sql_where  =               $and_pre."( ".$pref."booking_date <= (" . wpbc_sql_date_math_expr_explicit( "+ INTERVAL ". $wh_booking_date2 . " DAY", 'curdate' ) . ") ) ".$and_suf ;
    10471048                    // $sql_where .=               $and_pre."( ".$pref."booking_date >= (" . wpbc_sql_date_math_expr_explicit( "- INTERVAL 1 DAY", 'curdate' ) . ") ) ".$and_suf ;
     
    10501051                } else if ($wh_booking_date  === '5') {                                     // Prior
    10511052                    $wh_booking_date2 = str_replace('-', '', $wh_booking_date2);
     1053                    $wh_booking_date2 = intval( $wh_booking_date2 );                      // FixIn: 10.14.16.1.
    10521054                    $sql_where  =               $and_pre."( ".$pref."booking_date >= (" . wpbc_sql_date_math_expr_explicit( "- INTERVAL ". $wh_booking_date2 . " DAY", 'curdate' ) . ") ) ".$and_suf ;
    10531055                    $sql_where .=               $and_pre."( ".$pref."booking_date <= (" . wpbc_sql_date_math_expr_explicit( "+ INTERVAL 1 DAY", 'curdate' ) . ") ) ".$and_suf ;
     
    11261128                } else if ($wh_modification_date  === '5') {                                // Prior
    11271129                    $wh_modification_date2 = str_replace('-', '', $wh_modification_date2);
     1130                    $wh_modification_date2 = intval( $wh_modification_date2 );              // FixIn: 10.14.16.1.
    11281131                    $sql_where  =               $and_pre."( ".$pref."modification_date >= (" . wpbc_sql_date_math_expr_explicit( "- INTERVAL ". $wh_modification_date2 . " DAY", 'curdate' ) . ") ) ".$and_suf ;
    11291132                    $sql_where .=               $and_pre."( ".$pref."modification_date <= (" . wpbc_sql_date_math_expr_explicit( "+ INTERVAL 1 DAY", 'curdate' ) . ") ) ".$and_suf ;
  • booking/trunk/includes/page-form-simple/page-form-simple.php

    r3338785 r3457754  
    4747
    4848    public function in_page() {
     49
     50        if ( WPBC_Frontend_Settings::is_bfb_enabled( null ) ) {
     51            return 'test' . (string) wp_rand( 100000, 1000000 );
     52        }
    4953
    5054        if ( class_exists( 'wpdev_bk_personal' ) ) {
  • booking/trunk/includes/page-settings-form-options/page-settings-form-options.php

    r3432649 r3457754  
    6161                                    'type'          => 'checkbox'
    6262                                    , 'default'     => $default_options_values['booking_use_bfb_form']         // 'Off'
    63                                     , 'title'       => __('New Booking Form Builder' ,'booking') . ' (Beta)'
     63                                    , 'title'       =>  __('Drag & Drop Booking Form Builder' ,'booking') .
     64                                                        '<span class="wpbc_new_label" style="padding: 3px 4px;margin: 0 10px;">' . esc_html__( 'New', 'booking' ) . '</span>' .
     65                                                        '<span class="wpbc_new_label" style="padding: 3px 4px;background: #e18900;text-transform: none;">Beta</span> '
    6466                                    , 'label'       => __('Enable the new drag & drop booking form builder.' ,'booking')
    65                                     , 'description' => '<div style="font-size: 12px;margin: -25px 0;">' . '<strong>' . __( 'Beta feature.', 'booking' ) . '</strong> ' .
    66                                                        __( 'Enables the new drag & drop form builder. Disable this option to use the classic booking form.', 'booking' )
    67                                     . '</div>'
     67                                    , 'description' => __( 'Enables the new drag & drop form builder. Disable this option to use the classic booking form.', 'booking' )
    6868                                    , 'group'       => 'form'
    6969                );
     
    254254    public function in_page() {
    255255
     256        if ( WPBC_Frontend_Settings::is_bfb_enabled( null ) ) {
     257            return 'test' . (string) wp_rand( 100000, 1000000 );
     258        }
     259
    256260        if ( ! wpbc_is_mu_user_can_be_here( 'only_super_admin' ) ) {            // If this User not "super admin",  then  do  not load this page at all.
    257261            return (string) wp_rand( 100000, 1000000 );
  • booking/trunk/includes/ui_settings/class-menu-structure.php

    r3348957 r3457754  
    603603            }
    604604        }
     605
     606        self::$nav_tabs = apply_filters( 'wpbc_plugin_menu_structure_arr', self::$nav_tabs, $this_page );
    605607    }
    606608
  • booking/trunk/readme.txt

    r3456856 r3457754  
    66Requires PHP: 5.6
    77Tested up to: 6.9
    8 Stable tag: 10.14.15
     8Stable tag: 10.14.16
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    301301
    302302== Changelog ==
     303= 10.14.16 =
     304- Changes in **all** versions:
     305    * **Fix**:  Resoved Improper Neutralization of Special Elements used in an SQL. (10.14.16.1.)
     306
    303307= 10.14.15 =
    304308- Changes in **all** versions:
  • booking/trunk/wpdev-booking.php

    r3456856 r3457754  
    88Text Domain: booking
    99Domain Path: /languages/
    10 Version: 10.14.15
     10Version: 10.14.16
    1111License: GPLv2 or later
    1212*/
     
    3535
    3636if ( ! defined( 'WP_BK_VERSION_NUM' ) ) {
    37     define( 'WP_BK_VERSION_NUM', '10.14.15' );
     37    define( 'WP_BK_VERSION_NUM', '10.14.16' );
    3838}
    3939if ( ! defined( 'WP_BK_MINOR_UPDATE' ) ) {
    40     define( 'WP_BK_MINOR_UPDATE',  true );
     40    define( 'WP_BK_MINOR_UPDATE', true );
    4141}
    4242
Note: See TracChangeset for help on using the changeset viewer.