| @@ -9,26 +9,40 @@ | ||
| 9 | 9 | * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License |
| 10 | 10 | * @since 1.1.0 |
| 11 | 11 | */ |
| 12 | 12 | |
| 13 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 14 | + return; | |
| 15 | +} | |
| 13 | 16 | // Current SDK version and path. |
| 14 | -$themeisle_sdk_version = '2.1.2'; | |
| 17 | +$themeisle_sdk_version = '3.0.5'; | |
| 15 | 18 | $themeisle_sdk_path = dirname( __FILE__ ); |
| 16 | 19 | |
| 17 | 20 | global $themeisle_sdk_max_version; |
| 18 | 21 | global $themeisle_sdk_max_path; |
| 19 | 22 | |
| 20 | -if ( version_compare( $themeisle_sdk_version, $themeisle_sdk_max_version ) >= 0 ) { | |
| 23 | +if ( version_compare( $themeisle_sdk_version, $themeisle_sdk_max_path ) == 0 && | |
| 24 | + apply_filters( 'themeisle_sdk_should_overwrite_path', false, $themeisle_sdk_path, $themeisle_sdk_max_path ) ) { | |
| 25 | + $themeisle_sdk_max_path = $themeisle_sdk_path; | |
| 26 | +} | |
| 27 | + | |
| 28 | +if ( version_compare( $themeisle_sdk_version, $themeisle_sdk_max_version ) > 0 ) { | |
| 21 | 29 | $themeisle_sdk_max_version = $themeisle_sdk_version; |
| 22 | 30 | $themeisle_sdk_max_path = $themeisle_sdk_path; |
| 23 | 31 | } |
| 24 | 32 | |
| 25 | -// load the latest sdk version from the active Themeisle products | |
| 33 | +// load the latest sdk version from the active Themeisle products. | |
| 26 | 34 | if ( ! function_exists( 'themeisle_sdk_load_latest' ) ) : |
| 27 | 35 | /** |
| 28 | 36 | * Always load the latest sdk version. |
| 29 | 37 | */ |
| 30 | 38 | function themeisle_sdk_load_latest() { |
| 39 | + /** | |
| 40 | + * Don't load the library if we are on < 5.4. | |
| 41 | + */ | |
| 42 | + if ( version_compare( PHP_VERSION, '5.4.32', '<' ) ) { | |
| 43 | + return; | |
| 44 | + } | |
| 31 | 45 | global $themeisle_sdk_max_path; |
| 32 | 46 | require_once $themeisle_sdk_max_path . '/start.php'; |
| 33 | 47 | } |
| 34 | 48 | endif; |