Changeset 3033837
- Timestamp:
- 02/09/2024 11:11:44 PM (2 years ago)
- Location:
- webhotelier/trunk
- Files:
-
- 6 added
- 5 edited
-
README.txt (modified) (2 diffs)
-
block (added)
-
block/build (added)
-
block/build/block.json (added)
-
block/build/index.asset.php (added)
-
block/build/index.js (added)
-
block/wp-webhotelier-block.php (added)
-
includes/class-wp-webhotelier-shortcode.php (modified) (1 diff)
-
includes/class-wp-webhotelier-widget.php (modified) (2 diffs)
-
includes/class-wp-webhotelier.php (modified) (1 diff)
-
wp-webhotelier.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
webhotelier/trunk/README.txt
r3030111 r3033837 5 5 Requires at least: 4.9 6 6 Tested up to: 6.4 7 Stable tag: 1. 8.27 Stable tag: 1.9.0 8 8 Requires PHP: 5.6 9 9 License: GPLv2 or later … … 54 54 55 55 == Changelog == 56 57 = 1.9.0= 58 * Complete refactoring of the Gutenberg block 59 * Fixes a shortcode bug related to the opening and closing dates 60 * Fixes a bug occuring solely on Safari 56 61 57 62 = 1.8.2= -
webhotelier/trunk/includes/class-wp-webhotelier-shortcode.php
r2991660 r3033837 98 98 $wp_webhotelier_atts = shortcode_atts($default_shortcode_atts, $atts, $tag); 99 99 100 $wp_webhotelier_atts['opening-date'] = (new DateTimeImmutable())->createFromFormat('d/m', $wp_webhotelier_atts['opening-closing-dates']['from'])->format('Y-m-d'); 101 $wp_webhotelier_atts['closing-date'] = (new DateTimeImmutable())->createFromFormat('d/m', $wp_webhotelier_atts['opening-closing-dates']['to'])->format('Y-m-d'); 100 if (is_array($wp_webhotelier_atts['opening-closing-dates'])) { 101 $wp_webhotelier_atts['opening-date'] = (new DateTimeImmutable())->createFromFormat('d/m', $wp_webhotelier_atts['opening-closing-dates']['from'])->format('Y-m-d'); 102 $wp_webhotelier_atts['closing-date'] = (new DateTimeImmutable())->createFromFormat('d/m', $wp_webhotelier_atts['opening-closing-dates']['to'])->format('Y-m-d'); 103 } 104 if (is_string($wp_webhotelier_atts['opening-closing-dates']) && strpos($wp_webhotelier_atts['opening-closing-dates'], ' to ') !== false) { 105 $dates = explode(' to ', $wp_webhotelier_atts['opening-closing-dates']); 106 $wp_webhotelier_atts['opening-date'] = $dates[0]; 107 $wp_webhotelier_atts['closing-date'] = $dates[1]; 108 } 109 102 110 $wp_webhotelier_atts['default-date'] = Wp_Webhotelier_Helper::createDefaultDate($wp_webhotelier_atts['opening-date'], $wp_webhotelier_atts['closing-date'], $wp_webhotelier_atts['days-after-checkin-allowed']); 103 111 104 112 //setting the id of the current view (and my_id for the page) of the loaded shortcode 105 113 $this->my_shortcode_id_num = ++self::$shortcode_class_id; -
webhotelier/trunk/includes/class-wp-webhotelier-widget.php
r2833480 r3033837 36 36 { 37 37 parent::__construct( 38 'wp_webhotelier_widget', // Base ID39 esc_html__('Webhotelier Availability Form', 'wp_webhotelier'),// Name40 ['description' => esc_html__('Display a Webhotelier Availability Form as a widget', 'wp_webhotelier')] // Args38 'wp_webhotelier_widget', // Base ID 39 esc_html__('Webhotelier Widget Form', 'wp_webhotelier'), // Name 40 ['description' => esc_html__('Display a Webhotelier Availability Form as a widget', 'wp_webhotelier')] // Args 41 41 ); 42 42 } … … 162 162 } 163 163 $new_instance = array_filter($new_instance, 'strlen'); 164 $new_instance['opening-date'] = current_time('Y') . '-' . $new_instance['opening-month'] . '-' . $new_instance['opening-day'];165 $new_instance['closing-date'] = current_time('Y') . '-' . $new_instance['closing-month'] . '-' . $new_instance['closing-day'];164 $new_instance['opening-date'] = current_time('Y') . '-' . str_pad($new_instance['opening-month'], 2, 0, STR_PAD_LEFT) . '-' . str_pad($new_instance['opening-day'], 2, 0, STR_PAD_LEFT); 165 $new_instance['closing-date'] = current_time('Y') . '-' . str_pad($new_instance['closing-month'], 2, 0, STR_PAD_LEFT) . '-' . str_pad($new_instance['closing-day'], 2, 0, STR_PAD_LEFT); 166 166 return $new_instance; 167 167 } -
webhotelier/trunk/includes/class-wp-webhotelier.php
r2656404 r3033837 119 119 * The class responsible for adding the Gutenberg block. 120 120 */ 121 require_once plugin_dir_path(dirname(__FILE__)) . 'block s/wp-webhotelier-block.php';121 require_once plugin_dir_path(dirname(__FILE__)) . 'block/wp-webhotelier-block.php'; 122 122 123 123 $this->loader = new Wp_Webhotelier_Loader(); -
webhotelier/trunk/wp-webhotelier.php
r3030111 r3033837 6 6 * Plugin URI: https://wplugged.com/docs/webhotelier-for-wordpress/ 7 7 * Description: Create and manage WebHotelier Forms easily through your WordPress 8 * Version: 1. 8.28 * Version: 1.9.0 9 9 * Author: WPlugged 10 10 * Author URI: https://wplugged.com … … 23 23 * Current plugin version. 24 24 */ 25 define('WP_WEBHOTELIER_VERSION', '1. 8.2');25 define('WP_WEBHOTELIER_VERSION', '1.9.0'); 26 26 27 27
Note: See TracChangeset
for help on using the changeset viewer.