PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 3.11.8
Visualizer – Tables & Charts Manager with Built-in AI Generator v3.11.8
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/src/Loader.php +12 -134 4.0.33.11.8 View file →
@@ -63,9 +63,8 @@
63 63 'about_us',
64 64 'announcements',
65 65 'featured_plugins',
66 66 'float_widget',
67 - 'migrator',
68 67 ];
69 68 /**
70 69 * Holds the labels for the modules.
71 70 *
@@ -72,13 +71,12 @@
72 71 * @var array The labels for the modules.
73 72 */
74 73 public static $labels = [
75 74 'announcements' => [
76 - 'notice_link_label' => 'See the deals',
77 - 'max_savings' => 'Best WordPress Black Friday deals of %s — themes, plugins, hosting. Curated by the Themeisle team.',
78 - 'black_friday' => 'Black Friday Sale',
79 - 'time_left' => '%s left',
80 - 'plugin_meta_message' => 'Black Friday Sale - 60% OFF',
75 + 'hurry_up' => 'Hurry up! Only %s left.',
76 + 'sale_live' => 'Themeisle Black Friday Sale is Live!',
77 + 'learn_more' => 'Learn more',
78 + 'max_savings' => 'Enjoy Maximum Savings on %s',
81 79 ],
82 80 'compatibilities' => [
83 81 'notice' => '%s requires a newer version of %s. Please %supdate%s %s %s to the latest version.',
84 82 'notice2' => '%s update requires a newer version of %s. Please %supdate%s %s %s.',
@@ -109,16 +107,12 @@
109 107 'autoactivate_notice' => '%s has been successfully activated using %s license !',
110 108 'valid' => 'Valid',
111 109 'invalid' => 'Invalid',
112 110 'notice' => 'Enter your license from %s purchase history in order to get %s updates',
113 - 'expired' => '%s license expired',
114 - 'expired_date' => 'Expired on %s',
115 - 'expired_notice' => 'Your current setup continues working, but premium features are disabled and you\'re no longer receive updates - including critical patches - or support.',
111 + 'expired' => 'Your %s\'s License Key has expired. In order to continue receiving support and software updates you must %srenew%s your license key.',
116 112
117 113 'inactive' => 'In order to benefit from updates and support for %s, please add your license code from your %spurchase history%s and validate it %shere%s.',
118 114 'no_activations' => 'No more activations left for %s. You need to upgrade your plan in order to use %s on more websites. If you need assistance, please get in touch with %s staff.',
119 - 'renew_license' => 'Renew License',
120 - 'learn_more' => 'Learn More',
121 115 ],
122 116 'promotions' => [
123 117 'recommended' => 'Recommended by %s',
124 118 'installActivate' => 'Install & Activate',
@@ -143,15 +137,8 @@
143 137 'spark_desc1' => 'Loyalize your customers by allowing them to save their favorite products.',
144 138 'spark_desc2' => 'Add a top notification bar on your website to highlight the latest products, offers, or upcoming events.',
145 139 'spark_desc3' => 'Enable an advanced review section, enlarging the basic review options with lots of capabilities.',
146 140 ],
147 -
148 - 'feedzy' => [
149 - 'import_desc' => 'Schedule automatic content imports from any RSS feed directly to your site. %sBuilt by %s%s',
150 - 'install_now' => 'Install Now',
151 - 'by' => 'by %s',
152 - 'editor_recommends' => '%s recommends %sFeedzy%s to display entries from any RSS feed with more advanced styling and filtering options.',
153 - ],
154 141 'optimole' => [
155 142 'installOptimole' => 'Install Optimole',
156 143 'gotodash' => 'Go to Optimole dashboard',
157 144 'dismisscta' => 'Dismiss this notice.',
@@ -177,14 +164,8 @@
177 164 'install' => 'Install WP Full Pay',
178 165 'dismisscta' => 'Dismiss this notice.',
179 166 'message' => 'Enhance your donation page with WP Full Pay—create custom Stripe forms for one-time and recurring donations, manage transactions easily, and boost support with a seamless setup.',
180 167 ],
181 - 'masteriyo' => [
182 - 'gotodash' => 'Go to Masteriyo Dashboard',
183 - 'install' => 'Install Masteriyo',
184 - 'dismisscta' => 'Dismiss this notice.',
185 - 'message' => 'Transform your site into a learning hub with Masteriyo LMS. Build engaging courses with intuitive tools, track student progress effortlessly, and grow your education business with powerful marketing features and seamless payment integration.',
186 - ],
187 168 ],
188 169 'welcome' => [
189 170 'ctan' => 'No, thanks.',
190 171 'ctay' => 'Upgrade Now!',
@@ -254,11 +235,11 @@
254 235 'rollback' => [
255 236 'cta' => 'Rollback to v%s',
256 237 ],
257 238 'logger' => [
258 - 'notice' => 'Help improve <b>{product}</b> by sharing anonymous usage data about your setup. No personal data collected.',
259 - 'cta_y' => 'Count me in',
260 - 'cta_n' => 'No thanks',
239 + 'notice' => 'Do you enjoy <b>{product}</b>? Become a contributor by opting in to our anonymous data tracking. We guarantee no sensitive data is collected.',
240 + 'cta_y' => 'Sure, I would love to help.',
241 + 'cta_n' => 'No, thanks.',
261 242 ],
262 243 'about_us' => [
263 244 'title' => 'About Us',
264 245 'heroHeader' => 'Our Story',
@@ -336,9 +317,12 @@
336 317 /**
337 318 * Initialize the sdk logic.
338 319 */
339 320 public static function init() {
340 - self::localize_labels();
321 + /**
322 + * This filter can be used to localize the labels inside each product.
323 + */
324 + self::$labels = apply_filters( 'themeisle_sdk_labels', self::$labels );
341 325 if ( ! isset( self::$instance ) && ! ( self::$instance instanceof Loader ) ) {
342 326 self::$instance = new Loader();
343 327 $modules = array_merge( self::$available_modules, apply_filters( 'themeisle_sdk_modules', [] ) );
344 328 foreach ( $modules as $key => $module ) {
@@ -346,96 +330,12 @@
346 330 unset( $modules[ $key ] );
347 331 }
348 332 }
349 333 self::$available_modules = $modules;
350 -
351 - add_action( 'themeisle_sdk_first_activation', array( __CLASS__, 'activate' ) );
352 -
353 334 }
354 335 }
355 -
356 - /**
357 - * Localize the labels.
358 - */
359 - public static function localize_labels() {
360 - $originals = self::$labels;
361 - $all_translations = [];
362 336
363 - global $wp_filter;
364 - if ( isset( $wp_filter['themeisle_sdk_labels'] ) ) {
365 - foreach ( $wp_filter['themeisle_sdk_labels']->callbacks as $priority => $hooks ) {
366 - foreach ( $hooks as $hook ) {
367 - // Each callback gets fresh originals, not previous callback's output
368 - $result = call_user_func( $hook['function'], $originals );
369 - $all_translations[] = $result;
370 - }
371 - }
372 -
373 - // Remove the filter so it doesn't run again via apply_filters
374 - remove_all_filters( 'themeisle_sdk_labels' );
375 - }
376 -
377 - // Merge all results, first real translation wins
378 - self::$labels = self::merge_all_translations( $originals, $all_translations );
379 - }
380 337 /**
381 - * Merge all translations.
382 - *
383 - * @param array $originals The original labels.
384 - * @param array $all_translations The all translations.
385 - *
386 - * @return array The merged labels.
387 - */
388 - private static function merge_all_translations( $originals, $all_translations ) {
389 - $result = $originals;
390 -
391 - foreach ( $all_translations as $translations ) {
392 - $result = self::merge_if_translated( $result, $translations, $originals );
393 - }
394 -
395 - return $result;
396 - }
397 - /**
398 - * Merge if translated.
399 - *
400 - * @param array $current The current labels.
401 - * @param array $new The new labels.
402 - * @param array $originals The original labels.
403 - * @return array The merged labels.
404 - */
405 - private static function merge_if_translated( $current, $new, $originals ) {
406 - foreach ( $new as $key => $value ) {
407 - if ( ! isset( $originals[ $key ] ) ) {
408 - // New key, accept it
409 - if ( ! isset( $current[ $key ] ) ) {
410 - $current[ $key ] = $value;
411 - }
412 - continue;
413 - }
414 -
415 - if ( is_array( $value ) && is_array( $originals[ $key ] ) ) {
416 - $current[ $key ] = self::merge_if_translated(
417 - $current[ $key ],
418 - $value,
419 - $originals[ $key ]
420 - );
421 - } else {
422 - // Only accept if:
423 - // 1. New value is actually translated (differs from original)
424 - // 2. Current value is NOT already translated
425 - $is_new_translated = ( $value !== $originals[ $key ] );
426 - $is_current_untranslated = ( $current[ $key ] === $originals[ $key ] );
427 -
428 - if ( $is_new_translated && $is_current_untranslated ) {
429 - $current[ $key ] = $value;
430 - }
431 - }
432 - }
433 -
434 - return $current;
435 - }
436 -
437 - /**
438 338 * Get cache token used in API requests.
439 339 *
440 340 * @return string Cache token.
441 341 */
@@ -476,30 +376,8 @@
476 376
477 377 return self::$instance;
478 378 }
479 379
480 - /**
481 - * Activate the product routine.
482 - *
483 - * @param string $file The base file of the product.
484 - *
485 - * @return void
486 - */
487 - public static function activate( $file ) {
488 -
489 - $dirname = trailingslashit( dirname( ( $file ) ) );
490 - if ( ! file_exists( $dirname . '_reference.php' ) ) {
491 - return;
492 - }
493 - $reference_data = require_once $dirname . '_reference.php';
494 - if ( ! is_array( $reference_data ) ||
495 - ! isset( $reference_data['key'] ) ||
496 - ! isset( $reference_data['value'] ) ||
497 - ! preg_match( '/^[a-zA-Z0-9_]+_reference_key$/', $reference_data['key'] ) ) {
498 - return;
499 - }
500 - add_option( $reference_data['key'], sanitize_key( $reference_data['value'] ) );
501 - }
502 380 /**
503 381 * Get all registered modules by the SDK.
504 382 *
505 383 * @return array Modules available.