Plugin Directory

Changeset 3100441


Ignore:
Timestamp:
06/10/2024 10:23:00 AM (22 months ago)
Author:
clonable
Message:

version 2.1.15

Location:
clonable
Files:
108 added
13 edited

Legend:

Unmodified
Added
Removed
  • clonable/trunk/clonable-wp.php

    r3088207 r3100441  
    55Description: Official plugin for improving your clones made with Clonable.
    66Plugin URI: https://kb.clonable.net/en/introduction/getting-started/wordpress#de-clonable-plug-in-downloaden
    7 Version: 2.1.14
     7Version: 2.1.15
    88Author: Clonable BV
    99Author URI: https://www.clonable.net
    1010License: GPL v2 or later
    1111Requires PHP: 7.0
    12 Tested up to: 6.5.3
     12Tested up to: 6.5.4
    1313*/
    1414
     
    9797
    9898define('CLONABLE_NAME', 'Clonable');
    99 define('CLONABLE_VERSION', '2.1.14');
     99define('CLONABLE_VERSION', '2.1.15');
    100100
    101101try {
  • clonable/trunk/helpers/Locales.php

    r3083114 r3100441  
    3838        return $mapped_locales;
    3939    }
     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    }
    4050}
  • clonable/trunk/readme-da_DK.txt

    r3088207 r3100441  
    33Tags: oversættelser, oversæt, flersproget, clonable, seo, hreflang, undermappe, oversættelse
    44Requires at least: 5.0
    5 Tested up to: 6.5.3
     5Tested up to: 6.5.4
    66Requires PHP: 7.0
    7 Stable tag: 2.1.14
     7Stable tag: 2.1.15
    88License: GPL v2 or later
    99
     
    3232
    3333== Changelog ==
     34v2.1.15
     35Forbedringer af ydeevnen for API-kommunikation
     36
    3437v2.1.14
    3538Bugfix: Fix af debounce-algoritme
  • clonable/trunk/readme-de_DE.txt

    r3088207 r3100441  
    33Tags: Übersetzungen, übersetzen, mehrsprachig, clonable, seo, hreflang, subfolder, Übersetzung
    44Requires at least: 5.0
    5 Tested up to: 6.5.3
     5Tested up to: 6.5.4
    66Requires PHP: 7.0
    7 Stable tag: 2.1.14
     7Stable tag: 2.1.15
    88License: GPL v2 or later
    99
     
    3232
    3333== Changelog ==
     34v2.1.15
     35Leistungsverbesserungen für die API-Kommunikation
     36
    3437v2.1.14
    3538Bugfix: Entprellungsalgorithmus korrigiert
  • clonable/trunk/readme-es_ES.txt

    r3088207 r3100441  
    33Tags: traducciones, traducir, multilingüe, clonable, seo, hreflang, subcarpeta, traducción
    44Requires at least: 5.0
    5 Tested up to: 6.5.3
     5Tested up to: 6.5.4
    66Requires PHP: 7.0
    7 Stable tag: 2.1.14
     7Stable tag: 2.1.15
    88License: GPL v2 or later
    99
     
    3232
    3333== Changelog ==
     34v2.1.15
     35Mejoras en el rendimiento de la comunicación API
     36
    3437v2.1.14
    3538Corrección de errores: Corrección del algoritmo de rebote
  • clonable/trunk/readme-fr_FR.txt

    r3088207 r3100441  
    33Tags : traductions, traduire, multilingue, clonable, seo, hreflang, sous-dossier, traduction
    44Requires at least: 5.0
    5 Tested up to: 6.5.3
     5Tested up to: 6.5.4
    66Requires PHP: 7.0
    7 Stable tag: 2.1.14
     7Stable tag: 2.1.15
    88License: GPL v2 or later
    99
     
    3232
    3333== Changelog ==
     34v2.1.15
     35Amélioration des performances pour la communication avec l'API
     36
    3437v2.1.14
    3538Bugfix : Correction de l'algorithme Debounce
  • clonable/trunk/readme-it_IT.txt

    r3088207 r3100441  
    33Tags: traduzioni, tradurre, multilingue, clonable, seo, hreflang, sottocartella, traduzione
    44Requires at least: 5.0
    5 Tested up to: 6.5.3
     5Tested up to: 6.5.4
    66Requires PHP: 7.0
    7 Stable tag: 2.1.14
     7Stable tag: 2.1.15
    88License: GPL v2 or later
    99
     
    3232
    3333== Changelog ==
     34v2.1.15
     35Miglioramenti delle prestazioni per la comunicazione API
     36
    3437v2.1.14
    3538Correzione di bug: correzione dell'algoritmo di rimbalzo
  • clonable/trunk/readme-nb_NO.txt

    r3088207 r3100441  
    33Tags: oversettelser, oversette, flerspråklig, clonable, seo, hreflang, undermappe, oversettelse
    44Requires at least: 5.0
    5 Tested up to: 6.5.3
     5Tested up to: 6.5.4
    66Requires PHP: 7.0
    7 Stable tag: 2.1.14
     7Stable tag: 2.1.15
    88License: GPL v2 or later
    99
     
    3232
    3333== Changelog ==
     34v2.1.15
     35Forbedret ytelse for API-kommunikasjon
     36
    3437v2.1.14
    3538Feilretting: Retting av debounce-algoritme
  • clonable/trunk/readme-nl_NL.txt

    r3088207 r3100441  
    33Tags: vertalingen, vertalen, meertalig, clonable, seo, hreflang, submap, vertaling
    44Requires at least: 5.0
    5 Tested up to: 6.5.3
     5Tested up to: 6.5.4
    66Requires PHP: 7.0
    7 Stable tag: 2.1.14
     7Stable tag: 2.1.15
    88License: GPL v2 or later
    99
     
    3232
    3333== Changelog ==
     34v2.1.15
     35Prestatieverbeteringen voor API-communicatie
     36
    3437v2.1.14
    3538Bugfix: Debounce algoritme fix
  • clonable/trunk/readme-sv_SE.txt

    r3088207 r3100441  
    33Tags: översättningar, översätta, flerspråkig, clonable, seo, hreflang, undermapp, översättning
    44Requires at least: 5.0
    5 Tested up to: 6.5.3
     5Tested up to: 6.5.4
    66Requires PHP: 7.0
    7 Stable tag: 2.1.14
     7Stable tag: 2.1.15
    88License: GPL v2 or later
    99
     
    3232
    3333== Changelog ==
     34v2.1.15
     35Prestandaförbättringar för API-kommunikation
     36
    3437v2.1.14
    3538Buggfix: Debounce-algoritm fixad
  • clonable/trunk/readme.txt

    r3088207 r3100441  
    33Tags: translations, translate, multilingual, clonable, seo, hreflang, subfolder, translation
    44Requires at least: 5.0
    5 Tested up to: 6.5.3
     5Tested up to: 6.5.4
    66Requires PHP: 7.0
    7 Stable tag: 2.1.14
     7Stable tag: 2.1.15
    88License: GPL v2 or later
    99
     
    3232
    3333== Changelog ==
     34v2.1.15
     35Performance improvements for API communication
     36
    3437v2.1.14
    3538Bugfix: Debounce algorithm fix
  • clonable/trunk/services/ApiService.php

    r3058276 r3100441  
    33namespace Clonable\Services;
    44
     5use Clonable\Helpers\Locales;
    56use Clonable\Objects\ApiResponse;
    67use Clonable\Objects\ClonableConfig;
     
    106107     */
    107108    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();
    132110    }
    133111
  • clonable/trunk/services/modules/TaxonomyModule.php

    r3012325 r3100441  
    5757        foreach (ClonableConfig::get_clones() as $clone) {
    5858            $name = Locales::get_display_name($clone['lang_code']);
     59            if (term_exists($name, ClonableConfig::WOOCOMMERCE_TAXONOMY)) {
     60                continue;
     61            }
     62
    5963            // create a term for each clone, terms are identified by their slug.
    6064            wp_insert_term(sprintf("Excluded from %s", $name), $taxonomy->name, array(
     
    6872        if ($site != null) {
    6973            $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            }
    7480        }
    7581    }
Note: See TracChangeset for help on using the changeset viewer.