Changeset 1655387
- Timestamp:
- 05/11/2017 07:16:27 PM (9 years ago)
- Location:
- fareharbor/trunk
- Files:
-
- 3 edited
-
fareharbor.php (modified) (4 diffs)
-
readme.txt (modified) (1 diff)
-
uninstall.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
fareharbor/trunk/fareharbor.php
r1629434 r1655387 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. 3.16 Version: 3.4 7 7 Author: FareHarbor 8 8 Author URI: https://fareharbor.com … … 44 44 private function __construct() {} 45 45 46 public static $version = '3. 3';46 public static $version = '3.4'; 47 47 48 48 // Update the saved version number in the wp_options table … … 111 111 ); 112 112 update_option( 'fareharbor_settings', $saved_settings + $defaults ); 113 114 // All new installs from v3.4 on should use v2 of the stylesheet 115 update_option( 'fareharbor_kit_version', 'v2' ); 113 116 } 114 // elseif ( version_compare( $from, '3.2', '<=' ) ) { 115 // Preserve old defaults; no action required 116 // } 117 elseif ( version_compare( $from, '3.4', '<=' ) ) { 118 // Can't swap version of old sites that might already be using v1 119 // of the stylesheet! 120 update_option( 'fareharbor_kit_version', 'v1' ); 121 } 117 122 118 123 update_option( 'fareharbor_version', self::$version, true ); … … 152 157 $query_string = ltrim( $query_string, '?' ); 153 158 154 $fh_kit_src = 'https://fh-kit.com/buttons/v1/'; 159 // Default to v1 for sites that don't have this in the options table in 160 // case upgrade procedure didn't run. All new installs should get 161 // `fareharbor_kit_version` saved as v2 upon install. 162 $version = get_option( 'fareharbor_kit_version', 'v1' ); 163 // Make the version filterable 164 $version = apply_filters( 'fareharbor/fh_kit_version', $version ); 165 // Validate. If we got something funky (as opposed to nothing at all) then 166 // we'll default to version 2. 167 if ( !in_array( $version, array( 'v1', 'v2', ), true ) ) 168 $version = 'v2'; 169 170 $fh_kit_src = "https://fh-kit.com/buttons/$version/"; 155 171 156 172 if ( $query_string ) -
fareharbor/trunk/readme.txt
r1629434 r1655387 43 43 44 44 == Changelog == 45 46 = 3.4 = 47 * Upgrade to version 2 of FareHarbor Kit for even better looking buttons with more features 45 48 46 49 = 3.3.1 = -
fareharbor/trunk/uninstall.php
r1450168 r1655387 6 6 delete_option( 'fareharbor_settings' ); 7 7 delete_option( 'fareharbor_version' ); 8 delete_option( 'fareharbor_kit_version' );
Note: See TracChangeset
for help on using the changeset viewer.