| @@ -13,9 +13,9 @@ | ||
| 13 | 13 | if ( ! defined( 'ABSPATH' ) ) { |
| 14 | 14 | return; |
| 15 | 15 | } |
| 16 | 16 | // Current SDK version and path. |
| 17 | -$themeisle_sdk_version = '3.3.0'; | |
| 17 | +$themeisle_sdk_version = '3.2.30'; | |
| 18 | 18 | $themeisle_sdk_path = dirname( __FILE__ ); |
| 19 | 19 | |
| 20 | 20 | global $themeisle_sdk_max_version; |
| 21 | 21 | global $themeisle_sdk_max_path; |
| @@ -28,9 +28,9 @@ | ||
| 28 | 28 | $themeisle_sdk_abs_licenser_path = $themeisle_sdk_max_path . $themeisle_sdk_relative_licenser_path; |
| 29 | 29 | add_filter( 'themeisle_sdk_required_files', 'themeisle_sdk_load_licenser_if_present' ); |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | -if ( ( is_null( $themeisle_sdk_max_path ) || version_compare( $themeisle_sdk_version, $themeisle_sdk_max_version ) == 0 ) && | |
| 32 | +if ( ( is_null( $themeisle_sdk_max_path ) || version_compare( $themeisle_sdk_version, $themeisle_sdk_max_path ) == 0 ) && | |
| 33 | 33 | apply_filters( 'themeisle_sdk_should_overwrite_path', false, $themeisle_sdk_path, $themeisle_sdk_max_path ) ) { |
| 34 | 34 | $themeisle_sdk_max_path = $themeisle_sdk_path; |
| 35 | 35 | } |
| 36 | 36 | |
| @@ -170,49 +170,6 @@ | ||
| 170 | 170 | * @return string Key. |
| 171 | 171 | */ |
| 172 | 172 | function tsdk_lkey( $file ) { |
| 173 | 173 | return \ThemeisleSDK\Modules\Licenser::key( $file ); |
| 174 | - } | |
| 175 | -} | |
| 176 | -if ( ! function_exists( 'tsdk_support_link' ) ) { | |
| 177 | - | |
| 178 | - /** | |
| 179 | - * Get Themeisle Support URL. | |
| 180 | - * | |
| 181 | - * @param string $file Product basefile. | |
| 182 | - * | |
| 183 | - * @return false|string Return support URL or false if no license is active. | |
| 184 | - */ | |
| 185 | - function tsdk_support_link( $file ) { | |
| 186 | - | |
| 187 | - if ( ! did_action( 'init' ) ) { | |
| 188 | - _doing_it_wrong( __FUNCTION__, 'tsdk_support_link() should not be called before the init action.', '3.2.39' ); | |
| 189 | - } | |
| 190 | - $params = []; | |
| 191 | - if ( ! tsdk_lis_valid( $file ) ) { | |
| 192 | - return false; | |
| 193 | - } | |
| 194 | - $product = \ThemeisleSDK\Product::get( $file ); | |
| 195 | - if ( ! $product->requires_license() ) { | |
| 196 | - return false; | |
| 197 | - } | |
| 198 | - static $site_params = null; | |
| 199 | - if ( $site_params === null ) { | |
| 200 | - if ( is_user_logged_in() && function_exists( 'wp_get_current_user' ) ) { | |
| 201 | - $current_user = wp_get_current_user(); | |
| 202 | - $site_params['semail'] = urlencode( $current_user->user_email ); | |
| 203 | - } | |
| 204 | - $site_params['swb'] = urlencode( home_url() ); | |
| 205 | - global $wp_version; | |
| 206 | - $site_params['snv'] = urlencode( sprintf( 'WP-%s-PHP-%s', $wp_version, ( PHP_MAJOR_VERSION . '.' . PHP_MINOR_VERSION ) ) ); | |
| 207 | - } | |
| 208 | - $params['slkey'] = tsdk_lkey( $file ); | |
| 209 | - $params['sprd'] = urlencode( $product->get_name() ); | |
| 210 | - $params['svrs'] = urlencode( $product->get_version() ); | |
| 211 | - | |
| 212 | - | |
| 213 | - return add_query_arg( | |
| 214 | - array_merge( $site_params, $params ), | |
| 215 | - 'https://store.themeisle.com/direct-support/' | |
| 216 | - ); | |
| 217 | 174 | } |
| 218 | 175 | } |