PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 3.9.2
Visualizer – Tables & Charts Manager with Built-in AI Generator v3.9.2
4.0.8 4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.2 3.1.3 3.10.0 3.10.1 3.10.10 3.10.11 3.10.12 3.10.13 3.10.14 3.10.15 3.10.2 3.10.3 All 149 releases
← All changes | vendor/codeinwp/themeisle-sdk/load.php +16 -104 3.10.153.9.2 View file →
@@ -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.20';
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
@@ -89,10 +89,10 @@
89 89 $screen = function_exists( 'get_current_screen' ) ? get_current_screen() : $pagenow;
90 90 $current_page = isset( $screen->id ) ? $screen->id : ( ( $screen === null ) ? 'non-admin' : $screen );
91 91 $current_page = sanitize_key( str_replace( '.php', '', $current_page ) );
92 92 }
93 - $location = $location === null ? $current_page : $location;
94 - $content = sanitize_key(
93 + $location = $location === null ? $current_page : $location;
94 + $content = sanitize_key(
95 95 trim(
96 96 str_replace(
97 97 [
98 98 'https://',
@@ -101,29 +101,24 @@
101 101 '/plugins/',
102 102 '/upgrade',
103 103 ],
104 104 '',
105 - $url
105 + $url
106 106 ),
107 - '/'
108 - )
107 + '/'
108 + )
109 109 );
110 - $filter_key = sanitize_key( $content );
111 - $url_args = [
112 - 'utm_source' => 'wpadmin',
113 - 'utm_medium' => $location,
114 - 'utm_campaign' => $area,
115 - 'utm_content' => $content,
116 - ];
117 - $query_arguments = apply_filters( 'tsdk_utmify_' . $filter_key, $url_args, $url );
118 - $utmify_url = esc_url_raw(
110 + return esc_url_raw(
119 111 add_query_arg(
120 - $query_arguments,
121 - $url
122 - )
112 + [
113 + 'utm_source' => 'wpadmin',
114 + 'utm_medium' => $location,
115 + 'utm_campaign' => $area,
116 + 'utm_content' => $content,
117 + ],
118 + $url
119 + )
123 120 );
124 -
125 - return apply_filters( 'tsdk_utmify_url_' . $filter_key, $utmify_url, $url );
126 121 }
127 122
128 123 add_filter( 'tsdk_utmify', 'tsdk_utmify', 10, 3 );
129 124 }
@@ -175,89 +170,6 @@
175 170 * @return string Key.
176 171 */
177 172 function tsdk_lkey( $file ) {
178 173 return \ThemeisleSDK\Modules\Licenser::key( $file );
179 - }
180 -}
181 -
182 -if ( ! function_exists( 'tsdk_translate_link' ) ) {
183 -
184 - /**
185 - * Function to translate a link based on the current language.
186 - *
187 - * @param string $url URL to translate.
188 - * @param string{'path'|'query'|'domain'} $type Type of localization. Supports path, query and domain.
189 - * @param array $available_languages Available language to choose from.
190 - *
191 - * @return string
192 - */
193 - function tsdk_translate_link(
194 - $url, $type = 'path', $available_languages = [
195 - 'de_DE' => 'de',
196 - 'de_DE_formal' => 'de',
197 - ]
198 - ) {
199 - $language = get_user_locale();
200 - if ( ! isset( $available_languages[ $language ] ) ) {
201 - return $url;
202 - }
203 - $code = $available_languages[ $language ];
204 - // We asume that false is based on query and add the code via query arg.
205 - if ( $type === 'query' ) {
206 - return add_query_arg( 'lang', $code, $url );
207 - }
208 -
209 - $parsed_url = wp_parse_url( $url );
210 - // we replace the domain here based on the localized one.
211 - if ( $type === 'domain' ) {
212 - return $parsed_url['scheme'] . '://' . $code . ( isset( $parsed_url['path'] ) ? $parsed_url['path'] : '' ) . ( isset( $parsed_url['query'] ) ? '?' . $parsed_url['query'] : '' ) . ( isset( $parsed_url['fragment'] ) ? '#' . $parsed_url['fragment'] : '' );
213 - }
214 - // default is the path based approach.
215 - $new_path = isset( $parsed_url['path'] ) ? "/$code" . $parsed_url['path'] : "/$code";
216 -
217 - return $parsed_url['scheme'] . '://' . $parsed_url['host'] . $new_path . ( isset( $parsed_url['query'] ) ? '?' . $parsed_url['query'] : '' ) . ( isset( $parsed_url['fragment'] ) ? '#' . $parsed_url['fragment'] : '' );
218 -
219 - }
220 -}
221 -if ( ! function_exists( 'tsdk_support_link' ) ) {
222 -
223 - /**
224 - * Get Themeisle Support URL.
225 - *
226 - * @param string $file Product basefile.
227 - *
228 - * @return false|string Return support URL or false if no license is active.
229 - */
230 - function tsdk_support_link( $file ) {
231 -
232 - if ( ! did_action( 'init' ) ) {
233 - _doing_it_wrong( __FUNCTION__, 'tsdk_support_link() should not be called before the init action.', '3.2.39' );
234 - }
235 - $params = [];
236 - if ( ! tsdk_lis_valid( $file ) ) {
237 - return false;
238 - }
239 - $product = \ThemeisleSDK\Product::get( $file );
240 - if ( ! $product->requires_license() ) {
241 - return false;
242 - }
243 - static $site_params = null;
244 - if ( $site_params === null ) {
245 - if ( is_user_logged_in() && function_exists( 'wp_get_current_user' ) ) {
246 - $current_user = wp_get_current_user();
247 - $site_params['semail'] = urlencode( $current_user->user_email );
248 - }
249 - $site_params['swb'] = urlencode( home_url() );
250 - global $wp_version;
251 - $site_params['snv'] = urlencode( sprintf( 'WP-%s-PHP-%s', $wp_version, ( PHP_MAJOR_VERSION . '.' . PHP_MINOR_VERSION ) ) );
252 - }
253 - $params['slkey'] = tsdk_lkey( $file );
254 - $params['sprd'] = urlencode( $product->get_name() );
255 - $params['svrs'] = urlencode( $product->get_version() );
256 -
257 -
258 - return add_query_arg(
259 - array_merge( $site_params, $params ),
260 - 'https://store.themeisle.com/direct-support/'
261 - );
262 174 }
263 175 }