Changeset 3351075
- Timestamp:
- 08/27/2025 10:17:30 AM (6 months ago)
- Location:
- translatepress-multilingual
- Files:
-
- 12 edited
- 1 copied
-
tags/2.10.2 (copied) (copied from translatepress-multilingual/trunk)
-
tags/2.10.2/assets/css/trp-language-switcher-v2.css (modified) (1 diff)
-
tags/2.10.2/class-translate-press.php (modified) (3 diffs)
-
tags/2.10.2/includes/class-language-switcher-v2.php (modified) (1 diff)
-
tags/2.10.2/index.php (modified) (1 diff)
-
tags/2.10.2/languages/translatepress-multilingual.pot (modified) (1 diff)
-
tags/2.10.2/readme.txt (modified) (2 diffs)
-
trunk/assets/css/trp-language-switcher-v2.css (modified) (1 diff)
-
trunk/class-translate-press.php (modified) (3 diffs)
-
trunk/includes/class-language-switcher-v2.php (modified) (1 diff)
-
trunk/index.php (modified) (1 diff)
-
trunk/languages/translatepress-multilingual.pot (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
translatepress-multilingual/tags/2.10.2/assets/css/trp-language-switcher-v2.css
r3350441 r3351075 243 243 } 244 244 245 246 247 248 /* Legacy Language Switcher shortcode css rules 249 * Useful for displaying the Automatic Language Detection language switcher 250 */ 251 252 253 .trp_ald_ls_container img.trp-flag-image{ 254 padding-top: 0 !important; 255 } 256 257 .trp_ald_ls_container .trp-language-switcher{ 258 position: relative; 259 display: inline-block; 260 padding: 0; 261 border: 0; 262 263 box-sizing: border-box; 264 } 265 266 267 .trp_ald_ls_container .trp-language-switcher > div { 268 box-sizing: border-box; 269 270 padding-right: 20px; 271 padding-bottom: 3px; 272 padding-left: 13px; 273 274 border: 1px solid #c1c1c1; 275 border-radius: 3px; 276 277 background-color: #fff; 278 } 279 280 .trp_ald_ls_container .trp-language-switcher > div > a { 281 display: block; 282 padding: 2px; 283 border-radius: 3px; 284 color: rgb(7, 105, 173); 285 } 286 287 .trp_ald_ls_container .trp-language-switcher > div > a:hover { 288 background: #f1f1f1; 289 } 290 .trp_ald_ls_container .trp-language-switcher > div > a.trp-ls-shortcode-disabled-language { 291 cursor: default; 292 } 293 .trp_ald_ls_container .trp-language-switcher > div > a.trp-ls-shortcode-disabled-language:hover { 294 background: none; 295 } 296 297 .trp_ald_ls_container .trp-language-switcher > div > a > img{ 298 display: inline; 299 margin: 0 3px; 300 width: 18px; 301 height: 12px; 302 border-radius: 0; 303 } 304 305 .trp_ald_ls_container .trp-language-switcher .trp-ls-shortcode-current-language{ 306 display: inline-block; 307 } 308 .trp_ald_ls_container .trp-language-switcher:focus .trp-ls-shortcode-current-language, 309 .trp_ald_ls_container .trp-language-switcher:hover .trp-ls-shortcode-current-language{ 310 visibility: hidden; 311 } 312 313 .trp_ald_ls_container .trp-language-switcher .trp-ls-shortcode-language{ 314 display: inline-block; 315 height: 1px; 316 overflow: hidden; 317 visibility: hidden; 318 z-index: 1; 319 320 max-height: 250px; 321 overflow-y: auto; 322 left: 0; 323 top: 0; 324 min-height: auto; 325 } 326 327 .trp_ald_ls_container .trp-language-switcher:focus .trp-ls-shortcode-language, 328 .trp_ald_ls_container .trp-language-switcher:hover .trp-ls-shortcode-language{ 329 visibility: visible; 330 max-height: 250px; 331 height: auto; 332 overflow-y: auto; 333 position: absolute; 334 left: 0; 335 top: 0; 336 display: inline-block !important; 337 min-height: auto; 338 } 339 340 #trp_ald_x_button{ 341 z-index: 0 !important; 342 } -
translatepress-multilingual/tags/2.10.2/class-translate-press.php
r3350481 r3351075 18 18 protected $query; 19 19 protected $language_switcher; 20 protected $language_switcher_v2;21 20 protected $translation_manager; 22 21 protected $editor_api_regular_strings; … … 72 71 define( 'TRP_PLUGIN_BASE', plugin_basename( __DIR__ . '/index.php' ) ); 73 72 define( 'TRP_PLUGIN_SLUG', 'translatepress-multilingual' ); 74 define( 'TRP_PLUGIN_VERSION', '2.10. 1' );73 define( 'TRP_PLUGIN_VERSION', '2.10.2' ); 75 74 76 75 wp_cache_add_non_persistent_groups(array('trp')); … … 430 429 add_shortcode( 'language-switcher', [ $this->language_switcher, 'language_switcher' ] ); 431 430 } else { 432 $this->language_switcher _v2= TRP_Language_Switcher_V2::instance( $this->settings->get_settings(), $this );433 $this->loader->add_action( 'init', $this->language_switcher _v2, 'init', 1 );431 $this->language_switcher = TRP_Language_Switcher_V2::instance( $this->settings->get_settings(), $this ); 432 $this->loader->add_action( 'init', $this->language_switcher, 'init', 1 ); 434 433 } 435 434 -
translatepress-multilingual/tags/2.10.2/includes/class-language-switcher-v2.php
r3350481 r3351075 761 761 return apply_filters( 'trp_flag_html', $html, $language_code, $url ); 762 762 } 763 764 /** 765 * Legacy function to add flag 766 * 767 * @param $language_code 768 * @param $language_name 769 * @param $location 770 * @return string 771 * @deprecated 772 */ 773 public function add_flag( $language_code, $language_name, $location = NULL ) { 774 $flags_path = TRP_PLUGIN_URL . 'assets/images/flags/'; 775 $flags_path = apply_filters( 'trp_flags_path', $flags_path, $language_code ); 776 $flag_file_name = $language_code . '.png'; 777 if ( $location == 'ls_shortcode' ) { 778 $flag_url = $flags_path . $flag_file_name; 779 return esc_url( $flag_url ); 780 } 781 782 return $this->get_flag_html( $language_code, 'rect' ); 783 } 784 785 /** 786 * Legacy function for rendering shortcode LS 787 * 788 * @param $atts 789 * @return void 790 * @deprecated 791 */ 792 public function language_switcher( $atts ){ 793 return $this->render_shortcode(); 794 } 795 796 /** 797 * Legacy function for rendering floater LS 798 * 799 */ 800 public function add_floater_language_switcher(){ 801 return $this->render_floater(); 802 } 803 804 /** 805 * Legacy function used in older versions of Automatic Language Detection Add-on 806 * 807 */ 808 public function add_shortcode_preferences( $settings, $language_code, $language_name ) { 809 if ( $settings['flags'] ){ 810 $flag = $this->add_flag($language_code, $language_name); 811 } else { 812 $flag = ''; 813 } 814 815 if ( $settings['full_names'] ){ 816 $full_name = $language_name; 817 } else { 818 $full_name = ''; 819 } 820 821 if ( $settings['short_names'] ){ 822 $short_name = strtoupper( $this->url_converter->get_url_slug( $language_code, false ) ); 823 } else { 824 $short_name = ''; 825 } 826 827 return $flag . ' ' . esc_html( $short_name . $full_name ); 828 } 829 763 830 } 764 -
translatepress-multilingual/tags/2.10.2/index.php
r3350481 r3351075 4 4 Plugin URI: https://translatepress.com/ 5 5 Description: Experience a better way of translating your WordPress site using a visual front-end translation editor, with full support for WooCommerce and site builders. 6 Version: 2.10. 16 Version: 2.10.2 7 7 Author: Cozmoslabs, Razvan Mocanu, Madalin Ungureanu, Cristophor Hurduban 8 8 Author URI: https://cozmoslabs.com/ -
translatepress-multilingual/tags/2.10.2/languages/translatepress-multilingual.pot
r3350481 r3351075 7 7 "Content-Type: text/plain; charset=UTF-8\n" 8 8 "Content-Transfer-Encoding: 8bit\n" 9 "POT-Creation-Date: 2025-08-2 6 13:40+0000\n"9 "POT-Creation-Date: 2025-08-27 09:59+0000\n" 10 10 "X-Poedit-Basepath: ..\n" 11 11 "X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;_nx_noop:1,2,3c;_x:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n" -
translatepress-multilingual/tags/2.10.2/readme.txt
r3350481 r3351075 6 6 Tested up to: 6.8.2 7 7 Requires PHP: 7.4 8 Stable tag: 2.10. 18 Stable tag: 2.10.2 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 143 143 144 144 == Changelog == 145 = 2.10.2 = 146 * Fixed an error occurring when WP Rocket plugin is active 147 * Fixed broken front-end layout when Automatic User Language Detection was enabled and the new language switcher was active 148 145 149 = 2.10.1 = 146 150 * Fixed an edge case bug with rendering the new language switcher in shortcode -
translatepress-multilingual/trunk/assets/css/trp-language-switcher-v2.css
r3350441 r3351075 243 243 } 244 244 245 246 247 248 /* Legacy Language Switcher shortcode css rules 249 * Useful for displaying the Automatic Language Detection language switcher 250 */ 251 252 253 .trp_ald_ls_container img.trp-flag-image{ 254 padding-top: 0 !important; 255 } 256 257 .trp_ald_ls_container .trp-language-switcher{ 258 position: relative; 259 display: inline-block; 260 padding: 0; 261 border: 0; 262 263 box-sizing: border-box; 264 } 265 266 267 .trp_ald_ls_container .trp-language-switcher > div { 268 box-sizing: border-box; 269 270 padding-right: 20px; 271 padding-bottom: 3px; 272 padding-left: 13px; 273 274 border: 1px solid #c1c1c1; 275 border-radius: 3px; 276 277 background-color: #fff; 278 } 279 280 .trp_ald_ls_container .trp-language-switcher > div > a { 281 display: block; 282 padding: 2px; 283 border-radius: 3px; 284 color: rgb(7, 105, 173); 285 } 286 287 .trp_ald_ls_container .trp-language-switcher > div > a:hover { 288 background: #f1f1f1; 289 } 290 .trp_ald_ls_container .trp-language-switcher > div > a.trp-ls-shortcode-disabled-language { 291 cursor: default; 292 } 293 .trp_ald_ls_container .trp-language-switcher > div > a.trp-ls-shortcode-disabled-language:hover { 294 background: none; 295 } 296 297 .trp_ald_ls_container .trp-language-switcher > div > a > img{ 298 display: inline; 299 margin: 0 3px; 300 width: 18px; 301 height: 12px; 302 border-radius: 0; 303 } 304 305 .trp_ald_ls_container .trp-language-switcher .trp-ls-shortcode-current-language{ 306 display: inline-block; 307 } 308 .trp_ald_ls_container .trp-language-switcher:focus .trp-ls-shortcode-current-language, 309 .trp_ald_ls_container .trp-language-switcher:hover .trp-ls-shortcode-current-language{ 310 visibility: hidden; 311 } 312 313 .trp_ald_ls_container .trp-language-switcher .trp-ls-shortcode-language{ 314 display: inline-block; 315 height: 1px; 316 overflow: hidden; 317 visibility: hidden; 318 z-index: 1; 319 320 max-height: 250px; 321 overflow-y: auto; 322 left: 0; 323 top: 0; 324 min-height: auto; 325 } 326 327 .trp_ald_ls_container .trp-language-switcher:focus .trp-ls-shortcode-language, 328 .trp_ald_ls_container .trp-language-switcher:hover .trp-ls-shortcode-language{ 329 visibility: visible; 330 max-height: 250px; 331 height: auto; 332 overflow-y: auto; 333 position: absolute; 334 left: 0; 335 top: 0; 336 display: inline-block !important; 337 min-height: auto; 338 } 339 340 #trp_ald_x_button{ 341 z-index: 0 !important; 342 } -
translatepress-multilingual/trunk/class-translate-press.php
r3350481 r3351075 18 18 protected $query; 19 19 protected $language_switcher; 20 protected $language_switcher_v2;21 20 protected $translation_manager; 22 21 protected $editor_api_regular_strings; … … 72 71 define( 'TRP_PLUGIN_BASE', plugin_basename( __DIR__ . '/index.php' ) ); 73 72 define( 'TRP_PLUGIN_SLUG', 'translatepress-multilingual' ); 74 define( 'TRP_PLUGIN_VERSION', '2.10. 1' );73 define( 'TRP_PLUGIN_VERSION', '2.10.2' ); 75 74 76 75 wp_cache_add_non_persistent_groups(array('trp')); … … 430 429 add_shortcode( 'language-switcher', [ $this->language_switcher, 'language_switcher' ] ); 431 430 } else { 432 $this->language_switcher _v2= TRP_Language_Switcher_V2::instance( $this->settings->get_settings(), $this );433 $this->loader->add_action( 'init', $this->language_switcher _v2, 'init', 1 );431 $this->language_switcher = TRP_Language_Switcher_V2::instance( $this->settings->get_settings(), $this ); 432 $this->loader->add_action( 'init', $this->language_switcher, 'init', 1 ); 434 433 } 435 434 -
translatepress-multilingual/trunk/includes/class-language-switcher-v2.php
r3350481 r3351075 761 761 return apply_filters( 'trp_flag_html', $html, $language_code, $url ); 762 762 } 763 764 /** 765 * Legacy function to add flag 766 * 767 * @param $language_code 768 * @param $language_name 769 * @param $location 770 * @return string 771 * @deprecated 772 */ 773 public function add_flag( $language_code, $language_name, $location = NULL ) { 774 $flags_path = TRP_PLUGIN_URL . 'assets/images/flags/'; 775 $flags_path = apply_filters( 'trp_flags_path', $flags_path, $language_code ); 776 $flag_file_name = $language_code . '.png'; 777 if ( $location == 'ls_shortcode' ) { 778 $flag_url = $flags_path . $flag_file_name; 779 return esc_url( $flag_url ); 780 } 781 782 return $this->get_flag_html( $language_code, 'rect' ); 783 } 784 785 /** 786 * Legacy function for rendering shortcode LS 787 * 788 * @param $atts 789 * @return void 790 * @deprecated 791 */ 792 public function language_switcher( $atts ){ 793 return $this->render_shortcode(); 794 } 795 796 /** 797 * Legacy function for rendering floater LS 798 * 799 */ 800 public function add_floater_language_switcher(){ 801 return $this->render_floater(); 802 } 803 804 /** 805 * Legacy function used in older versions of Automatic Language Detection Add-on 806 * 807 */ 808 public function add_shortcode_preferences( $settings, $language_code, $language_name ) { 809 if ( $settings['flags'] ){ 810 $flag = $this->add_flag($language_code, $language_name); 811 } else { 812 $flag = ''; 813 } 814 815 if ( $settings['full_names'] ){ 816 $full_name = $language_name; 817 } else { 818 $full_name = ''; 819 } 820 821 if ( $settings['short_names'] ){ 822 $short_name = strtoupper( $this->url_converter->get_url_slug( $language_code, false ) ); 823 } else { 824 $short_name = ''; 825 } 826 827 return $flag . ' ' . esc_html( $short_name . $full_name ); 828 } 829 763 830 } 764 -
translatepress-multilingual/trunk/index.php
r3350481 r3351075 4 4 Plugin URI: https://translatepress.com/ 5 5 Description: Experience a better way of translating your WordPress site using a visual front-end translation editor, with full support for WooCommerce and site builders. 6 Version: 2.10. 16 Version: 2.10.2 7 7 Author: Cozmoslabs, Razvan Mocanu, Madalin Ungureanu, Cristophor Hurduban 8 8 Author URI: https://cozmoslabs.com/ -
translatepress-multilingual/trunk/languages/translatepress-multilingual.pot
r3350481 r3351075 7 7 "Content-Type: text/plain; charset=UTF-8\n" 8 8 "Content-Transfer-Encoding: 8bit\n" 9 "POT-Creation-Date: 2025-08-2 6 13:40+0000\n"9 "POT-Creation-Date: 2025-08-27 09:59+0000\n" 10 10 "X-Poedit-Basepath: ..\n" 11 11 "X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;_nx_noop:1,2,3c;_x:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n" -
translatepress-multilingual/trunk/readme.txt
r3350481 r3351075 6 6 Tested up to: 6.8.2 7 7 Requires PHP: 7.4 8 Stable tag: 2.10. 18 Stable tag: 2.10.2 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 143 143 144 144 == Changelog == 145 = 2.10.2 = 146 * Fixed an error occurring when WP Rocket plugin is active 147 * Fixed broken front-end layout when Automatic User Language Detection was enabled and the new language switcher was active 148 145 149 = 2.10.1 = 146 150 * Fixed an edge case bug with rendering the new language switcher in shortcode
Note: See TracChangeset
for help on using the changeset viewer.