Changeset 1628729
- Timestamp:
- 04/03/2017 10:56:28 PM (9 years ago)
- Location:
- fareharbor/trunk
- Files:
-
- 2 edited
-
fareharbor.php (modified) (4 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
fareharbor/trunk/fareharbor.php
r1482056 r1628729 4 4 Plugin URI: https://fareharbor.com/help/setup/wordpress-plugin/ 5 5 Description: Easily add FareHarbor reservation calendars and buttons to your site 6 Version: 3. 26 Version: 3.3 7 7 Author: FareHarbor 8 8 Author URI: https://fareharbor.com … … 44 44 private function __construct() {} 45 45 46 public static $version = '3. 2';46 public static $version = '3.3'; 47 47 48 48 // Update the saved version number in the wp_options table … … 83 83 add_action( 'wp_enqueue_scripts', array( 'fareharbor', 'maybe_enqueue_fh_kit_styles' ) ); 84 84 85 if ( is_admin() && ( !defined( 'DOING_AJAX' ) || !DOING_AJAX ) ) 86 update_option( 'fareharbor_version', self::$version ); 85 $saved_version = get_option( 'fareharbor_version' ); 86 if ( $saved_version !== self::$version ) 87 self::upgrade( $saved_version ); 88 89 } 90 91 // Upgrade 92 // =============================================== 93 94 private static function upgrade( $from ) { 95 96 if ( !$from ) { 97 // New install or upgrade from version before 3.0, before we saved 98 // version numbers in the database. No choice but to treat those 99 // as a new install. 100 // No settings should be saved but let's be careful not to override 101 // just in case 102 $saved_settings = get_option( 'fareharbor_settings', [] ); 103 if ( !is_array( $saved_settings ) ) 104 // Even less likely, but again just in case 105 $saved_settings = []; 106 107 $defaults = [ 108 'fh_responsive_calendars' => 'on', 109 'fh_default_fallback' => 'simple', 110 'fh_auto_lightframe_enabled' => 'on', 111 ]; 112 update_option( 'fareharbor_settings', $saved_settings + $defaults ); 113 } 114 // elseif ( version_compare( $from, '3.2', '<=' ) ) { 115 // Preserve old defaults; no action required 116 // } 117 118 update_option( 'fareharbor_version', self::$version, true ); 87 119 88 120 } … … 476 508 $query[ 'selected-items' ] = $args[ 'items' ]; 477 509 478 return self::embed_script_src( 'items', $args, $url_suffix, $query, true );510 return self::embed_script_src( 'items', $args, '', $query, true ); 479 511 480 512 } -
fareharbor/trunk/readme.txt
r1482056 r1628729 3 3 Tags: reservations, booking calendar, booking, reservation plugin, reservation calendar, booking system 4 4 Requires at least: 3.0 5 Tested up to: 4. 65 Tested up to: 4.7.3 6 6 Stable tag: trunk 7 7 License: GPLv2 or later … … 43 43 44 44 == Changelog == 45 46 = 3.3 = 47 * Default to responsive calendars for new installs 48 * Default to simple fallback for new installs 49 * Enable Auto-Lightframe by default for new installs 45 50 46 51 = 3.2 =
Note: See TracChangeset
for help on using the changeset viewer.