Plugin Directory

Changeset 3362585


Ignore:
Timestamp:
09/16/2025 01:31:36 PM (5 months ago)
Author:
sbouey
Message:

Update to version 1.3.67

Location:
falang
Files:
16 edited
1 copied

Legend:

Unmodified
Added
Removed
  • falang/tags/1.3.67/README.txt

    r3353726 r3362585  
    66Tested up to: 6.8
    77Requires PHP: 5.6
    8 Stable tag: 1.3.66
     8Stable tag: 1.3.67
    99License: GPLv3 or later
    1010License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    111111== Changelog ==
    112112
     113* 1.3.67 (2025/09/16)
     114* fix WooCommerce – Dashboard menu active class missing (Alexandre Froger fix)
     115* fix CF7 bug with _locale filtring since CF7 6.1.1
     116* fix RankMath title translation for archive page
     117* fix meta (ACF) translation (regression from 1.3.66 version)
     118* fix for woocommerce Checkout link (jurifc)
     119
    113120* 1.3.66 (2025/09/01)
    114121* fix theme editor save with slug
  • falang/tags/1.3.67/admin/class-falang-admin.php

    r3353726 r3362585  
    716716     * @update 1.3.40 flush directly the rules if needed (necessary when page slulg change)
    717717     * @update 1.3.66 fix object injection in unserialize
     718     * @update 1.3.67 fix regression on ACF or meta non serialized save
    718719     */
    719720    public function save_translation_post()
     
    758759                    if (preg_match('/^[\w:;,.{}()=]+$/', $field_value)) {
    759760                        $field_value = unserialize(stripslashes(trim($field_value)), ['allowed_classes' => false]);
    760                         update_post_meta($post_id, $meta_key, $field_value);
    761761                    }
    762762                }
     763                //update for standard meta or safe value
     764                update_post_meta($post_id, $meta_key, $field_value);
    763765            } else {
    764766                delete_post_meta($post_id, $meta_key);
  • falang/tags/1.3.67/buid.xml

    r3291681 r3362585  
    55    <property name="licence" value="lite"/>
    66    <!-- set in falang.php manually -->
    7     <property name="version" value="1.3.62b"/>
    8     <property name="date" value="2025/05/02"/>
     7    <property name="version" value="1.3.67a"/>
     8    <property name="date" value="2025/09/16"/>
    99
    1010    <import file="common.xml"/>
  • falang/tags/1.3.67/falang.php

    r3353727 r3362585  
    99 * Plugin URI:        www.faboba.com/falangw/
    1010 * Description:       Adds multilingual capability to WordPress (Lite version)
    11  * Version:           1.3.66
     11 * Version:           1.3.67
    1212 * Author:            Faboba
    1313 * Author URI:        www.faboba.com
     
    5050 * Currently plugin version.
    5151 */
    52 define( 'FALANG_VERSION', '1.3.66' );
     52define( 'FALANG_VERSION', '1.3.67' );
    5353define( 'FALANG_MIN_WP_VERSION', '4.7' );
    5454define( 'FALANG_FILE', __FILE__ ); // this file
  • falang/tags/1.3.67/public/class-falang-public.php

    r3353726 r3362585  
    914914     *
    915915     * @from 1.0
     916     * @update 1.3.67 fix for CF7 (not filtering the posts with the _locale)
    916917     */
    917918    public function posts_where( $where, $query) {
     
    923924//          return $where;
    924925//      }
     926
     927        //CF7 use _locale for the form , Falang don't have to filter this.
     928        if ( ! empty( $qv['post_type'] ) && 'wpcf7_contact_form' == $qv['post_type'] ) {
     929            return $where;
     930        }
    925931
    926932        $slug = empty( $qv['lang'] ) ? $slug = $this->current_language->slug : $qv['lang'];
  • falang/tags/1.3.67/src/Falang/Core/Falang_Rewrite.php

    r2734855 r3362585  
    429429     * @filter 'rewrite_rules_array'
    430430     * @from 1.0
     431     * @update 1.3.67 add jurifc fix for woocommerce Checkout link
    431432     */
    432433    public function append_language_slugs($rules) {
     
    450451//          '^wp-json/(.*)?',
    451452            '^index.php/wp-json/?$',
    452             '^index.php/wp-json/(.*)?'
     453            '^index.php/wp-json/(.*)?',
     454            '^checkout-link$' //jurijc:fix woo 10.1.2
    453455        );
    454456
  • falang/tags/1.3.67/src/Falang/Filter/Site/RankMath.php

    r2682351 r3362585  
    2828    }
    2929
     30    /**
     31     * translate rankmath title
     32     *
     33     * @update 1.3.67 fix archive page , still but with attribute page and other taxonomy page
     34     *
     35     */
    3036    public function rank_math_title($title){
    3137        if (Falang()->is_default() ) return $title;
     
    3440        //home static posts page
    3541        if (is_home()  && !Post::is_simple_page() ){
     42            return $title;
     43        }
     44        //fix archive page , still but with attribute page and other taxonomy page
     45        if (is_archive() ){
    3646            return $title;
    3747        }
  • falang/tags/1.3.67/src/Falang/Filter/Site/WooCommerce.php

    r3293078 r3362585  
    1616     * @update 1.3.54 add filter for lost password submit redirection woocommerce_get_endpoint_url
    1717     * @update 1.3.62 fix term&condition translation (in the checkout page)
     18     * @update 1.3.67 fix WooCommerce – Dashboard menu active class missing (Alexandre Froger fix)
    1819     *
    1920     */
     
    5253        add_action('woocommerce_checkout_terms_and_conditions',array($this,'translate_woocommerce_checkout_terms_and_conditions'),30);
    5354
     55        // Fix the dashboard "My Account" active class:
     56        add_filter('woocommerce_account_menu_item_classes', array($this,'translate_woocommerce_account_menu_item_classes'),10,2);
     57
    5458    }
    5559
     
    255259
    256260    }
     261
     262    /**
     263     * Fix the dashboard "My Account" active class:
     264     * Setting the current flag on the Dashboard page expects wp->query_vars to be empty or to contain a page key.
     265     * The page key is NOT present when Falang is activated.
     266     *
     267     * @since 1.3.67
     268     */
     269
     270    public function translate_woocommerce_account_menu_item_classes($classes, $endpoint){
     271        global $post, $wp;
     272
     273        if (
     274            'dashboard' === $endpoint &&
     275            ( isset( $post ) && wc_get_page_id( 'myaccount' ) === (int) $post->ID ) &&
     276            ( isset( $wp->query_vars['pagename'] ) && $post->post_name === $wp->query_vars['pagename'] ) &&
     277            2 === count( $wp->query_vars )
     278        ) {
     279            $classes[] = 'is-active';
     280        }
     281
     282        return $classes;
     283    }
     284
    257285}
  • falang/trunk/README.txt

    r3353726 r3362585  
    66Tested up to: 6.8
    77Requires PHP: 5.6
    8 Stable tag: 1.3.66
     8Stable tag: 1.3.67
    99License: GPLv3 or later
    1010License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    111111== Changelog ==
    112112
     113* 1.3.67 (2025/09/16)
     114* fix WooCommerce – Dashboard menu active class missing (Alexandre Froger fix)
     115* fix CF7 bug with _locale filtring since CF7 6.1.1
     116* fix RankMath title translation for archive page
     117* fix meta (ACF) translation (regression from 1.3.66 version)
     118* fix for woocommerce Checkout link (jurifc)
     119
    113120* 1.3.66 (2025/09/01)
    114121* fix theme editor save with slug
  • falang/trunk/admin/class-falang-admin.php

    r3353726 r3362585  
    716716     * @update 1.3.40 flush directly the rules if needed (necessary when page slulg change)
    717717     * @update 1.3.66 fix object injection in unserialize
     718     * @update 1.3.67 fix regression on ACF or meta non serialized save
    718719     */
    719720    public function save_translation_post()
     
    758759                    if (preg_match('/^[\w:;,.{}()=]+$/', $field_value)) {
    759760                        $field_value = unserialize(stripslashes(trim($field_value)), ['allowed_classes' => false]);
    760                         update_post_meta($post_id, $meta_key, $field_value);
    761761                    }
    762762                }
     763                //update for standard meta or safe value
     764                update_post_meta($post_id, $meta_key, $field_value);
    763765            } else {
    764766                delete_post_meta($post_id, $meta_key);
  • falang/trunk/buid.xml

    r3291681 r3362585  
    55    <property name="licence" value="lite"/>
    66    <!-- set in falang.php manually -->
    7     <property name="version" value="1.3.62b"/>
    8     <property name="date" value="2025/05/02"/>
     7    <property name="version" value="1.3.67a"/>
     8    <property name="date" value="2025/09/16"/>
    99
    1010    <import file="common.xml"/>
  • falang/trunk/falang.php

    r3353727 r3362585  
    99 * Plugin URI:        www.faboba.com/falangw/
    1010 * Description:       Adds multilingual capability to WordPress (Lite version)
    11  * Version:           1.3.66
     11 * Version:           1.3.67
    1212 * Author:            Faboba
    1313 * Author URI:        www.faboba.com
     
    5050 * Currently plugin version.
    5151 */
    52 define( 'FALANG_VERSION', '1.3.66' );
     52define( 'FALANG_VERSION', '1.3.67' );
    5353define( 'FALANG_MIN_WP_VERSION', '4.7' );
    5454define( 'FALANG_FILE', __FILE__ ); // this file
  • falang/trunk/public/class-falang-public.php

    r3353726 r3362585  
    914914     *
    915915     * @from 1.0
     916     * @update 1.3.67 fix for CF7 (not filtering the posts with the _locale)
    916917     */
    917918    public function posts_where( $where, $query) {
     
    923924//          return $where;
    924925//      }
     926
     927        //CF7 use _locale for the form , Falang don't have to filter this.
     928        if ( ! empty( $qv['post_type'] ) && 'wpcf7_contact_form' == $qv['post_type'] ) {
     929            return $where;
     930        }
    925931
    926932        $slug = empty( $qv['lang'] ) ? $slug = $this->current_language->slug : $qv['lang'];
  • falang/trunk/src/Falang/Core/Falang_Rewrite.php

    r2734855 r3362585  
    429429     * @filter 'rewrite_rules_array'
    430430     * @from 1.0
     431     * @update 1.3.67 add jurifc fix for woocommerce Checkout link
    431432     */
    432433    public function append_language_slugs($rules) {
     
    450451//          '^wp-json/(.*)?',
    451452            '^index.php/wp-json/?$',
    452             '^index.php/wp-json/(.*)?'
     453            '^index.php/wp-json/(.*)?',
     454            '^checkout-link$' //jurijc:fix woo 10.1.2
    453455        );
    454456
  • falang/trunk/src/Falang/Filter/Site/RankMath.php

    r2682351 r3362585  
    2828    }
    2929
     30    /**
     31     * translate rankmath title
     32     *
     33     * @update 1.3.67 fix archive page , still but with attribute page and other taxonomy page
     34     *
     35     */
    3036    public function rank_math_title($title){
    3137        if (Falang()->is_default() ) return $title;
     
    3440        //home static posts page
    3541        if (is_home()  && !Post::is_simple_page() ){
     42            return $title;
     43        }
     44        //fix archive page , still but with attribute page and other taxonomy page
     45        if (is_archive() ){
    3646            return $title;
    3747        }
  • falang/trunk/src/Falang/Filter/Site/WooCommerce.php

    r3293078 r3362585  
    1616     * @update 1.3.54 add filter for lost password submit redirection woocommerce_get_endpoint_url
    1717     * @update 1.3.62 fix term&condition translation (in the checkout page)
     18     * @update 1.3.67 fix WooCommerce – Dashboard menu active class missing (Alexandre Froger fix)
    1819     *
    1920     */
     
    5253        add_action('woocommerce_checkout_terms_and_conditions',array($this,'translate_woocommerce_checkout_terms_and_conditions'),30);
    5354
     55        // Fix the dashboard "My Account" active class:
     56        add_filter('woocommerce_account_menu_item_classes', array($this,'translate_woocommerce_account_menu_item_classes'),10,2);
     57
    5458    }
    5559
     
    255259
    256260    }
     261
     262    /**
     263     * Fix the dashboard "My Account" active class:
     264     * Setting the current flag on the Dashboard page expects wp->query_vars to be empty or to contain a page key.
     265     * The page key is NOT present when Falang is activated.
     266     *
     267     * @since 1.3.67
     268     */
     269
     270    public function translate_woocommerce_account_menu_item_classes($classes, $endpoint){
     271        global $post, $wp;
     272
     273        if (
     274            'dashboard' === $endpoint &&
     275            ( isset( $post ) && wc_get_page_id( 'myaccount' ) === (int) $post->ID ) &&
     276            ( isset( $wp->query_vars['pagename'] ) && $post->post_name === $wp->query_vars['pagename'] ) &&
     277            2 === count( $wp->query_vars )
     278        ) {
     279            $classes[] = 'is-active';
     280        }
     281
     282        return $classes;
     283    }
     284
    257285}
Note: See TracChangeset for help on using the changeset viewer.