Plugin Directory

Changeset 3442505


Ignore:
Timestamp:
01/19/2026 12:04:20 PM (2 months ago)
Author:
creavi
Message:

Booking calendar now respects the WordPress “Week Starts On” setting

Location:
creavi-booking-service
Files:
28 added
5 edited

Legend:

Unmodified
Added
Removed
  • creavi-booking-service/trunk/assets/js/booking.js

    r3439801 r3442505  
    33        return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email);
    44    }
     5
     6    // Apply WP "Week Starts On" to Flatpickr globally
     7    if (window.flatpickr && window.creavibc_ajax) {
     8        const w = parseInt(creavibc_ajax.week_starts_on, 10);
     9        if (Number.isFinite(w)) {
     10            flatpickr.l10ns.default.firstDayOfWeek = w;
     11        }
     12    }
     13
    514
    615    function validateField($input) {
  • creavi-booking-service/trunk/creavi-booking-service.php

    r3441012 r3442505  
    44 * Description: A simple service booking system with popup UI.
    55 * Text Domain: creavi-booking-service
    6  * Version: 1.1.3
     6 * Version: 1.1.4
    77 * Author: Creavi
    88 * License: GPL2
     
    1414define('CREAVIBC_PLUGIN_URL', plugin_dir_url(__FILE__));
    1515define('CREAVIBC_PLUGIN_PATH', plugin_dir_path(__FILE__));
    16 define('CREAVIBC_VERSION', '1.1.3');
     16define('CREAVIBC_VERSION', '1.1.4');
    1717
    1818require_once CREAVIBC_PLUGIN_DIR . 'includes/cbs-gcal-remote.php';
  • creavi-booking-service/trunk/includes/functions.php

    r3439801 r3442505  
    189189
    190190  wp_localize_script('creavibc-script', 'creavibc_ajax', [
    191     'ajax_url' => admin_url('admin-ajax.php'),
    192     'nonce'    => wp_create_nonce('creavibc_booking_nonce'),
    193   ]);
     191        'ajax_url'       => admin_url('admin-ajax.php'),
     192        'nonce'          => wp_create_nonce('creavibc_booking_nonce'),
     193        'week_starts_on' => (int) get_option('start_of_week', 0), //  WP setting
     194    ]);
     195
    194196});
    195197
  • creavi-booking-service/trunk/includes/meta-boxes.php

    r3441012 r3442505  
    421421    wp_nonce_field('creavibc_save_grid_slots', 'creavibc_grid_slots_nonce');
    422422
     423    echo '<div class="creavibc-admin-hint" style="margin-top:12px;">
     424        <span class="dashicons dashicons-info-outline"></span>
     425        ' . esc_html__( 'The weekday columns follow your WordPress “Week Starts On” setting (Settings → General).', 'creavi-booking-service' ) . '
     426    </div>';
     427
     428
    423429    echo '<p><strong>Select appointment start times:</strong></p>';
    424430    echo '<div id="creavibc-slot-wrapper" style="position:relative;">';
  • creavi-booking-service/trunk/readme.txt

    r3441012 r3442505  
    55Tested up to: 6.8 
    66Requires PHP: 7.4 
    7 Stable tag: 1.1.3
     7Stable tag: 1.1.4
    88License: GPLv2 or later 
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    8686
    8787== Changelog ==
     88
     89= 1.1.4 =
     90* Booking calendar now respects the WordPress “Week Starts On” setting.
    8891
    8992= 1.1.3 =
Note: See TracChangeset for help on using the changeset viewer.