Changeset 3441488
- Timestamp:
- 01/17/2026 08:20:56 AM (4 weeks ago)
- Location:
- wp-multilang/trunk
- Files:
-
- 7 edited
-
includes/admin/settings/class-wpm-settings-auto-translate-pro.php (modified) (1 diff)
-
includes/class-wp-multilang.php (modified) (1 diff)
-
includes/class-wpm-options.php (modified) (1 diff)
-
includes/integrations/class-wpm-strong-testimonials.php (modified) (3 diffs)
-
includes/integrations/class-wpm-yoast-seo.php (modified) (2 diffs)
-
readme.txt (modified) (3 diffs)
-
wp-multilang.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-multilang/trunk/includes/admin/settings/class-wpm-settings-auto-translate-pro.php
r3414013 r3441488 496 496 if ($trabs != 'false') { 497 497 if(preg_match('/<[^<]+>/', $translated_source) === 1){ 498 $translated_source = str_replace(json_encode($text), json_encode($trabs), $translated_source); 498 // Normalize escaped versions 499 $original_unescaped = stripslashes($text); 500 $translated_unescaped = stripslashes($trabs); 501 502 // Encode versions (JSON-safe) 503 $original_json = json_encode($text, JSON_UNESCAPED_SLASHES); 504 $translated_json = json_encode($trabs, JSON_UNESCAPED_SLASHES); 505 506 // Build all possible text representations 507 $patterns = [ 508 $text, 509 $original_unescaped, 510 $original_json, 511 json_encode($text) // full escaped JSON version 512 ]; 513 514 $replacements = [ 515 $trabs, 516 $translated_unescaped, 517 $translated_json, 518 json_encode($trabs) 519 ]; 520 $translated_source = str_replace($patterns, $replacements, $translated_source); 499 521 }else{ 500 $translated_source = str_replace('"'.$text.'"', '"'.$trabs.'"', $translated_source);522 $translated_source = str_replace('"'.$text.'"', '"'.$trabs.'"', $translated_source); 501 523 } 502 524 } -
wp-multilang/trunk/includes/class-wp-multilang.php
r3414013 r3441488 22 22 * @var string 23 23 */ 24 public $version = '2.4.2 4';24 public $version = '2.4.25'; 25 25 26 26 /** -
wp-multilang/trunk/includes/class-wpm-options.php
r3414013 r3441488 67 67 add_filter( "option_{$option}", 'wpm_translate_value', 5 ); 68 68 $value = wpm_set_new_value( $old_value, $value, $this->options_config[ $option ] ); 69 $value = apply_filters( "wpm_update_{$option}_option", $ original_value, $option, $old_value );69 $value = apply_filters( "wpm_update_{$option}_option", $value, $original_value, $option, $old_value ); 70 70 71 71 return $value; -
wp-multilang/trunk/includes/integrations/class-wpm-strong-testimonials.php
r3414013 r3441488 38 38 39 39 foreach ($options as $option_key => $callbacks) { 40 add_filter( "wpm_update_{$option_key}_option", array( $this, $callbacks[0] ), 10, 3);40 add_filter( "wpm_update_{$option_key}_option", array( $this, $callbacks[0] ), 10, 4 ); 41 41 add_filter( "option_{$option_key}", array( $this, $callbacks[1] ), 10, 2 ); 42 42 } … … 51 51 * @since 2.4.23 52 52 * */ 53 public function set_option_value( $value, $ key, $old_value ) {53 public function set_option_value( $value, $original_value, $key, $old_value ) { 54 54 55 55 global $wpdb; … … 70 70 } 71 71 72 $db_value = $ value;72 $db_value = $original_value; 73 73 if ( is_array( $db_value ) ) { 74 74 $db_value = maybe_serialize( $db_value ); -
wp-multilang/trunk/includes/integrations/class-wpm-yoast-seo.php
r3332172 r3441488 442 442 $option_name = 'wpseo_taxonomy_meta'; 443 443 //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching 444 $option_result = $wpdb->get_row($wpdb->prepare("SELECT option_value FROM {$wpdb->prefix} yoast_indexableWHERE option_name = %s", $option_name ));444 $option_result = $wpdb->get_row($wpdb->prepare("SELECT option_value FROM {$wpdb->prefix}options WHERE option_name = %s", $option_name )); 445 445 446 446 if(is_object($option_result) && isset($option_result->option_value)){ … … 490 490 // Update the title and description field values of yoast_indexable table 491 491 //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching 492 $wpdb->update($yoast_table_name, $update_array_values, array('object_id' => $term_id ));492 $wpdb->update($yoast_table_name, $update_array_values, array('object_id' => $term_id, 'object_type' => 'term')); 493 493 } 494 494 } -
wp-multilang/trunk/readme.txt
r3414013 r3441488 6 6 Requires at least: 4.7 7 7 Tested up to: 6.9 8 Stable tag: 2.4.2 48 Stable tag: 2.4.25 9 9 Requires PHP: 5.6.20 10 10 License: GPL2 … … 250 250 == Changelog == 251 251 252 = 2.4.25 = 253 - Fixed: Other language content is not updating in Elementor #215 254 - Fixed: Promotion Banner BFCM #221 255 - Fixed: Yoast SEO meta tags not translating #225 256 252 257 = 2.4.24 = 253 258 - Added: Promotion Banner BFCM #221 … … 364 369 - feature Automatic translation #77 365 370 366 = 2.4.10 =367 - feature Added compatibility with Divi #72368 - fixed issue with canonical and href URL as per the language. #85369 - fixed issue with Language switcher block in site editor #86370 - fixed Compatibility with WordPress 6.6 and updated readme.txt371 372 371 All changelog available on [GitHub](https://github.com/ahmedkaludi/wp-multilang/releases). -
wp-multilang/trunk/wp-multilang.php
r3414013 r3441488 11 11 * Text Domain: wp-multilang 12 12 * Domain Path: /languages 13 * Version: 2.4.2 413 * Version: 2.4.25 14 14 * Copyright: © 2017-2019 Valentyn Riaboshtan 15 15 * … … 95 95 } 96 96 add_action( 'admin_notices', 'wpm_activation_admin_notices' ); 97 98 99 /* * BFCM Banner Integration100 * Loads assets from assets/css and assets/js101 */102 add_action('admin_enqueue_scripts', 'wp_multilang_enqueue_bfcm_assets');103 104 function wp_multilang_enqueue_bfcm_assets($hook) {105 106 //var_dump($hook);107 if ( $hook !== 'toplevel_page_wpm-settings' ) {108 return;109 }110 111 /*if ( ! isset($_GET['page']) || $_GET['page'] !== 'setting_page_check-email-dashboard' ) {112 return;113 }*/114 115 // 2. define settings116 $expiry_date_str = '2025-12-25 23:59:59';117 $offer_link = 'https://wp-multilang.com/bfcm-2025/';118 119 // 3. Expiry Check (Server Side)120 if ( current_time('timestamp') > strtotime($expiry_date_str) ) {121 return;122 }123 124 // 4. Register & Enqueue CSS125 wp_enqueue_style(126 'wpm-bfcm-style',127 plugin_dir_url(__FILE__) . 'assets/styles/bfcm-style.css',128 array(),129 WPM_VERSION130 );131 132 // 5. Register & Enqueue JS133 wp_enqueue_script(134 'wpm-bfcm-script',135 plugin_dir_url(__FILE__) . 'assets/scripts/bfcm-script.js',136 array('jquery'), // jQuery dependency137 WPM_VERSION,138 true // Footer me load hoga139 );140 141 // 6. Data Pass (PHP to JS)142 wp_localize_script('wpm-bfcm-script', 'bfcmData', array(143 'targetDate' => $expiry_date_str,144 'offerLink' => $offer_link145 ));146 }
Note: See TracChangeset
for help on using the changeset viewer.