Changeset 3100441
- Timestamp:
- 06/10/2024 10:23:00 AM (22 months ago)
- Location:
- clonable
- Files:
-
- 108 added
- 13 edited
-
tags/2.1.15 (added)
-
tags/2.1.15/Bootstrap.php (added)
-
tags/2.1.15/clonable-wp.php (added)
-
tags/2.1.15/controllers (added)
-
tags/2.1.15/controllers/Controller.php (added)
-
tags/2.1.15/controllers/GeneralSettingController.php (added)
-
tags/2.1.15/controllers/LandingPageController.php (added)
-
tags/2.1.15/controllers/LanguageSwitcherController.php (added)
-
tags/2.1.15/controllers/LanguageTagController.php (added)
-
tags/2.1.15/controllers/WoocommerceController.php (added)
-
tags/2.1.15/controllers/index.php (added)
-
tags/2.1.15/helpers (added)
-
tags/2.1.15/helpers/Functions.php (added)
-
tags/2.1.15/helpers/Html.php (added)
-
tags/2.1.15/helpers/Json.php (added)
-
tags/2.1.15/helpers/Locales.php (added)
-
tags/2.1.15/helpers/Session.php (added)
-
tags/2.1.15/helpers/clonable-locales-list.php (added)
-
tags/2.1.15/helpers/index.php (added)
-
tags/2.1.15/images (added)
-
tags/2.1.15/images/clonable-full-logo.png (added)
-
tags/2.1.15/images/clonable.png (added)
-
tags/2.1.15/images/flags.png (added)
-
tags/2.1.15/images/index.php (added)
-
tags/2.1.15/index.php (added)
-
tags/2.1.15/middleware (added)
-
tags/2.1.15/middleware/Auth.php (added)
-
tags/2.1.15/middleware/ClonedSite.php (added)
-
tags/2.1.15/middleware/MiddlewareHandler.php (added)
-
tags/2.1.15/middleware/MiddlewareInterface.php (added)
-
tags/2.1.15/middleware/WooCommerce.php (added)
-
tags/2.1.15/middleware/index.php (added)
-
tags/2.1.15/models (added)
-
tags/2.1.15/models/ApiKey.php (added)
-
tags/2.1.15/models/ClonableWooCommerce.php (added)
-
tags/2.1.15/models/ClonedSite.php (added)
-
tags/2.1.15/models/LanguageSwitcher.php (added)
-
tags/2.1.15/models/LanguageTag.php (added)
-
tags/2.1.15/models/Site.php (added)
-
tags/2.1.15/models/index.php (added)
-
tags/2.1.15/objects (added)
-
tags/2.1.15/objects/ApiResponse.php (added)
-
tags/2.1.15/objects/ClonableConfig.php (added)
-
tags/2.1.15/objects/ClonableResponse.php (added)
-
tags/2.1.15/objects/CurlBuilder.php (added)
-
tags/2.1.15/objects/ExcludedProductTerm.php (added)
-
tags/2.1.15/objects/Notification.php (added)
-
tags/2.1.15/objects/index.php (added)
-
tags/2.1.15/readme-da_DK.txt (added)
-
tags/2.1.15/readme-de_DE.txt (added)
-
tags/2.1.15/readme-es_ES.txt (added)
-
tags/2.1.15/readme-fr_FR.txt (added)
-
tags/2.1.15/readme-it_IT.txt (added)
-
tags/2.1.15/readme-nb_NO.txt (added)
-
tags/2.1.15/readme-nl_NL.txt (added)
-
tags/2.1.15/readme-sv_SE.txt (added)
-
tags/2.1.15/readme.txt (added)
-
tags/2.1.15/routes (added)
-
tags/2.1.15/routes/Router.php (added)
-
tags/2.1.15/routes/index.php (added)
-
tags/2.1.15/services (added)
-
tags/2.1.15/services/AllowedHostsService.php (added)
-
tags/2.1.15/services/ApiService.php (added)
-
tags/2.1.15/services/ClonableWooCommerceService.php (added)
-
tags/2.1.15/services/LanguageSwitcherService.php (added)
-
tags/2.1.15/services/LanguageTagService.php (added)
-
tags/2.1.15/services/SubfolderService.php (added)
-
tags/2.1.15/services/SyncService.php (added)
-
tags/2.1.15/services/index.php (added)
-
tags/2.1.15/services/modules (added)
-
tags/2.1.15/services/modules/DataPanelModule.php (added)
-
tags/2.1.15/services/modules/ExclusionModule.php (added)
-
tags/2.1.15/services/modules/ProductImporterModule.php (added)
-
tags/2.1.15/services/modules/TaxonomyModule.php (added)
-
tags/2.1.15/services/modules/index.php (added)
-
tags/2.1.15/traits (added)
-
tags/2.1.15/traits/Forms.php (added)
-
tags/2.1.15/traits/Validation.php (added)
-
tags/2.1.15/traits/WooCommerceCheck.php (added)
-
tags/2.1.15/traits/index.php (added)
-
tags/2.1.15/uninstall.php (added)
-
tags/2.1.15/views (added)
-
tags/2.1.15/views/GeneralSettingsView.php (added)
-
tags/2.1.15/views/LanguageSwitcherView.php (added)
-
tags/2.1.15/views/LanguageTagView.php (added)
-
tags/2.1.15/views/Layout.php (added)
-
tags/2.1.15/views/OnboardingView.php (added)
-
tags/2.1.15/views/ViewInterface.php (added)
-
tags/2.1.15/views/WoocommerceView.php (added)
-
tags/2.1.15/views/css (added)
-
tags/2.1.15/views/css/clonable-extra-button.css (added)
-
tags/2.1.15/views/css/clonable-global.css (added)
-
tags/2.1.15/views/css/clonable-woocommerce.css (added)
-
tags/2.1.15/views/css/clonable.css (added)
-
tags/2.1.15/views/css/fomantic-dropdown.css (added)
-
tags/2.1.15/views/css/fomantic-transition.css (added)
-
tags/2.1.15/views/css/freakflags.css (added)
-
tags/2.1.15/views/css/index.php (added)
-
tags/2.1.15/views/index.php (added)
-
tags/2.1.15/views/scripts (added)
-
tags/2.1.15/views/scripts/alpine.js (added)
-
tags/2.1.15/views/scripts/dohjs.js (added)
-
tags/2.1.15/views/scripts/fomantic-dropdown.js (added)
-
tags/2.1.15/views/scripts/fomantic-transition.js (added)
-
tags/2.1.15/views/scripts/index.php (added)
-
tags/2.1.15/views/scripts/onload.js (added)
-
tags/2.1.15/views/scripts/woocommerce-clone-field.js (added)
-
trunk/clonable-wp.php (modified) (2 diffs)
-
trunk/helpers/Locales.php (modified) (1 diff)
-
trunk/helpers/clonable-locales-list.php (added)
-
trunk/readme-da_DK.txt (modified) (2 diffs)
-
trunk/readme-de_DE.txt (modified) (2 diffs)
-
trunk/readme-es_ES.txt (modified) (2 diffs)
-
trunk/readme-fr_FR.txt (modified) (2 diffs)
-
trunk/readme-it_IT.txt (modified) (2 diffs)
-
trunk/readme-nb_NO.txt (modified) (2 diffs)
-
trunk/readme-nl_NL.txt (modified) (2 diffs)
-
trunk/readme-sv_SE.txt (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/services/ApiService.php (modified) (2 diffs)
-
trunk/services/modules/TaxonomyModule.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
clonable/trunk/clonable-wp.php
r3088207 r3100441 5 5 Description: Official plugin for improving your clones made with Clonable. 6 6 Plugin URI: https://kb.clonable.net/en/introduction/getting-started/wordpress#de-clonable-plug-in-downloaden 7 Version: 2.1.1 47 Version: 2.1.15 8 8 Author: Clonable BV 9 9 Author URI: https://www.clonable.net 10 10 License: GPL v2 or later 11 11 Requires PHP: 7.0 12 Tested up to: 6.5. 312 Tested up to: 6.5.4 13 13 */ 14 14 … … 97 97 98 98 define('CLONABLE_NAME', 'Clonable'); 99 define('CLONABLE_VERSION', '2.1.1 4');99 define('CLONABLE_VERSION', '2.1.15'); 100 100 101 101 try { -
clonable/trunk/helpers/Locales.php
r3083114 r3100441 38 38 return $mapped_locales; 39 39 } 40 41 /** 42 * Return a list of hardcodes locales as the locales API would return. 43 * 44 * Was added for performance improvement. 45 * @return array 46 */ 47 public static function get_all() { 48 return include 'clonable-locales-list.php'; 49 } 40 50 } -
clonable/trunk/readme-da_DK.txt
r3088207 r3100441 3 3 Tags: oversættelser, oversæt, flersproget, clonable, seo, hreflang, undermappe, oversættelse 4 4 Requires at least: 5.0 5 Tested up to: 6.5. 35 Tested up to: 6.5.4 6 6 Requires PHP: 7.0 7 Stable tag: 2.1.1 47 Stable tag: 2.1.15 8 8 License: GPL v2 or later 9 9 … … 32 32 33 33 == Changelog == 34 v2.1.15 35 Forbedringer af ydeevnen for API-kommunikation 36 34 37 v2.1.14 35 38 Bugfix: Fix af debounce-algoritme -
clonable/trunk/readme-de_DE.txt
r3088207 r3100441 3 3 Tags: Übersetzungen, übersetzen, mehrsprachig, clonable, seo, hreflang, subfolder, Übersetzung 4 4 Requires at least: 5.0 5 Tested up to: 6.5. 35 Tested up to: 6.5.4 6 6 Requires PHP: 7.0 7 Stable tag: 2.1.1 47 Stable tag: 2.1.15 8 8 License: GPL v2 or later 9 9 … … 32 32 33 33 == Changelog == 34 v2.1.15 35 Leistungsverbesserungen für die API-Kommunikation 36 34 37 v2.1.14 35 38 Bugfix: Entprellungsalgorithmus korrigiert -
clonable/trunk/readme-es_ES.txt
r3088207 r3100441 3 3 Tags: traducciones, traducir, multilingüe, clonable, seo, hreflang, subcarpeta, traducción 4 4 Requires at least: 5.0 5 Tested up to: 6.5. 35 Tested up to: 6.5.4 6 6 Requires PHP: 7.0 7 Stable tag: 2.1.1 47 Stable tag: 2.1.15 8 8 License: GPL v2 or later 9 9 … … 32 32 33 33 == Changelog == 34 v2.1.15 35 Mejoras en el rendimiento de la comunicación API 36 34 37 v2.1.14 35 38 Corrección de errores: Corrección del algoritmo de rebote -
clonable/trunk/readme-fr_FR.txt
r3088207 r3100441 3 3 Tags : traductions, traduire, multilingue, clonable, seo, hreflang, sous-dossier, traduction 4 4 Requires at least: 5.0 5 Tested up to: 6.5. 35 Tested up to: 6.5.4 6 6 Requires PHP: 7.0 7 Stable tag: 2.1.1 47 Stable tag: 2.1.15 8 8 License: GPL v2 or later 9 9 … … 32 32 33 33 == Changelog == 34 v2.1.15 35 Amélioration des performances pour la communication avec l'API 36 34 37 v2.1.14 35 38 Bugfix : Correction de l'algorithme Debounce -
clonable/trunk/readme-it_IT.txt
r3088207 r3100441 3 3 Tags: traduzioni, tradurre, multilingue, clonable, seo, hreflang, sottocartella, traduzione 4 4 Requires at least: 5.0 5 Tested up to: 6.5. 35 Tested up to: 6.5.4 6 6 Requires PHP: 7.0 7 Stable tag: 2.1.1 47 Stable tag: 2.1.15 8 8 License: GPL v2 or later 9 9 … … 32 32 33 33 == Changelog == 34 v2.1.15 35 Miglioramenti delle prestazioni per la comunicazione API 36 34 37 v2.1.14 35 38 Correzione di bug: correzione dell'algoritmo di rimbalzo -
clonable/trunk/readme-nb_NO.txt
r3088207 r3100441 3 3 Tags: oversettelser, oversette, flerspråklig, clonable, seo, hreflang, undermappe, oversettelse 4 4 Requires at least: 5.0 5 Tested up to: 6.5. 35 Tested up to: 6.5.4 6 6 Requires PHP: 7.0 7 Stable tag: 2.1.1 47 Stable tag: 2.1.15 8 8 License: GPL v2 or later 9 9 … … 32 32 33 33 == Changelog == 34 v2.1.15 35 Forbedret ytelse for API-kommunikasjon 36 34 37 v2.1.14 35 38 Feilretting: Retting av debounce-algoritme -
clonable/trunk/readme-nl_NL.txt
r3088207 r3100441 3 3 Tags: vertalingen, vertalen, meertalig, clonable, seo, hreflang, submap, vertaling 4 4 Requires at least: 5.0 5 Tested up to: 6.5. 35 Tested up to: 6.5.4 6 6 Requires PHP: 7.0 7 Stable tag: 2.1.1 47 Stable tag: 2.1.15 8 8 License: GPL v2 or later 9 9 … … 32 32 33 33 == Changelog == 34 v2.1.15 35 Prestatieverbeteringen voor API-communicatie 36 34 37 v2.1.14 35 38 Bugfix: Debounce algoritme fix -
clonable/trunk/readme-sv_SE.txt
r3088207 r3100441 3 3 Tags: översättningar, översätta, flerspråkig, clonable, seo, hreflang, undermapp, översättning 4 4 Requires at least: 5.0 5 Tested up to: 6.5. 35 Tested up to: 6.5.4 6 6 Requires PHP: 7.0 7 Stable tag: 2.1.1 47 Stable tag: 2.1.15 8 8 License: GPL v2 or later 9 9 … … 32 32 33 33 == Changelog == 34 v2.1.15 35 Prestandaförbättringar för API-kommunikation 36 34 37 v2.1.14 35 38 Buggfix: Debounce-algoritm fixad -
clonable/trunk/readme.txt
r3088207 r3100441 3 3 Tags: translations, translate, multilingual, clonable, seo, hreflang, subfolder, translation 4 4 Requires at least: 5.0 5 Tested up to: 6.5. 35 Tested up to: 6.5.4 6 6 Requires PHP: 7.0 7 Stable tag: 2.1.1 47 Stable tag: 2.1.15 8 8 License: GPL v2 or later 9 9 … … 32 32 33 33 == Changelog == 34 v2.1.15 35 Performance improvements for API communication 36 34 37 v2.1.14 35 38 Bugfix: Debounce algorithm fix -
clonable/trunk/services/ApiService.php
r3058276 r3100441 3 3 namespace Clonable\Services; 4 4 5 use Clonable\Helpers\Locales; 5 6 use Clonable\Objects\ApiResponse; 6 7 use Clonable\Objects\ClonableConfig; … … 106 107 */ 107 108 public static function get_locales() { 108 $locales = get_transient('clonable_available_locales'); 109 $error = ($locales['message'] ?? null); 110 if ($locales === false || $error != null) { 111 try { 112 $api_key = self::resolve_key(); 113 $response = self::make_request("/locales", $api_key); 114 set_transient('clonable_available_locales', $response, 86400); 115 return $response; 116 } catch (Exception $exception) { 117 error_log("[Clonable] Error while retrieving the languages from Clonable: " . $exception->getMessage()); 118 // if by any chance an error occurs, at least return some locales so the entire plugin isn't unusable. 119 return [ 120 // phpcs:disable WordPress.Arrays.ArrayDeclarationSpacing.AssociativeArrayFound 121 [ "locale" => "nl_NL", "display_name" => "Dutch (Netherlands)", "region" => "NL" ], 122 [ "locale" => "en_GB", "display_name" => "English (United Kingdom)", "region" => "GB" ], 123 [ "locale" => "de_DE", "display_name" => "German (Germany)", "region" => "DE" ], 124 [ "locale" => "fr_FR", "display_name" => "French (France)", "region" => "FR "], 125 [ "locale" => "es_ES", "display_name" => "Spanish (Spain)", "region" => "ES" ], 126 // phpcs:enable WordPress.Arrays.ArrayDeclarationSpacing.AssociativeArrayFound 127 ]; 128 } 129 } else { 130 return $locales; 131 } 109 return Locales::get_all(); 132 110 } 133 111 -
clonable/trunk/services/modules/TaxonomyModule.php
r3012325 r3100441 57 57 foreach (ClonableConfig::get_clones() as $clone) { 58 58 $name = Locales::get_display_name($clone['lang_code']); 59 if (term_exists($name, ClonableConfig::WOOCOMMERCE_TAXONOMY)) { 60 continue; 61 } 62 59 63 // create a term for each clone, terms are identified by their slug. 60 64 wp_insert_term(sprintf("Excluded from %s", $name), $taxonomy->name, array( … … 68 72 if ($site != null) { 69 73 $name = Locales::get_display_name($site->get_locale()); 70 wp_insert_term(sprintf("Excluded from %s", $name), $taxonomy->name, array( 71 'description' => "This is the original shop, this product is not available for $name.", 72 'slug' => sprintf(ClonableConfig::WOOCOMMERCE_QUERY_ID, $site->get_id()), 73 )); 74 if (!term_exists($name, ClonableConfig::WOOCOMMERCE_TAXONOMY)) { 75 wp_insert_term(sprintf("Excluded from %s", $name), $taxonomy->name, array( 76 'description' => "This is the original shop, this product is not available for $name.", 77 'slug' => sprintf(ClonableConfig::WOOCOMMERCE_QUERY_ID, $site->get_id()), 78 )); 79 } 74 80 } 75 81 }
Note: See TracChangeset
for help on using the changeset viewer.