PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 3.7.2
Visualizer – Tables & Charts Manager with Built-in AI Generator v3.7.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 +4 -154 3.10.123.7.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.18';
17 +$themeisle_sdk_version = '3.2.22';
18 18 $themeisle_sdk_path = dirname( __FILE__ );
19 19
20 20 global $themeisle_sdk_max_version;
21 21 global $themeisle_sdk_max_path;
@@ -23,19 +23,18 @@
23 23 // If this is the latest SDK and it comes from a theme, we should load licenser separately.
24 24 $themeisle_sdk_relative_licenser_path = '/src/Modules/Licenser.php';
25 25
26 26 global $themeisle_sdk_abs_licenser_path;
27 -if ( ! is_file( $themeisle_sdk_path . $themeisle_sdk_relative_licenser_path ) && ! empty( $themeisle_sdk_max_path ) && is_file( $themeisle_sdk_max_path . $themeisle_sdk_relative_licenser_path ) ) {
27 +if ( ! is_file( $themeisle_sdk_path . $themeisle_sdk_relative_licenser_path ) && is_file( $themeisle_sdk_max_path . $themeisle_sdk_relative_licenser_path ) ) {
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 -
32 -if ( ( is_null( $themeisle_sdk_max_path ) || version_compare( $themeisle_sdk_version, $themeisle_sdk_max_version ) == 0 ) &&
31 +if ( version_compare( $themeisle_sdk_version, $themeisle_sdk_max_path ) == 0 &&
33 32 apply_filters( 'themeisle_sdk_should_overwrite_path', false, $themeisle_sdk_path, $themeisle_sdk_max_path ) ) {
34 33 $themeisle_sdk_max_path = $themeisle_sdk_path;
35 34 }
36 35
37 -if ( is_null( $themeisle_sdk_max_version ) || version_compare( $themeisle_sdk_version, $themeisle_sdk_max_version ) > 0 ) {
36 +if ( version_compare( $themeisle_sdk_version, $themeisle_sdk_max_version ) > 0 ) {
38 37 $themeisle_sdk_max_version = $themeisle_sdk_version;
39 38 $themeisle_sdk_max_path = $themeisle_sdk_path;
40 39 }
41 40
@@ -70,153 +69,4 @@
70 69 require_once $themeisle_sdk_max_path . '/start.php';
71 70 }
72 71 endif;
73 72 add_action( 'init', 'themeisle_sdk_load_latest' );
74 -
75 -if ( ! function_exists( 'tsdk_utmify' ) ) {
76 - /**
77 - * Utmify a link.
78 - *
79 - * @param string $url URL to add utms.
80 - * @param string $area Area in page where this is used ( CTA, image, section name).
81 - * @param string $location Location, such as customizer, about page.
82 - *
83 - * @return string
84 - */
85 - function tsdk_utmify( $url, $area, $location = null ) {
86 - static $current_page = null;
87 - if ( $location === null && $current_page === null ) {
88 - global $pagenow;
89 - $screen = function_exists( 'get_current_screen' ) ? get_current_screen() : $pagenow;
90 - $current_page = isset( $screen->id ) ? $screen->id : ( ( $screen === null ) ? 'non-admin' : $screen );
91 - $current_page = sanitize_key( str_replace( '.php', '', $current_page ) );
92 - }
93 - $location = $location === null ? $current_page : $location;
94 - $content = sanitize_key(
95 - trim(
96 - str_replace(
97 - [
98 - 'https://',
99 - 'themeisle.com',
100 - '/themes/',
101 - '/plugins/',
102 - '/upgrade',
103 - ],
104 - '',
105 - $url
106 - ),
107 - '/'
108 - )
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(
119 - add_query_arg(
120 - $query_arguments,
121 - $url
122 - )
123 - );
124 - return apply_filters( 'tsdk_utmify_url_' . $filter_key, $utmify_url, $url );
125 - }
126 -
127 - add_filter( 'tsdk_utmify', 'tsdk_utmify', 10, 3 );
128 -}
129 -
130 -
131 -if ( ! function_exists( 'tsdk_lstatus' ) ) {
132 - /**
133 - * Check license status.
134 - *
135 - * @param string $file Product basefile.
136 - *
137 - * @return string Status.
138 - */
139 - function tsdk_lstatus( $file ) {
140 - return \ThemeisleSDK\Modules\Licenser::status( $file );
141 - }
142 -}
143 -if ( ! function_exists( 'tsdk_lis_valid' ) ) {
144 - /**
145 - * Check if license is valid.
146 - *
147 - * @param string $file Product basefile.
148 - *
149 - * @return bool Validness.
150 - */
151 - function tsdk_lis_valid( $file ) {
152 - return \ThemeisleSDK\Modules\Licenser::is_valid( $file );
153 - }
154 -}
155 -if ( ! function_exists( 'tsdk_lplan' ) ) {
156 - /**
157 - * Get license plan.
158 - *
159 - * @param string $file Product basefile.
160 - *
161 - * @return string Plan.
162 - */
163 - function tsdk_lplan( $file ) {
164 - return \ThemeisleSDK\Modules\Licenser::plan( $file );
165 - }
166 -}
167 -
168 -if ( ! function_exists( 'tsdk_lkey' ) ) {
169 - /**
170 - * Get license key.
171 - *
172 - * @param string $file Product basefile.
173 - *
174 - * @return string Key.
175 - */
176 - function tsdk_lkey( $file ) {
177 - return \ThemeisleSDK\Modules\Licenser::key( $file );
178 - }
179 -}
180 -if ( ! function_exists( 'tsdk_support_link' ) ) {
181 -
182 - /**
183 - * Get Themeisle Support URL.
184 - *
185 - * @param string $file Product basefile.
186 - *
187 - * @return false|string Return support URL or false if no license is active.
188 - */
189 - function tsdk_support_link( $file ) {
190 -
191 - if ( ! did_action( 'init' ) ) {
192 - _doing_it_wrong( __FUNCTION__, 'tsdk_support_link() should not be called before the init action.', '3.2.39' );
193 - }
194 - $params = [];
195 - if ( ! tsdk_lis_valid( $file ) ) {
196 - return false;
197 - }
198 - $product = \ThemeisleSDK\Product::get( $file );
199 - if ( ! $product->requires_license() ) {
200 - return false;
201 - }
202 - static $site_params = null;
203 - if ( $site_params === null ) {
204 - if ( is_user_logged_in() && function_exists( 'wp_get_current_user' ) ) {
205 - $current_user = wp_get_current_user();
206 - $site_params['semail'] = urlencode( $current_user->user_email );
207 - }
208 - $site_params['swb'] = urlencode( home_url() );
209 - global $wp_version;
210 - $site_params['snv'] = urlencode( sprintf( 'WP-%s-PHP-%s', $wp_version, ( PHP_MAJOR_VERSION . '.' . PHP_MINOR_VERSION ) ) );
211 - }
212 - $params['slkey'] = tsdk_lkey( $file );
213 - $params['sprd'] = urlencode( $product->get_name() );
214 - $params['svrs'] = urlencode( $product->get_version() );
215 -
216 -
217 - return add_query_arg(
218 - array_merge( $site_params, $params ),
219 - 'https://store.themeisle.com/direct-support/'
220 - );
221 - }
222 -}