Changeset 3362585
- Timestamp:
- 09/16/2025 01:31:36 PM (5 months ago)
- Location:
- falang
- Files:
-
- 16 edited
- 1 copied
-
tags/1.3.67 (copied) (copied from falang/trunk)
-
tags/1.3.67/README.txt (modified) (2 diffs)
-
tags/1.3.67/admin/class-falang-admin.php (modified) (2 diffs)
-
tags/1.3.67/buid.xml (modified) (1 diff)
-
tags/1.3.67/falang.php (modified) (2 diffs)
-
tags/1.3.67/public/class-falang-public.php (modified) (2 diffs)
-
tags/1.3.67/src/Falang/Core/Falang_Rewrite.php (modified) (2 diffs)
-
tags/1.3.67/src/Falang/Filter/Site/RankMath.php (modified) (2 diffs)
-
tags/1.3.67/src/Falang/Filter/Site/WooCommerce.php (modified) (3 diffs)
-
trunk/README.txt (modified) (2 diffs)
-
trunk/admin/class-falang-admin.php (modified) (2 diffs)
-
trunk/buid.xml (modified) (1 diff)
-
trunk/falang.php (modified) (2 diffs)
-
trunk/public/class-falang-public.php (modified) (2 diffs)
-
trunk/src/Falang/Core/Falang_Rewrite.php (modified) (2 diffs)
-
trunk/src/Falang/Filter/Site/RankMath.php (modified) (2 diffs)
-
trunk/src/Falang/Filter/Site/WooCommerce.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
falang/tags/1.3.67/README.txt
r3353726 r3362585 6 6 Tested up to: 6.8 7 7 Requires PHP: 5.6 8 Stable tag: 1.3.6 68 Stable tag: 1.3.67 9 9 License: GPLv3 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 111 111 == Changelog == 112 112 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 113 120 * 1.3.66 (2025/09/01) 114 121 * fix theme editor save with slug -
falang/tags/1.3.67/admin/class-falang-admin.php
r3353726 r3362585 716 716 * @update 1.3.40 flush directly the rules if needed (necessary when page slulg change) 717 717 * @update 1.3.66 fix object injection in unserialize 718 * @update 1.3.67 fix regression on ACF or meta non serialized save 718 719 */ 719 720 public function save_translation_post() … … 758 759 if (preg_match('/^[\w:;,.{}()=]+$/', $field_value)) { 759 760 $field_value = unserialize(stripslashes(trim($field_value)), ['allowed_classes' => false]); 760 update_post_meta($post_id, $meta_key, $field_value);761 761 } 762 762 } 763 //update for standard meta or safe value 764 update_post_meta($post_id, $meta_key, $field_value); 763 765 } else { 764 766 delete_post_meta($post_id, $meta_key); -
falang/tags/1.3.67/buid.xml
r3291681 r3362585 5 5 <property name="licence" value="lite"/> 6 6 <!-- set in falang.php manually --> 7 <property name="version" value="1.3.6 2b"/>8 <property name="date" value="2025/0 5/02"/>7 <property name="version" value="1.3.67a"/> 8 <property name="date" value="2025/09/16"/> 9 9 10 10 <import file="common.xml"/> -
falang/tags/1.3.67/falang.php
r3353727 r3362585 9 9 * Plugin URI: www.faboba.com/falangw/ 10 10 * Description: Adds multilingual capability to WordPress (Lite version) 11 * Version: 1.3.6 611 * Version: 1.3.67 12 12 * Author: Faboba 13 13 * Author URI: www.faboba.com … … 50 50 * Currently plugin version. 51 51 */ 52 define( 'FALANG_VERSION', '1.3.6 6' );52 define( 'FALANG_VERSION', '1.3.67' ); 53 53 define( 'FALANG_MIN_WP_VERSION', '4.7' ); 54 54 define( 'FALANG_FILE', __FILE__ ); // this file -
falang/tags/1.3.67/public/class-falang-public.php
r3353726 r3362585 914 914 * 915 915 * @from 1.0 916 * @update 1.3.67 fix for CF7 (not filtering the posts with the _locale) 916 917 */ 917 918 public function posts_where( $where, $query) { … … 923 924 // return $where; 924 925 // } 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 } 925 931 926 932 $slug = empty( $qv['lang'] ) ? $slug = $this->current_language->slug : $qv['lang']; -
falang/tags/1.3.67/src/Falang/Core/Falang_Rewrite.php
r2734855 r3362585 429 429 * @filter 'rewrite_rules_array' 430 430 * @from 1.0 431 * @update 1.3.67 add jurifc fix for woocommerce Checkout link 431 432 */ 432 433 public function append_language_slugs($rules) { … … 450 451 // '^wp-json/(.*)?', 451 452 '^index.php/wp-json/?$', 452 '^index.php/wp-json/(.*)?' 453 '^index.php/wp-json/(.*)?', 454 '^checkout-link$' //jurijc:fix woo 10.1.2 453 455 ); 454 456 -
falang/tags/1.3.67/src/Falang/Filter/Site/RankMath.php
r2682351 r3362585 28 28 } 29 29 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 */ 30 36 public function rank_math_title($title){ 31 37 if (Falang()->is_default() ) return $title; … … 34 40 //home static posts page 35 41 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() ){ 36 46 return $title; 37 47 } -
falang/tags/1.3.67/src/Falang/Filter/Site/WooCommerce.php
r3293078 r3362585 16 16 * @update 1.3.54 add filter for lost password submit redirection woocommerce_get_endpoint_url 17 17 * @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) 18 19 * 19 20 */ … … 52 53 add_action('woocommerce_checkout_terms_and_conditions',array($this,'translate_woocommerce_checkout_terms_and_conditions'),30); 53 54 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 54 58 } 55 59 … … 255 259 256 260 } 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 257 285 } -
falang/trunk/README.txt
r3353726 r3362585 6 6 Tested up to: 6.8 7 7 Requires PHP: 5.6 8 Stable tag: 1.3.6 68 Stable tag: 1.3.67 9 9 License: GPLv3 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 111 111 == Changelog == 112 112 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 113 120 * 1.3.66 (2025/09/01) 114 121 * fix theme editor save with slug -
falang/trunk/admin/class-falang-admin.php
r3353726 r3362585 716 716 * @update 1.3.40 flush directly the rules if needed (necessary when page slulg change) 717 717 * @update 1.3.66 fix object injection in unserialize 718 * @update 1.3.67 fix regression on ACF or meta non serialized save 718 719 */ 719 720 public function save_translation_post() … … 758 759 if (preg_match('/^[\w:;,.{}()=]+$/', $field_value)) { 759 760 $field_value = unserialize(stripslashes(trim($field_value)), ['allowed_classes' => false]); 760 update_post_meta($post_id, $meta_key, $field_value);761 761 } 762 762 } 763 //update for standard meta or safe value 764 update_post_meta($post_id, $meta_key, $field_value); 763 765 } else { 764 766 delete_post_meta($post_id, $meta_key); -
falang/trunk/buid.xml
r3291681 r3362585 5 5 <property name="licence" value="lite"/> 6 6 <!-- set in falang.php manually --> 7 <property name="version" value="1.3.6 2b"/>8 <property name="date" value="2025/0 5/02"/>7 <property name="version" value="1.3.67a"/> 8 <property name="date" value="2025/09/16"/> 9 9 10 10 <import file="common.xml"/> -
falang/trunk/falang.php
r3353727 r3362585 9 9 * Plugin URI: www.faboba.com/falangw/ 10 10 * Description: Adds multilingual capability to WordPress (Lite version) 11 * Version: 1.3.6 611 * Version: 1.3.67 12 12 * Author: Faboba 13 13 * Author URI: www.faboba.com … … 50 50 * Currently plugin version. 51 51 */ 52 define( 'FALANG_VERSION', '1.3.6 6' );52 define( 'FALANG_VERSION', '1.3.67' ); 53 53 define( 'FALANG_MIN_WP_VERSION', '4.7' ); 54 54 define( 'FALANG_FILE', __FILE__ ); // this file -
falang/trunk/public/class-falang-public.php
r3353726 r3362585 914 914 * 915 915 * @from 1.0 916 * @update 1.3.67 fix for CF7 (not filtering the posts with the _locale) 916 917 */ 917 918 public function posts_where( $where, $query) { … … 923 924 // return $where; 924 925 // } 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 } 925 931 926 932 $slug = empty( $qv['lang'] ) ? $slug = $this->current_language->slug : $qv['lang']; -
falang/trunk/src/Falang/Core/Falang_Rewrite.php
r2734855 r3362585 429 429 * @filter 'rewrite_rules_array' 430 430 * @from 1.0 431 * @update 1.3.67 add jurifc fix for woocommerce Checkout link 431 432 */ 432 433 public function append_language_slugs($rules) { … … 450 451 // '^wp-json/(.*)?', 451 452 '^index.php/wp-json/?$', 452 '^index.php/wp-json/(.*)?' 453 '^index.php/wp-json/(.*)?', 454 '^checkout-link$' //jurijc:fix woo 10.1.2 453 455 ); 454 456 -
falang/trunk/src/Falang/Filter/Site/RankMath.php
r2682351 r3362585 28 28 } 29 29 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 */ 30 36 public function rank_math_title($title){ 31 37 if (Falang()->is_default() ) return $title; … … 34 40 //home static posts page 35 41 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() ){ 36 46 return $title; 37 47 } -
falang/trunk/src/Falang/Filter/Site/WooCommerce.php
r3293078 r3362585 16 16 * @update 1.3.54 add filter for lost password submit redirection woocommerce_get_endpoint_url 17 17 * @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) 18 19 * 19 20 */ … … 52 53 add_action('woocommerce_checkout_terms_and_conditions',array($this,'translate_woocommerce_checkout_terms_and_conditions'),30); 53 54 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 54 58 } 55 59 … … 255 259 256 260 } 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 257 285 }
Note: See TracChangeset
for help on using the changeset viewer.