PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 3.11.14
Visualizer – Tables & Charts Manager with Built-in AI Generator v3.11.14
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 -133 4.0.53.11.14 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 + 'notice_link_label' => 'See the Offer',
76 + 'max_savings' => 'Our biggest sale of the year: <strong>%s OFF everything!</strong> Don\'t miss this limited-time offer.',
77 + 'black_friday' => 'Black Friday Sale',
78 + 'time_left' => '%s left',
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',
@@ -254,11 +248,11 @@
254 248 'rollback' => [
255 249 'cta' => 'Rollback to v%s',
256 250 ],
257 251 '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',
252 + '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.',
253 + 'cta_y' => 'Sure, I would love to help.',
254 + 'cta_n' => 'No, thanks.',
261 255 ],
262 256 'about_us' => [
263 257 'title' => 'About Us',
264 258 'heroHeader' => 'Our Story',
@@ -267,44 +261,8 @@
267 261 'teamImageCaption' => 'Our team in WCEU2022 in Portugal',
268 262 'newsHeading' => 'Stay connected for news & updates!',
269 263 'emailPlaceholder' => 'Your email address',
270 264 'signMeUp' => 'Sign me up',
271 - 'services' => [
272 - 'ariaLabel' => 'Themeisle services',
273 - 'trustpilotLabel' => 'Rated excellent on Trustpilot',
274 - 'trustpilotRated' => 'Rated',
275 - 'trustpilotOn' => 'on',
276 - 'trustpilotBrand' => 'Trustpilot',
277 - 'heading' => 'Expert WordPress services from the Themeisle team',
278 - 'description' => 'Done for you by the same people who build your plugins and themes.',
279 - 'cta' => 'Explore all services',
280 - 'items' => [
281 - 'websiteDesign' => [
282 - 'title' => 'Website Design',
283 - 'subtitle' => 'Built for your business',
284 - ],
285 - 'support' => [
286 - 'title' => 'Support',
287 - 'subtitle' => 'On-demand expert help',
288 - ],
289 - 'speed' => [
290 - 'title' => 'Speed Optimization',
291 - 'subtitle' => 'Core Web Vitals boost',
292 - ],
293 - 'seo' => [
294 - 'title' => 'SEO Foundation',
295 - 'subtitle' => 'Rank & get found',
296 - ],
297 - 'maintenance' => [
298 - 'title' => 'Maintenance',
299 - 'subtitle' => 'Updates, backups, security',
300 - ],
301 - 'hackedSite' => [
302 - 'title' => 'Hacked Site Repair',
303 - 'subtitle' => 'Malware removed fast',
304 - ],
305 - ],
306 - ],
307 265 'installNow' => 'Install Now',
308 266 'activate' => 'Activate',
309 267 'learnMore' => 'Learn More',
310 268 'installed' => 'Installed',
@@ -372,9 +330,12 @@
372 330 /**
373 331 * Initialize the sdk logic.
374 332 */
375 333 public static function init() {
376 - self::localize_labels();
334 + /**
335 + * This filter can be used to localize the labels inside each product.
336 + */
337 + self::$labels = apply_filters( 'themeisle_sdk_labels', self::$labels );
377 338 if ( ! isset( self::$instance ) && ! ( self::$instance instanceof Loader ) ) {
378 339 self::$instance = new Loader();
379 340 $modules = array_merge( self::$available_modules, apply_filters( 'themeisle_sdk_modules', [] ) );
380 341 foreach ( $modules as $key => $module ) {
@@ -384,91 +345,9 @@
384 345 }
385 346 self::$available_modules = $modules;
386 347
387 348 add_action( 'themeisle_sdk_first_activation', array( __CLASS__, 'activate' ) );
388 -
389 349 }
390 - }
391 -
392 - /**
393 - * Localize the labels.
394 - */
395 - public static function localize_labels() {
396 - $originals = self::$labels;
397 - $all_translations = [];
398 -
399 - global $wp_filter;
400 - if ( isset( $wp_filter['themeisle_sdk_labels'] ) ) {
401 - foreach ( $wp_filter['themeisle_sdk_labels']->callbacks as $priority => $hooks ) {
402 - foreach ( $hooks as $hook ) {
403 - // Each callback gets fresh originals, not previous callback's output
404 - $result = call_user_func( $hook['function'], $originals );
405 - $all_translations[] = $result;
406 - }
407 - }
408 -
409 - // Remove the filter so it doesn't run again via apply_filters
410 - remove_all_filters( 'themeisle_sdk_labels' );
411 - }
412 -
413 - // Merge all results, first real translation wins
414 - self::$labels = self::merge_all_translations( $originals, $all_translations );
415 - }
416 - /**
417 - * Merge all translations.
418 - *
419 - * @param array $originals The original labels.
420 - * @param array $all_translations The all translations.
421 - *
422 - * @return array The merged labels.
423 - */
424 - private static function merge_all_translations( $originals, $all_translations ) {
425 - $result = $originals;
426 -
427 - foreach ( $all_translations as $translations ) {
428 - $result = self::merge_if_translated( $result, $translations, $originals );
429 - }
430 -
431 - return $result;
432 - }
433 - /**
434 - * Merge if translated.
435 - *
436 - * @param array $current The current labels.
437 - * @param array $new The new labels.
438 - * @param array $originals The original labels.
439 - * @return array The merged labels.
440 - */
441 - private static function merge_if_translated( $current, $new, $originals ) {
442 - foreach ( $new as $key => $value ) {
443 - if ( ! isset( $originals[ $key ] ) ) {
444 - // New key, accept it
445 - if ( ! isset( $current[ $key ] ) ) {
446 - $current[ $key ] = $value;
447 - }
448 - continue;
449 - }
450 -
451 - if ( is_array( $value ) && is_array( $originals[ $key ] ) ) {
452 - $current[ $key ] = self::merge_if_translated(
453 - $current[ $key ],
454 - $value,
455 - $originals[ $key ]
456 - );
457 - } else {
458 - // Only accept if:
459 - // 1. New value is actually translated (differs from original)
460 - // 2. Current value is NOT already translated
461 - $is_new_translated = ( $value !== $originals[ $key ] );
462 - $is_current_untranslated = ( $current[ $key ] === $originals[ $key ] );
463 -
464 - if ( $is_new_translated && $is_current_untranslated ) {
465 - $current[ $key ] = $value;
466 - }
467 - }
468 - }
469 -
470 - return $current;
471 350 }
472 351
473 352 /**
474 353 * Get cache token used in API requests.