Plugin Directory

Changeset 3051260

Timestamp:
03/14/2024 05:44:34 PM (5 months ago)
Author:
Chouby
Message:

Version 3.6-rc1

Location:
polylang/trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • polylang/trunk/js/build/post.js

    r3047325 r3051260  
    2626        const handleQuickEditInsertion = ( mutationsList ) => {
    2727            for ( const mutation of mutationsList ) {
    28                 const form = mutation.addedNodes[0];
     28                const addedNodes = Array.from( mutation.addedNodes ).filter( el => el.nodeType === Node.ELEMENT_NODE )
     29                const form = addedNodes[0];
    2930                if ( 0 < mutation.addedNodes.length && form.classList.contains( 'inline-editor' ) ) {
    3031                    // WordPress has inserted the quick edit form.
  • polylang/trunk/js/build/post.min.js

    r2802032 r3051260  
    1 var __webpack_exports__={};jQuery((function(n){n.ajaxPrefilter((function(e,t,a){"string"==typeof e.data&&-1!==e.data.indexOf("action=ajax-tag-search")&&(lang=n(':input[name="inline_lang_choice"]').val())&&(e.data="lang="+lang+"&"+e.data)}))})),jQuery((function(n){const e=document.getElementById("the-list");new MutationObserver((e=>{for(const i of e){const o=i.addedNodes[0];if(0<i.addedNodes.length&&o.classList.contains("inline-editor")){const s=Number(o.id.substring(5));if(s>0){const l=o.querySelector('select[name="inline_lang_choice"]'),c=document.querySelector("#lang_"+String(s)).innerHTML;l.value=c,t(c),a(c),l.addEventListener("change",(function(n){const e=n.target.value;t(e),a(e)}))}}function t(e){"undefined"!=typeof pll_term_languages&&n.each(pll_term_languages,(function(t,a){n.each(a,(function(a,i){n.each(i,(function(i){id="#"+a+"-"+pll_term_languages[t][a][i],e==t?n(id).show():n(id).hide()}))}))}))}function a(e){"undefined"!=typeof pll_page_languages&&n.each(pll_page_languages,(function(t,a){n.each(a,(function(a){v=n('#post_parent option[value="'+pll_page_languages[t][a]+'"]'),e==t?v.show():v.hide()}))}))}}})).observe(e,{childList:!0,subtree:!0})})),jQuery((function(n){n(document).ajaxSuccess((function(e,t,a){if("string"==typeof a.data){var i=wpAjax.unserialize(a.data);void 0!==i.action&&"inline-save"==i.action&&function(e){var t=new Array;n(".translation_"+e).each((function(){t.push(n(this).parent().parent().attr("id").substring(5))}));var a={action:"pll_update_post_rows",post_id:e,translations:t.join(","),post_type:n("input[name='post_type']").val(),screen:n("input[name='screen']").val(),_pll_nonce:n("input[name='_inline_edit']").val()};n.post(ajaxurl,a,(function(e){if(e){var t=wpAjax.parseAjaxResponse(e,"pll-ajax-response");n.each(t.responses,(function(){"row"==this.what&&n("#post-"+this.supplemental.post_id).replaceWith(this.data)}))}}))}(i.post_ID)}}))})),jQuery((function(n){n.ajaxPrefilter((function(e,t,a){"string"==typeof e.data&&-1!==e.data.indexOf("action=find_posts")&&(e.data="pll_post_id="+n("#affected").val()+"&"+e.data)}))}));
     1var __webpack_exports__={};jQuery((function(.data)}))}));
  • polylang/trunk/js/build/term.js

    r3047325 r3051260  
    1111        const handleQuickEditInsertion = ( mutationsList ) => {
    1212            for ( const mutation of mutationsList ) {
    13                 const form = mutation.addedNodes[0];
     13                const addedNodes = Array.from( mutation.addedNodes ).filter( el => el.nodeType === Node.ELEMENT_NODE )
     14                const form = addedNodes[0];
    1415                if ( 0 < mutation.addedNodes.length && form.classList.contains( 'inline-edit-row' ) ) {
    1516                    // WordPress has inserted the quick edit form.
     
    2324
    2425                        // Disable the language dropdown for default categories.
    25                         const default_cat = document.querySelector( `#default_cat_${term_id}` ).innerHTML;
     26                        const default_cat = document.querySelector( `#default_cat_${term_id}` ).innerHTML;
    2627                        if ( term_id == default_cat ) {
    2728                            select.disabled = true;
  • polylang/trunk/js/build/term.min.js

    r2802032 r3051260  
    1 var __webpack_exports__={};jQuery((function(t){const a=t=>{for(const a of t){const t=a.addedNodes[0];if(0<a.addedNodes.length&&t.classList.contains("inline-edit-row")){const a=Number(t.id.substring(5));if(a>0){const e=t.querySelector('select[name="inline_lang_choice"]'),n=document.querySelector("#lang_"+String(a)).innerHTML;e.value=n;a==document.querySelector(`#default_cat_${a}`).innerHTML&&(e.disabled=!0)}}}},e=document.getElementById("the-list");if(null!==e){const t={childList:!0,subtree:!0};new MutationObserver(a).observe(e,t)}})),jQuery((function(t){t(document).ajaxSuccess((function(a,e,n){function l(a){var e=new Array;t(".translation_"+a).each((function(){e.push(t(this).parent().parent().attr("id").substring(4))}));var n={action:"pll_update_term_rows",term_id:a,translations:e.join(","),taxonomy:t("input[name='taxonomy']").val(),post_type:t("input[name='post_type']").val(),screen:t("input[name='screen']").val(),_pll_nonce:t("#_pll_nonce").val()};t.post(ajaxurl,n,(function(a){if(a){var e=wpAjax.parseAjaxResponse(a,"pll-ajax-response");t.each(e.responses,(function(){"row"==this.what&&t("#tag-"+this.supplemental.term_id).replaceWith(this.data)}))}}))}var s=wpAjax.unserialize(n.data);if(void 0!==s.action)switch(s.action){case"add-tag":res=wpAjax.parseAjaxResponse(e.responseXML,"pll-ajax-response"),t.each(res.responses,(function(){"term"==this.what&&l(this.supplemental.term_id)})),t(".htr_lang").val(0);break;case"delete-tag":l(s.tag_ID);break;case"inline-save-tax":l(s.tax_ID)}}))})),jQuery((function(t){function a(){t(".tr_lang").each((function(){var a=t(this).attr("id").substring(8),e=t(this).parent().parent().siblings(".pll-edit-column");t(this).autocomplete({minLength:0,source:ajaxurl+"?action=pll_terms_not_translated&term_language="+t("#term_lang_choice").val()+"&term_id="+t("input[name='tag_ID']").val()+"&taxonomy="+t("input[name='taxonomy']").val()+"&translation_language="+a+"&post_type="+typenow+"&_pll_nonce="+t("#_pll_nonce").val(),select:function(n,l){t("#htr_lang_"+a).val(l.item.id),e.html(l.item.link)}}),t(this).on("blur",(function(){t(this).val()||(t("#htr_lang_"+a).val(0),e.html(e.siblings(".hidden").children().clone()))}))}))}a(),t("#term_lang_choice").on("change",(function(){var e=t(this).val(),n=t(this).children('option[value="'+e+'"]').attr("lang"),l=t('.pll-translation-column > span[lang="'+n+'"]').attr("dir"),s={action:"term_lang_choice",lang:e,from_tag:t("input[name='from_tag']").val(),term_id:t("input[name='tag_ID']").val(),taxonomy:t("input[name='taxonomy']").val(),post_type:typenow,_pll_nonce:t("#_pll_nonce").val()};t.post(ajaxurl,s,(function(e){var n=wpAjax.parseAjaxResponse(e,"pll-ajax-response");t.each(n.responses,(function(){switch(this.what){case"translations":t("#term-translations").html(this.data),a();break;case"parent":t("#parent").replaceWith(this.data);break;case"tag_cloud":t(".tagcloud").replaceWith(this.data);break;case"flag":t(".pll-select-flag").html(this.data)}})),t("body").removeClass("pll-dir-rtl").removeClass("pll-dir-ltr").addClass("pll-dir-"+l)}))}))}));
     1var __webpack_exports__={};jQuery((function(t){const a=t=>{for(const a of t){const t=&&(e.disabled=!0)}}}},e=document.getElementById("the-list");if(null!==e){const t={childList:!0,subtree:!0};new MutationObserver(a).observe(e,t)}})),jQuery((function(t){t(document).ajaxSuccess((function(a,e,n){function l(a){var e=new Array;t(".translation_"+a).each((function(){e.push(t(this).parent().parent().attr("id").substring(4))}));var n={action:"pll_update_term_rows",term_id:a,translations:e.join(","),taxonomy:t("input[name='taxonomy']").val(),post_type:t("input[name='post_type']").val(),screen:t("input[name='screen']").val(),_pll_nonce:t("#_pll_nonce").val()};t.post(ajaxurl,n,(function(a){if(a){var e=wpAjax.parseAjaxResponse(a,"pll-ajax-response");t.each(e.responses,(function(){"row"==this.what&&t("#tag-"+this.supplemental.term_id).replaceWith(this.data)}))}}))}var s=wpAjax.unserialize(n.data);if(void 0!==s.action)switch(s.action){case"add-tag":res=wpAjax.parseAjaxResponse(e.responseXML,"pll-ajax-response"),t.each(res.responses,(function(){"term"==this.what&&l(this.supplemental.term_id)})),t(".htr_lang").val(0);break;case"delete-tag":l(s.tag_ID);break;case"inline-save-tax":l(s.tax_ID)}}))})),jQuery((function(t){function a(){t(".tr_lang").each((function(){var a=t(this).attr("id").substring(8),e=t(this).parent().parent().siblings(".pll-edit-column");t(this).autocomplete({minLength:0,source:ajaxurl+"?action=pll_terms_not_translated&term_language="+t("#term_lang_choice").val()+"&term_id="+t("input[name='tag_ID']").val()+"&taxonomy="+t("input[name='taxonomy']").val()+"&translation_language="+a+"&post_type="+typenow+"&_pll_nonce="+t("#_pll_nonce").val(),select:function(n,l){t("#htr_lang_"+a).val(l.item.id),e.html(l.item.link)}}),t(this).on("blur",(function(){t(this).val()||(t("#htr_lang_"+a).val(0),e.html(e.siblings(".hidden").children().clone()))}))}))}a(),t("#term_lang_choice").on("change",(function(){var e=t(this).val(),n=t(this).children('option[value="'+e+'"]').attr("lang"),l=t('.pll-translation-column > span[lang="'+n+'"]').attr("dir"),s={action:"term_lang_choice",lang:e,from_tag:t("input[name='from_tag']").val(),term_id:t("input[name='tag_ID']").val(),taxonomy:t("input[name='taxonomy']").val(),post_type:typenow,_pll_nonce:t("#_pll_nonce").val()};t.post(ajaxurl,s,(function(e){var n=wpAjax.parseAjaxResponse(e,"pll-ajax-response");t.each(n.responses,(function(){switch(this.what){case"translations":t("#term-translations").html(this.data),a();break;case"parent":t("#parent").replaceWith(this.data);break;case"tag_cloud":t(".tagcloud").replaceWith(this.data);break;case"flag":t(".pll-select-flag").html(this.data)}})),t("body").removeClass("pll-dir-rtl").removeClass("pll-dir-ltr").addClass("pll-dir-"+l)}))}))}));
  • polylang/trunk/modules/wpml/wpml-config.php

    r3042028 r3051260  
    4646     * List of rules to extract strings to translate from blocks.
    4747     *
    48      * @var string[][][]|null
     48     * @var array
     49     *
     50     * @phpstan-var array{
     51     *     xpath?: array<non-empty-string, list<non-empty-string>>,
     52     *     key?: array<non-empty-string, array<array|true>>
     53     * }|null
    4954     */
    5055    protected $parsing_rules = null;
     
    413418     *
    414419     * @since 3.3
    415      *
    416      * @param string[][] $parsing_rules Rules for blocks attributes to translate.
    417      * @return string[][] Rules completed with ones from wpml-config file.
    418      *
    419      * @phpstan-param array<string,array<string>> $parsing_rules
    420      * @phpstan-return array<string,array<string>>
     420     * @since 3.6 Format changed from `array<string>` to `array<non-empty-string, array|true>`.
     421     *
     422     * @param array $parsing_rules Rules for blocks attributes to translate.
     423     * @return array Rules completed with ones from wpml-config file.
     424     *
     425     * @phpstan-param array<non-empty-string, array|true> $parsing_rules
     426     * @phpstan-return array<non-empty-string, array|true>
    421427     */
    422428    public function translate_blocks_attributes( $parsing_rules ) {
     
    431437     * @param string $rule_tag Tag name to extract.
    432438     * @return string[][] The rules.
     439
     440
     441
     442
     443
    433444     */
    434445    protected function get_blocks_parsing_rules( $rule_tag ) {
     
    447458     *
    448459     * @return string[][][] Rules completed with ones from wpml-config file.
     460
     461
     462
     463
     464
    449465     */
    450466    protected function extract_blocks_parsing_rules() {
     
    478494                        case 'xpath':
    479495                            $rule = trim( (string) $child );
     496
     497
     498
     499
    480500                            break;
    481501
    482502                        case 'key':
    483                             $rule = $this->get_field_attribute( $child, 'name' );
     503                            $rule = $this->get_field_attributes( $child );
     504
     505                            if ( empty( $rule ) ) {
     506                                break;
     507                            }
     508
     509                            if ( isset( $parsing_rules['key'][ $block_name ] ) ) {
     510                                $parsing_rules['key'][ $block_name ] = $this->array_merge_recursive( $parsing_rules['key'][ $block_name ], $rule );
     511                            } else {
     512                                $parsing_rules['key'][ $block_name ] = $rule;
     513                            }
    484514                            break;
    485515                    }
    486 
    487                     if ( '' !== $rule ) {
    488                         $parsing_rules[ $child_tag ][ $block_name ][] = $rule;
    489                     }
    490516                }
    491517            }
     
    493519
    494520        return $parsing_rules;
     521
     522
     523
     524
     525
     526
     527
     528
     529
     530
     531
     532
     533
     534
     535
     536
     537
     538
     539
     540
     541
     542
    495543    }
    496544
     
    564612
    565613        return trim( (string) $attributes[ $attribute_name ] );
     614
     615
     616
     617
     618
     619
     620
     621
     622
     623
     624
     625
     626
     627
     628
     629
     630
     631
     632
     633
     634
     635
     636
     637
     638
     639
     640
     641
     642
     643
     644
     645
     646
     647
     648
     649
     650
     651
    566652    }
    567653
  • polylang/trunk/polylang.php

    r3047325 r3051260  
    1111 * Plugin URI:        https://polylang.pro
    1212 * Description:       Adds multilingual capability to WordPress
    13  * Version:           3.6-beta2
     13 * Version:           3.6-
    1414 * Requires at least: 6.2
    1515 * Requires PHP:      7.0
     
    5454} else {
    5555    // Go on loading the plugin
    56     define( 'POLYLANG_VERSION', '3.6-beta2' );
     56    define( 'POLYLANG_VERSION', '3.6-' );
    5757    define( 'PLL_MIN_WP_VERSION', '6.2' );
    5858    define( 'PLL_MIN_PHP_VERSION', '7.0' );
  • polylang/trunk/readme.txt

    r3047325 r3051260  
    44Tags: multilingual, translate, translation, language, localization
    55Requires at least: 6.2
    6 Tested up to: 6.4
     6Tested up to: 6.
    77Requires PHP: 7.0
    88Stable tag: 3.5.4
     
    109109* Requires WP 6.2 as minimum version
    110110* Add compatibility with WP 6.5
    111 * Pro: Add DeepL machine translation for posts and terms
    112 * Pro: Add export and import of XLIFF 2.0/2.1
     111* Pro: Add DeepL machine translation for posts
     112* Pro: Add export and import
    113113* Pro: Improve translator comments in exported PO files
    114 * Pro: Allow to export and import JSON encoded post and term metas
    115 * Pro: Include footer notes block in translation files
     114* Pro: Allow to export JSON encoded post and term metas in XLIFF files
     115* Pro: Allow to export block sub-attributes in XLIFF files
     116* Pro: Add footer notes block to XLIFF files
    116117* Pro: Single files are now exported directly instead of inside a zip
    117118* Pro: Reworked the language switcher navigation block
    118 * Pro: Fix language switcher navigation block justification not aligned with core settings in overlay menu. Requires WP 6.5
     119* Pro: Fix language switcher navigation block justification not aligned with core settings in overlay menu
    119120* Pro: Fix a race condition which could lead to display a notice to the wrong user
     121
     122
    120123* Add filter `pll_cookie_args` to filter the Polylang cookie arguments #1406
    121124* Fix wrong translated post types and taxononies after a `switch_to_blog()` #1415
    122125* Fix a minor performance issue for the page for posts #1412
    123 * Fix a JS error after quick edit. Props @mcguffin #1435
     126* Fix a JS error
    124127* Fix a possible warning in view-translations-post.php #1439
    125128
  • polylang/trunk/vendor/composer/installed.php

    r3047325 r3051260  
    44        'pretty_version' => 'dev-master',
    55        'version' => 'dev-master',
    6         'reference' => 'fb89dbcecf83c3d455976ec73ff3627ac51b5c46',
     6        'reference' => '6',
    77        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../',
     
    1414            'pretty_version' => 'dev-master',
    1515            'version' => 'dev-master',
    16             'reference' => 'fb89dbcecf83c3d455976ec73ff3627ac51b5c46',
     16            'reference' => '6',
    1717            'type' => 'wordpress-plugin',
    1818            'install_path' => __DIR__ . '/../../',
Note: See TracChangeset for help on using the changeset viewer.