TranslatePress – Translate Multilingual sites - Version 2.1.7

Version Description

  • Added form in settings to sign up for TranslatePress email course
  • Fixed issue when logging in that redirected to "page not found" when languages are reordered
  • Fixed hyphenation issue on default language when using WP-typography plugin
  • Fixed notices regarding is_file call
Download this release

Release Info

Developer razvan.mo
Plugin Icon 128x128 TranslatePress – Translate Multilingual sites
Version 2.1.7
Comparing to
See all releases

Code changes from version 2.1.6 to 2.1.7

assets/css/trp-back-end-style.css CHANGED
@@ -273,3 +273,136 @@ a.trp-recommended-learn-more{
273
  width: 450px;
274
  min-height: 150px;
275
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
273
  width: 450px;
274
  min-height: 150px;
275
  }
276
+
277
+ /* Email course */
278
+ .trp-email-course {
279
+ display: flex;
280
+ justify-content: center;
281
+ }
282
+
283
+ .trp-email-course__content {
284
+ position: relative;
285
+ max-width: 350px;
286
+ padding: 60px 40px;
287
+ margin-top: 24px;
288
+ text-align: center;
289
+ background: #dde1e2;
290
+ border: 1px solid #E0E0E0;
291
+ }
292
+
293
+ .trp-email-course h2 {
294
+ font-size: 2.3em;
295
+ line-height: 1.1em;
296
+ margin-top: 0px;
297
+ }
298
+
299
+ .trp-email-course p {
300
+ font-size: 120%;
301
+ color: #2c2e35;
302
+ }
303
+
304
+ .trp-email-course__footer {
305
+ color: #515151 !important;
306
+ margin-bottom: 0px;
307
+ }
308
+
309
+ .trp-email-course input[type="email"] {
310
+ width: 100%;
311
+ height: 32px;
312
+ margin-bottom: 16px;
313
+ }
314
+
315
+ .trp-email-course input[type="submit"] {
316
+ min-height: 40px;
317
+ line-height: 2.50769231; /* 30px */
318
+ padding: 0 12px;
319
+ font-size: 110%;
320
+ }
321
+
322
+ .trp-email-course__message {
323
+ display: none;
324
+ height: 88px;
325
+ font-size: 130%;
326
+ font-weight: 600;
327
+ }
328
+
329
+ .trp-email-course__error {
330
+ display: none;
331
+ font-size: 110%;
332
+ color: #E21E30;
333
+ margin-bottom: 8px;
334
+ }
335
+
336
+ .trp-email-course__error.visible {
337
+ display: block;
338
+ }
339
+
340
+ .trp-email-course__message.visible {
341
+ display: flex;
342
+ justify-content: center;
343
+ align-items: center;
344
+ }
345
+
346
+ .trp-email-course__message.success {
347
+ color: #27ae60;
348
+ }
349
+
350
+ .trp-email-course__close {
351
+ position: absolute;
352
+ top: 24px;
353
+ right: 24px;
354
+ width: 16px;
355
+ height: 16px;
356
+ opacity: 0.6;
357
+ }
358
+
359
+ .trp-email-course__close:hover {
360
+ opacity: 1;
361
+ }
362
+
363
+ .trp-email-course__close:before, .trp-email-course__close:after {
364
+ position: absolute;
365
+ left: 50%;
366
+ transform: translateX( -50% );
367
+ content: ' ';
368
+ height: 15px;
369
+ width: 2px;
370
+ background-color: #333;
371
+ }
372
+
373
+ .trp-email-course__close:before {
374
+ transform: rotate(45deg);
375
+ }
376
+
377
+ .trp-email-course__close:after {
378
+ transform: rotate(-45deg);
379
+ }
380
+
381
+ @media only screen and (min-width: 1024px) {
382
+ #trp-main-settings__wrap {
383
+ display: flex;
384
+ }
385
+
386
+ #trp-main-settings__wrap #trp-options {
387
+ max-width: 1000px;
388
+ }
389
+
390
+ .trp-email-course {
391
+ display: block;
392
+ }
393
+
394
+ .trp-email-course__content {
395
+ margin-left: 40px;
396
+ }
397
+ }
398
+
399
+ @media only screen and (max-width: 1500px) {
400
+ .trp-email-course__content {
401
+ min-width: 300px;
402
+ padding: 50px 30px;
403
+ }
404
+
405
+ .trp-email-course h2 {
406
+ font-size: 2.1em;
407
+ }
408
+ }
assets/js/trp-back-end-script.js CHANGED
@@ -309,3 +309,94 @@ function TRP_Field_Toggler (){
309
  init: init
310
  }
311
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
309
  init: init
310
  }
311
  }
312
+
313
+ // TRP Email Course
314
+ jQuery(document).ready(function (e) {
315
+ jQuery('.trp-email-course input[type="submit"]').on('click', function (e) {
316
+
317
+ e.preventDefault()
318
+
319
+ jQuery( '.trp-email-course .trp-email-course__error' ).removeClass( 'visible' )
320
+
321
+ var email = jQuery( '.trp-email-course input[name="trp_email_course_email"]').val()
322
+
323
+ if (!trp_validateEmail( email ) ){
324
+ jQuery( '.trp-email-course .trp-email-course__error' ).addClass( 'visible' )
325
+ jQuery( '.trp-email-course input[name="trp_email_course_email"]' ).focus()
326
+
327
+ return
328
+ }
329
+
330
+ if( email != '' ){
331
+
332
+ jQuery( '.trp-email-course input[type="submit"' ).val( 'Working...' )
333
+
334
+ var data = new FormData()
335
+ data.append( 'email', email )
336
+
337
+ jQuery.ajax({
338
+ url: 'https://translatepress.com/wp-json/trp-api/emailCourseSubscribe',
339
+ type: 'POST',
340
+ processData: false,
341
+ contentType: false,
342
+ data: data,
343
+ success: function (response) {
344
+
345
+ if( response.message ){
346
+
347
+ jQuery( '.trp-email-course .trp-email-course__message').text( response.message ).addClass( 'visible' ).addClass( 'success' )
348
+ jQuery( '.trp-email-course .trp-email-course__form' ).hide()
349
+ jQuery( '.trp-email-course__footer' ).css( 'visibility', 'hidden' )
350
+
351
+ trp_dimiss_email_course()
352
+
353
+ }
354
+
355
+ },
356
+ error: function (response) {
357
+
358
+ jQuery('.trp-email-course input[type="submit"').val('Sign me up!')
359
+
360
+ }
361
+ })
362
+
363
+ }
364
+
365
+ })
366
+
367
+ jQuery('.trp-email-course .trp-email-course__close').on('click', function (e) {
368
+
369
+ trp_dimiss_email_course()
370
+
371
+ jQuery( '.trp-email-course' ).remove()
372
+
373
+ })
374
+ })
375
+
376
+ function trp_validateEmail(email) {
377
+
378
+ const re = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
379
+ return re.test(String(email).toLowerCase());
380
+
381
+ }
382
+
383
+ function trp_dimiss_email_course(){
384
+
385
+ let newData = new FormData()
386
+ newData.append('action', 'trp_dismiss_email_course')
387
+
388
+ jQuery.ajax({
389
+ url: ajaxurl,
390
+ type: 'POST',
391
+ processData: false,
392
+ contentType: false,
393
+ data: newData,
394
+ success: function (response) {
395
+
396
+ },
397
+ error: function (response) {
398
+
399
+ }
400
+ })
401
+
402
+ }
class-translate-press.php CHANGED
@@ -58,7 +58,7 @@ class TRP_Translate_Press{
58
  define( 'TRP_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
59
  define( 'TRP_PLUGIN_BASE', plugin_basename( __DIR__ . '/index.php' ) );
60
  define( 'TRP_PLUGIN_SLUG', 'translatepress-multilingual' );
61
- define( 'TRP_PLUGIN_VERSION', '2.1.6' );
62
 
63
  wp_cache_add_non_persistent_groups(array('trp'));
64
 
@@ -271,6 +271,9 @@ class TRP_Translate_Press{
271
  $this->loader->add_action( 'admin_init', $this->reviews, 'display_review_notice' );
272
  $this->loader->add_action( 'trp_dismiss_notification', $this->reviews, 'dismiss_notification', 10, 2 );
273
 
 
 
 
274
  }
275
 
276
  /**
@@ -329,6 +332,7 @@ class TRP_Translate_Press{
329
  $this->loader->add_filter( 'home_url', $this->url_converter, 'add_language_to_home_url', 1, 4 );
330
  $this->loader->add_action( 'wp_head', $this->url_converter, 'add_hreflang_to_head' );
331
  $this->loader->add_filter( 'language_attributes', $this->url_converter, 'change_lang_attr_in_html_tag', 10, 1 );
 
332
 
333
 
334
  $this->loader->add_filter( 'widget_text', null, 'do_shortcode', 11 );
58
  define( 'TRP_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
59
  define( 'TRP_PLUGIN_BASE', plugin_basename( __DIR__ . '/index.php' ) );
60
  define( 'TRP_PLUGIN_SLUG', 'translatepress-multilingual' );
61
+ define( 'TRP_PLUGIN_VERSION', '2.1.7' );
62
 
63
  wp_cache_add_non_persistent_groups(array('trp'));
64
 
271
  $this->loader->add_action( 'admin_init', $this->reviews, 'display_review_notice' );
272
  $this->loader->add_action( 'trp_dismiss_notification', $this->reviews, 'dismiss_notification', 10, 2 );
273
 
274
+ // Email Course
275
+ $this->loader->add_action( 'wp_ajax_trp_dismiss_email_course', $this->settings, 'trp_dismiss_email_course' );
276
+
277
  }
278
 
279
  /**
332
  $this->loader->add_filter( 'home_url', $this->url_converter, 'add_language_to_home_url', 1, 4 );
333
  $this->loader->add_action( 'wp_head', $this->url_converter, 'add_hreflang_to_head' );
334
  $this->loader->add_filter( 'language_attributes', $this->url_converter, 'change_lang_attr_in_html_tag', 10, 1 );
335
+ $this->loader->add_filter('trp_is_file', $this->url_converter, 'does_url_contains_array', 10, 2);
336
 
337
 
338
  $this->loader->add_filter( 'widget_text', null, 'do_shortcode', 11 );
includes/class-settings.php CHANGED
@@ -590,4 +590,16 @@ class TRP_Settings{
590
  return $links;
591
  }
592
 
 
 
 
 
 
 
 
 
 
 
 
 
593
  }
590
  return $links;
591
  }
592
 
593
+ public function trp_dismiss_email_course(){
594
+
595
+ $user_id = get_current_user_id();
596
+
597
+ if( empty( $user_id ) )
598
+ die();
599
+
600
+ update_user_meta( $user_id, 'trp_email_course_dismissed', 1 );
601
+ die();
602
+
603
+ }
604
+
605
  }
includes/class-translation-render.php CHANGED
@@ -980,22 +980,22 @@ class TRP_Translation_Render{
980
  // pass the current language in forms where the action does not contain the language
981
  // based on this we're filtering wp_redirect to include the proper URL when returning to the current page.
982
  foreach ( $html->find('form') as $k => $row ){
983
- $row->setAttribute( 'data-trp-original-action', $row->action );
984
- $row->innertext .= apply_filters( 'trp_form_inputs', '<input type="hidden" name="trp-form-language" value="'. $this->settings['url-slugs'][$TRP_LANGUAGE] .'"/>', $TRP_LANGUAGE, $this->settings['url-slugs'][$TRP_LANGUAGE], $row );
985
- $form_action = $row->action;
986
-
987
- $is_external_link = $this->is_external_link( $form_action, $home_url );
988
- $is_admin_link = $this->is_admin_link($form_action, $admin_url, $wp_login_url );
989
-
990
- if ( !empty($form_action)
991
- && $this->settings['force-language-to-custom-links'] == 'yes'
992
- && !$is_external_link
993
- && !$is_admin_link
994
- && strpos($form_action, '#TRPLINKPROCESSED') === false)
995
- {
996
- $row->action = $this->url_converter->get_url_for_language( $TRP_LANGUAGE, $form_action );
 
997
  }
998
- $row->action = str_replace('#TRPLINKPROCESSED', '', $row->action);
999
  }
1000
 
1001
  foreach ( $html->find('link') as $link ){
980
  // pass the current language in forms where the action does not contain the language
981
  // based on this we're filtering wp_redirect to include the proper URL when returning to the current page.
982
  foreach ( $html->find('form') as $k => $row ){
983
+ $form_action = $row->action;
984
+ $is_admin_link = $this->is_admin_link( $form_action, $admin_url, $wp_login_url );
985
+ if(!$is_admin_link) {
986
+ $row->setAttribute( 'data-trp-original-action', $row->action );
987
+ $row->innertext .= apply_filters( 'trp_form_inputs', '<input type="hidden" name="trp-form-language" value="' . $this->settings['url-slugs'][ $TRP_LANGUAGE ] . '"/>', $TRP_LANGUAGE, $this->settings['url-slugs'][ $TRP_LANGUAGE ], $row );
988
+
989
+ $is_external_link = $this->is_external_link( $form_action, $home_url );
990
+
991
+ if ( !empty( $form_action )
992
+ && $this->settings['force-language-to-custom-links'] == 'yes'
993
+ && !$is_external_link
994
+ && strpos( $form_action, '#TRPLINKPROCESSED' ) === false ) {
995
+ $row->action = $this->url_converter->get_url_for_language( $TRP_LANGUAGE, $form_action );
996
+ }
997
+ $row->action = str_replace( '#TRPLINKPROCESSED', '', $row->action );
998
  }
 
999
  }
1000
 
1001
  foreach ( $html->find('link') as $link ){
includes/class-url-converter.php CHANGED
@@ -57,12 +57,12 @@ class TRP_Url_Converter {
57
  $abs_home = $this->get_abs_home();
58
 
59
  if ( trp_force_slash_at_end_of_link( $this->settings ) ) {
60
- $new_url = trailingslashit( trailingslashit($abs_home) . $url_slug );
61
- }
62
- else {
63
- $new_url = trailingslashit($abs_home) . $url_slug;
64
  }
65
 
 
66
  if ( ! empty( $path ) ){
67
  $new_url = trailingslashit($new_url) . ltrim( $path, '/' );
68
  }
@@ -478,13 +478,28 @@ class TRP_Url_Converter {
478
  }else {
479
  $path = trailingslashit( ABSPATH ) . str_replace( untrailingslashit( $this->get_abs_home() ), '', $url );
480
 
481
- $return = is_file( $path );
 
 
 
 
482
  }
483
  }
484
 
485
  return apply_filters( 'trp_url_is_file', $return, $url, $this->get_abs_home() );
486
  }
487
 
 
 
 
 
 
 
 
 
 
 
 
488
 
489
  /**
490
  * Check for a spacial type of URL. Currently includes mailto, tel, callto URL types.
57
  $abs_home = $this->get_abs_home();
58
 
59
  if ( trp_force_slash_at_end_of_link( $this->settings ) ) {
60
+ $new_url = trailingslashit( trailingslashit( $abs_home ) . $url_slug );
61
+ } else {
62
+ $new_url = trailingslashit( $abs_home ) . $url_slug;
 
63
  }
64
 
65
+
66
  if ( ! empty( $path ) ){
67
  $new_url = trailingslashit($new_url) . ltrim( $path, '/' );
68
  }
478
  }else {
479
  $path = trailingslashit( ABSPATH ) . str_replace( untrailingslashit( $this->get_abs_home() ), '', $url );
480
 
481
+ if(apply_filters('trp_is_file', true, $path)) {
482
+ $return = is_file( $path );
483
+ }else{
484
+ $return = true;
485
+ }
486
  }
487
  }
488
 
489
  return apply_filters( 'trp_url_is_file', $return, $url, $this->get_abs_home() );
490
  }
491
 
492
+ public function does_url_contains_array($return, $path){
493
+ $elements_to_avoid = apply_filters( 'trp_elements_to_avoid_when_is_file_is_called', array("index.php", "/../"));
494
+ foreach ($elements_to_avoid as $element){
495
+ if( strpos($path, $element) !== false ){
496
+ $return = false;
497
+ return $return;
498
+ }
499
+ }
500
+
501
+ return $return;
502
+ }
503
 
504
  /**
505
  * Check for a spacial type of URL. Currently includes mailto, tel, callto URL types.
includes/compatibility-functions.php CHANGED
@@ -1541,9 +1541,20 @@ if( function_exists( 'wppb_plugin_init' ) )
1541
  */
1542
 
1543
  if(class_exists('WP_Typography')) {
 
 
 
 
 
 
 
 
1544
 
1545
- add_filter('typo_content_filters', 'trp_remove_filters_wp_typography');
1546
- add_filter( 'trp_translated_html', 'trp_add_filters_wp_typography', 9999, 1 );
 
 
 
1547
  }
1548
 
1549
  function trp_remove_filters_wp_typography($filters){
@@ -1557,12 +1568,15 @@ function trp_remove_filters_wp_typography($filters){
1557
  function trp_add_filters_wp_typography($final_html){
1558
  $wpt= WP_Typography::get_instance();
1559
 
 
 
1560
  $final_html = $wpt->process($final_html, $is_title = false, $force_feed = false, null );
1561
 
1562
  return $final_html;
1563
 
1564
  }
1565
 
 
1566
  /*
1567
  * Compatibility with All In One SEO Pack
1568
  */
1541
  */
1542
 
1543
  if(class_exists('WP_Typography')) {
1544
+ add_action('plugins_loaded', 'trp_wp_typography');
1545
+ }
1546
+
1547
+ function trp_wp_typography(){
1548
+ global $TRP_LANGUAGE;
1549
+ $trp = TRP_Translate_Press::get_trp_instance();
1550
+ $trp_settings = $trp->get_component('settings');
1551
+ $settings = $trp_settings->get_settings();
1552
 
1553
+ if ($TRP_LANGUAGE !== $settings['default-language']) {
1554
+ add_filter( 'typo_content_filters', 'trp_remove_filters_wp_typography' );
1555
+ add_filter( 'trp_translated_html', 'trp_add_filters_wp_typography', 100000, 1 );
1556
+ add_filter('run_wptexturize', '__return_null', 11);
1557
+ }
1558
  }
1559
 
1560
  function trp_remove_filters_wp_typography($filters){
1568
  function trp_add_filters_wp_typography($final_html){
1569
  $wpt= WP_Typography::get_instance();
1570
 
1571
+ add_filter('run_wptexturize', '__return_false', 11);
1572
+
1573
  $final_html = $wpt->process($final_html, $is_title = false, $force_feed = false, null );
1574
 
1575
  return $final_html;
1576
 
1577
  }
1578
 
1579
+
1580
  /*
1581
  * Compatibility with All In One SEO Pack
1582
  */
index.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: TranslatePress - Multilingual
4
  Plugin URI: https://translatepress.com/
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.1.6
7
  Author: Cozmoslabs, Razvan Mocanu, Madalin Ungureanu, Cristophor Hurduban
8
  Author URI: https://cozmoslabs.com/
9
  Text Domain: translatepress-multilingual
3
  Plugin Name: TranslatePress - Multilingual
4
  Plugin URI: https://translatepress.com/
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.1.7
7
  Author: Cozmoslabs, Razvan Mocanu, Madalin Ungureanu, Cristophor Hurduban
8
  Author URI: https://cozmoslabs.com/
9
  Text Domain: translatepress-multilingual
languages/translatepress-multilingual.catalog.php CHANGED
@@ -317,6 +317,13 @@
317
  <?php __("Add a floating dropdown that follows the user on every page.", "translatepress-multilingual"); ?>
318
  <?php __("Show \"Powered by TranslatePress\"", "translatepress-multilingual"); ?>
319
  <?php __("Show the small \"Powered by TranslatePress\" label in the floater language switcher.", "translatepress-multilingual"); ?>
 
 
 
 
 
 
 
320
  <?php __("API Key from settings page:", "translatepress-multilingual"); ?>
321
  <?php __("HTTP Referrer:", "translatepress-multilingual"); ?>
322
  <?php __("Use this HTTP Referrer if the API lets you restrict key usage from its Dashboard.", "translatepress-multilingual"); ?>
317
  <?php __("Add a floating dropdown that follows the user on every page.", "translatepress-multilingual"); ?>
318
  <?php __("Show \"Powered by TranslatePress\"", "translatepress-multilingual"); ?>
319
  <?php __("Show the small \"Powered by TranslatePress\" label in the floater language switcher.", "translatepress-multilingual"); ?>
320
+ <?php __("5 Days to Better Multilingual Websites", "translatepress-multilingual"); ?>
321
+ <?php __("%sJoin our FREE & EXCLUSIVE onboarding course%s and learn how to grow your multilingual traffic, reach international markets, and save time & money while getting the most out of TranslatePress!", "translatepress-multilingual"); ?>
322
+ <?php __("Invalid email address", "translatepress-multilingual"); ?>
323
+ <?php __("Your email", "translatepress-multilingual"); ?>
324
+ <?php __("Sign me up!", "translatepress-multilingual"); ?>
325
+ <?php __("Sign up with your email address and receive a 5-part email guide to help you maximize the power of TranslatePress.", "translatepress-multilingual"); ?>
326
+ <?php __("Dismiss email course notification", "translatepress-multilingual"); ?>
327
  <?php __("API Key from settings page:", "translatepress-multilingual"); ?>
328
  <?php __("HTTP Referrer:", "translatepress-multilingual"); ?>
329
  <?php __("Use this HTTP Referrer if the API lets you restrict key usage from its Dashboard.", "translatepress-multilingual"); ?>
languages/translatepress-multilingual.pot CHANGED
@@ -49,7 +49,7 @@ msgstr ""
49
  msgid "Settings saved."
50
  msgstr ""
51
 
52
- #: includes/class-advanced-tab.php:312, includes/class-error-manager.php:172, partials/machine-translation-settings-page.php:13, partials/machine-translation-settings-page.php:117, partials/machine-translation-settings-page.php:150, partials/main-settings-page.php:41, partials/main-settings-page.php:54, partials/main-settings-page.php:67
53
  msgid "Yes"
54
  msgstr ""
55
 
@@ -1017,7 +1017,7 @@ msgstr ""
1017
  msgid "TranslatePress Advanced Settings"
1018
  msgstr ""
1019
 
1020
- #: partials/advanced-settings-page.php:16, partials/machine-translation-settings-page.php:161, partials/main-settings-page.php:123
1021
  msgid "Save Changes"
1022
  msgstr ""
1023
 
@@ -1065,7 +1065,7 @@ msgstr ""
1065
  msgid "Enable Automatic Translation"
1066
  msgstr ""
1067
 
1068
- #: partials/machine-translation-settings-page.php:12, partials/main-settings-page.php:40, partials/main-settings-page.php:53, partials/main-settings-page.php:66
1069
  msgid "No"
1070
  msgstr ""
1071
 
@@ -1203,94 +1203,122 @@ msgstr ""
1203
  msgid "To add <strong>more than two languages</strong> activate the <strong>Extra Languages Add-on</strong> from <a href=\"%s\" class=\"trp-translatepress-account-page\" target=\"_blank\" title=\"Add-ons page\">the Add-ons Page</a>. Once activated, you'll be able to add unlimited languages."
1204
  msgstr ""
1205
 
1206
- #: partials/main-settings-page.php:10
1207
  msgid "Default Language"
1208
  msgstr ""
1209
 
1210
- #: partials/main-settings-page.php:21
1211
  msgid "Select the original language of your content."
1212
  msgstr ""
1213
 
1214
- #: partials/main-settings-page.php:25
1215
  msgid "WARNING. Changing the default language will invalidate existing translations."
1216
  msgstr ""
1217
 
1218
- #: partials/main-settings-page.php:26
1219
  msgid "Even changing from en_US to en_GB, because they are treated as two different languages."
1220
  msgstr ""
1221
 
1222
- #: partials/main-settings-page.php:27
1223
  msgid "In most cases changing the default flag is all it is needed: "
1224
  msgstr ""
1225
 
1226
- #: partials/main-settings-page.php:28
1227
  msgid "replace the default flag"
1228
  msgstr ""
1229
 
1230
- #: partials/main-settings-page.php:37
1231
  msgid "Native language name"
1232
  msgstr ""
1233
 
1234
- #: partials/main-settings-page.php:44
1235
  msgid "Select Yes if you want to display languages in their native names. Otherwise, languages will be displayed in English."
1236
  msgstr ""
1237
 
1238
- #: partials/main-settings-page.php:50
1239
  msgid "Use a subdirectory for the default language"
1240
  msgstr ""
1241
 
1242
- #: partials/main-settings-page.php:57
1243
  msgid "Select Yes if you want to add the subdirectory in the URL for the default language.</br>By selecting Yes, the default language seen by website visitors will become the first one in the \"All Languages\" list."
1244
  msgstr ""
1245
 
1246
- #: partials/main-settings-page.php:63
1247
  msgid "Force language in custom links"
1248
  msgstr ""
1249
 
1250
- #: partials/main-settings-page.php:70
1251
  msgid "Select Yes if you want to force custom links without language encoding to keep the currently selected language."
1252
  msgstr ""
1253
 
1254
- #: partials/main-settings-page.php:76
1255
  msgid "Language Switcher"
1256
  msgstr ""
1257
 
1258
- #: partials/main-settings-page.php:79
1259
  msgid "Shortcode "
1260
  msgstr ""
1261
 
1262
- #: partials/main-settings-page.php:84
1263
  msgid "Use shortcode on any page or widget."
1264
  msgstr ""
1265
 
1266
- #: partials/main-settings-page.php:88
1267
  msgid "Menu item"
1268
  msgstr ""
1269
 
1270
- #: partials/main-settings-page.php:96
1271
  msgid "Go to %1$s Appearance -> Menus%2$s to add languages to the Language Switcher in any menu."
1272
  msgstr ""
1273
 
1274
- #: partials/main-settings-page.php:97
1275
  msgid "Learn more in our documentation."
1276
  msgstr ""
1277
 
1278
- #: partials/main-settings-page.php:101
1279
  msgid "Floating language selection"
1280
  msgstr ""
1281
 
1282
- #: partials/main-settings-page.php:108
1283
  msgid "Add a floating dropdown that follows the user on every page."
1284
  msgstr ""
1285
 
1286
- #: partials/main-settings-page.php:112
1287
  msgid "Show \"Powered by TranslatePress\""
1288
  msgstr ""
1289
 
1290
- #: partials/main-settings-page.php:114
1291
  msgid "Show the small \"Powered by TranslatePress\" label in the floater language switcher."
1292
  msgstr ""
1293
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1294
  #: partials/test-api-settings-page.php:17
1295
  msgid "API Key from settings page:"
1296
  msgstr ""
49
  msgid "Settings saved."
50
  msgstr ""
51
 
52
+ #: includes/class-advanced-tab.php:312, includes/class-error-manager.php:172, partials/machine-translation-settings-page.php:13, partials/machine-translation-settings-page.php:117, partials/machine-translation-settings-page.php:150, partials/main-settings-page.php:42, partials/main-settings-page.php:55, partials/main-settings-page.php:68
53
  msgid "Yes"
54
  msgstr ""
55
 
1017
  msgid "TranslatePress Advanced Settings"
1018
  msgstr ""
1019
 
1020
+ #: partials/advanced-settings-page.php:16, partials/machine-translation-settings-page.php:161, partials/main-settings-page.php:159
1021
  msgid "Save Changes"
1022
  msgstr ""
1023
 
1065
  msgid "Enable Automatic Translation"
1066
  msgstr ""
1067
 
1068
+ #: partials/machine-translation-settings-page.php:12, partials/main-settings-page.php:41, partials/main-settings-page.php:54, partials/main-settings-page.php:67
1069
  msgid "No"
1070
  msgstr ""
1071
 
1203
  msgid "To add <strong>more than two languages</strong> activate the <strong>Extra Languages Add-on</strong> from <a href=\"%s\" class=\"trp-translatepress-account-page\" target=\"_blank\" title=\"Add-ons page\">the Add-ons Page</a>. Once activated, you'll be able to add unlimited languages."
1204
  msgstr ""
1205
 
1206
+ #: partials/main-settings-page.php:11
1207
  msgid "Default Language"
1208
  msgstr ""
1209
 
1210
+ #: partials/main-settings-page.php:22
1211
  msgid "Select the original language of your content."
1212
  msgstr ""
1213
 
1214
+ #: partials/main-settings-page.php:26
1215
  msgid "WARNING. Changing the default language will invalidate existing translations."
1216
  msgstr ""
1217
 
1218
+ #: partials/main-settings-page.php:27
1219
  msgid "Even changing from en_US to en_GB, because they are treated as two different languages."
1220
  msgstr ""
1221
 
1222
+ #: partials/main-settings-page.php:28
1223
  msgid "In most cases changing the default flag is all it is needed: "
1224
  msgstr ""
1225
 
1226
+ #: partials/main-settings-page.php:29
1227
  msgid "replace the default flag"
1228
  msgstr ""
1229
 
1230
+ #: partials/main-settings-page.php:38
1231
  msgid "Native language name"
1232
  msgstr ""
1233
 
1234
+ #: partials/main-settings-page.php:45
1235
  msgid "Select Yes if you want to display languages in their native names. Otherwise, languages will be displayed in English."
1236
  msgstr ""
1237
 
1238
+ #: partials/main-settings-page.php:51
1239
  msgid "Use a subdirectory for the default language"
1240
  msgstr ""
1241
 
1242
+ #: partials/main-settings-page.php:58
1243
  msgid "Select Yes if you want to add the subdirectory in the URL for the default language.</br>By selecting Yes, the default language seen by website visitors will become the first one in the \"All Languages\" list."
1244
  msgstr ""
1245
 
1246
+ #: partials/main-settings-page.php:64
1247
  msgid "Force language in custom links"
1248
  msgstr ""
1249
 
1250
+ #: partials/main-settings-page.php:71
1251
  msgid "Select Yes if you want to force custom links without language encoding to keep the currently selected language."
1252
  msgstr ""
1253
 
1254
+ #: partials/main-settings-page.php:77
1255
  msgid "Language Switcher"
1256
  msgstr ""
1257
 
1258
+ #: partials/main-settings-page.php:80
1259
  msgid "Shortcode "
1260
  msgstr ""
1261
 
1262
+ #: partials/main-settings-page.php:85
1263
  msgid "Use shortcode on any page or widget."
1264
  msgstr ""
1265
 
1266
+ #: partials/main-settings-page.php:89
1267
  msgid "Menu item"
1268
  msgstr ""
1269
 
1270
+ #: partials/main-settings-page.php:97
1271
  msgid "Go to %1$s Appearance -> Menus%2$s to add languages to the Language Switcher in any menu."
1272
  msgstr ""
1273
 
1274
+ #: partials/main-settings-page.php:98
1275
  msgid "Learn more in our documentation."
1276
  msgstr ""
1277
 
1278
+ #: partials/main-settings-page.php:102
1279
  msgid "Floating language selection"
1280
  msgstr ""
1281
 
1282
+ #: partials/main-settings-page.php:109
1283
  msgid "Add a floating dropdown that follows the user on every page."
1284
  msgstr ""
1285
 
1286
+ #: partials/main-settings-page.php:113
1287
  msgid "Show \"Powered by TranslatePress\""
1288
  msgstr ""
1289
 
1290
+ #: partials/main-settings-page.php:115
1291
  msgid "Show the small \"Powered by TranslatePress\" label in the floater language switcher."
1292
  msgstr ""
1293
 
1294
+ #: partials/main-settings-page.php:131
1295
+ msgid "5 Days to Better Multilingual Websites"
1296
+ msgstr ""
1297
+
1298
+ #: partials/main-settings-page.php:135
1299
+ msgid "%sJoin our FREE & EXCLUSIVE onboarding course%s and learn how to grow your multilingual traffic, reach international markets, and save time & money while getting the most out of TranslatePress!"
1300
+ msgstr ""
1301
+
1302
+ #: partials/main-settings-page.php:141
1303
+ msgid "Invalid email address"
1304
+ msgstr ""
1305
+
1306
+ #: partials/main-settings-page.php:143
1307
+ msgid "Your email"
1308
+ msgstr ""
1309
+
1310
+ #: partials/main-settings-page.php:145
1311
+ msgid "Sign me up!"
1312
+ msgstr ""
1313
+
1314
+ #: partials/main-settings-page.php:149
1315
+ msgid "Sign up with your email address and receive a 5-part email guide to help you maximize the power of TranslatePress."
1316
+ msgstr ""
1317
+
1318
+ #: partials/main-settings-page.php:152
1319
+ msgid "Dismiss email course notification"
1320
+ msgstr ""
1321
+
1322
  #: partials/test-api-settings-page.php:17
1323
  msgid "API Key from settings page:"
1324
  msgstr ""
partials/main-settings-page.php CHANGED
@@ -5,120 +5,156 @@
5
  <h1> <?php esc_html_e( 'TranslatePress Settings', 'translatepress-multilingual' );?></h1>
6
  <?php do_action ( 'trp_settings_navigation_tabs' ); ?>
7
 
8
- <table id="trp-options" class="form-table">
9
- <tr>
10
- <th scope="row"><?php esc_html_e( 'Default Language', 'translatepress-multilingual' ); ?> </th>
11
- <td>
12
- <select id="trp-default-language" name="trp_settings[default-language]" class="trp-select2">
13
- <?php
14
- foreach( $languages as $language_code => $language_name ){ ?>
15
- <option title="<?php echo esc_attr( $language_code ); ?>" value="<?php echo esc_attr( $language_code ); ?>" <?php echo ( $this->settings['default-language'] == $language_code ? 'selected' : '' ); ?> >
16
- <?php echo esc_html( $language_name ); ?>
17
- </option>
18
- <?php }?>
19
- </select>
20
- <p class="description">
21
- <?php esc_html_e( 'Select the original language of your content.', 'translatepress-multilingual' ); ?>
22
- </p>
23
-
24
- <p class="warning" style="display: none;" >
25
- <?php esc_html_e( 'WARNING. Changing the default language will invalidate existing translations.', 'translatepress-multilingual' ); ?><br/>
26
- <?php esc_html_e( 'Even changing from en_US to en_GB, because they are treated as two different languages.', 'translatepress-multilingual' ); ?><br/>
27
- <?php esc_html_e( 'In most cases changing the default flag is all it is needed: ', 'translatepress-multilingual' ); ?>
28
- <a href="https://translatepress.com/docs/developers/replace-default-flags/"><?php esc_html_e( 'replace the default flag', 'translatepress-multilingual' ); ?></a>
29
- </p>
30
-
31
- </td>
32
- </tr>
33
-
34
- <?php do_action( 'trp_language_selector', $languages ); ?>
35
-
36
- <tr>
37
- <th scope="row"><?php esc_html_e( 'Native language name', 'translatepress-multilingual' ); ?> </th>
38
- <td>
39
- <select id="trp-native-language-name" name="trp_settings[native_or_english_name]" class="trp-select">
40
- <option value="english_name" <?php selected( $this->settings['native_or_english_name'], 'english_name' ); ?>><?php esc_html_e( 'No', 'translatepress-multilingual') ?></option>
41
- <option value="native_name" <?php selected( $this->settings['native_or_english_name'], 'native_name' ); ?>><?php esc_html_e( 'Yes', 'translatepress-multilingual') ?></option>
42
- </select>
43
- <p class="description">
44
- <?php esc_html_e( 'Select Yes if you want to display languages in their native names. Otherwise, languages will be displayed in English.', 'translatepress-multilingual' ); ?>
45
- </p>
46
- </td>
47
- </tr>
48
-
49
- <tr>
50
- <th scope="row"><?php esc_html_e( 'Use a subdirectory for the default language', 'translatepress-multilingual' ); ?> </th>
51
- <td>
52
- <select id="trp-subdirectory-for-default-language" name="trp_settings[add-subdirectory-to-default-language]" class="trp-select">
53
- <option value="no" <?php selected( $this->settings['add-subdirectory-to-default-language'], 'no' ); ?>><?php esc_html_e( 'No', 'translatepress-multilingual') ?></option>
54
- <option value="yes" <?php selected( $this->settings['add-subdirectory-to-default-language'], 'yes' ); ?>><?php esc_html_e( 'Yes', 'translatepress-multilingual') ?></option>
55
- </select>
56
- <p class="description">
57
- <?php echo wp_kses ( __( 'Select Yes if you want to add the subdirectory in the URL for the default language.</br>By selecting Yes, the default language seen by website visitors will become the first one in the "All Languages" list.', 'translatepress-multilingual' ), array( 'br' => array() ) ); ?>
58
- </p>
59
- </td>
60
- </tr>
61
-
62
- <tr>
63
- <th scope="row"><?php esc_html_e( 'Force language in custom links', 'translatepress-multilingual' ); ?> </th>
64
- <td>
65
- <select id="trp-force-language-in-custom-links" name="trp_settings[force-language-to-custom-links]" class="trp-select">
66
- <option value="no" <?php selected( $this->settings['force-language-to-custom-links'], 'no' ); ?>><?php esc_html_e( 'No', 'translatepress-multilingual') ?></option>
67
- <option value="yes" <?php selected( $this->settings['force-language-to-custom-links'], 'yes' ); ?>><?php esc_html_e( 'Yes', 'translatepress-multilingual') ?></option>
68
- </select>
69
- <p class="description">
70
- <?php esc_html_e( 'Select Yes if you want to force custom links without language encoding to keep the currently selected language.', 'translatepress-multilingual' ); ?>
71
- </p>
72
- </td>
73
- </tr>
74
-
75
- <tr>
76
- <th scope="row"><?php esc_html_e( 'Language Switcher', 'translatepress-multilingual' ); ?> </th>
77
- <td>
78
- <div class="trp-ls-type">
79
- <input type="checkbox" disabled checked id="trp-ls-shortcode" ><b><?php esc_html_e( 'Shortcode ', 'translatepress-multilingual' ); ?>[language-switcher] </b>
80
- <div>
81
- <?php $this->output_language_switcher_select( 'shortcode-options', $this->settings['shortcode-options'] ); ?>
82
- </div>
83
  <p class="description">
84
- <?php esc_html_e( 'Use shortcode on any page or widget.', 'translatepress-multilingual' ); ?>
85
  </p>
86
- </div>
87
- <div class="trp-ls-type">
88
- <label><input type="checkbox" id="trp-ls-menu" disabled checked ><b><?php esc_html_e( 'Menu item', 'translatepress-multilingual' ); ?></b></label>
89
- <div>
90
- <?php $this->output_language_switcher_select( 'menu-options', $this->settings['menu-options'] ); ?>
91
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92
  <p class="description">
93
- <?php
94
- $link_start = '<a href="' . esc_url( admin_url( 'nav-menus.php' ) ) .'">';
95
- $link_end = '</a>';
96
- printf( wp_kses( __( 'Go to %1$s Appearance -> Menus%2$s to add languages to the Language Switcher in any menu.', 'translatepress-multilingual' ), [ 'a' => [ 'href' => [] ] ] ), $link_start, $link_end ); //phpcs:ignore ?>
97
- <a href="https://translatepress.com/docs/settings/#language-switcher"><?php esc_html_e( 'Learn more in our documentation.', 'translatepress-multilingual' ); ?></a>
98
  </p>
99
- </div>
100
- <div class="trp-ls-type">
101
- <label><input type="checkbox" id="trp-ls-floater" name="trp_settings[trp-ls-floater]" value="yes" <?php if ( isset($this->settings['trp-ls-floater']) && ( $this->settings['trp-ls-floater'] == 'yes' ) ){ echo 'checked'; } ?>><b><?php esc_html_e( 'Floating language selection', 'translatepress-multilingual' ); ?></b></label>
102
- <div>
103
- <?php $this->output_language_switcher_select( 'floater-options', $this->settings['floater-options'] ); ?>
104
- <?php $this->output_language_switcher_floater_color( $this->settings['floater-color'] ); ?>
105
- <?php $this->output_language_switcher_floater_possition( $this->settings['floater-position'] ); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
106
  </div>
 
 
107
  <p class="description">
108
- <?php esc_html_e( 'Add a floating dropdown that follows the user on every page.', 'translatepress-multilingual' ); ?>
109
  </p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
110
  </div>
111
- <div class="trp-ls-type">
112
- <label><input type="checkbox" id="trp-ls-show-poweredby" name="trp_settings[trp-ls-show-poweredby]" value="yes" <?php if ( isset($this->settings['trp-ls-show-poweredby']) && ( $this->settings['trp-ls-show-poweredby'] == 'yes' ) ){ echo 'checked'; } ?>><b><?php esc_html_e( 'Show "Powered by TranslatePress"', 'translatepress-multilingual' ); ?></b></label>
113
- <p class="description">
114
- <?php esc_html_e( 'Show the small "Powered by TranslatePress" label in the floater language switcher.', 'translatepress-multilingual' ); ?>
115
- </p>
116
- </div>
117
- </td>
118
- </tr>
119
 
120
- <?php do_action ( 'trp_extra_settings', $this->settings ); ?>
121
- </table>
122
 
123
  <p class="submit"><input type="submit" class="button-primary" value="<?php esc_attr_e( 'Save Changes', 'translatepress-multilingual' ); ?>" /></p>
124
  </form>
5
  <h1> <?php esc_html_e( 'TranslatePress Settings', 'translatepress-multilingual' );?></h1>
6
  <?php do_action ( 'trp_settings_navigation_tabs' ); ?>
7
 
8
+ <div id="trp-main-settings__wrap">
9
+ <table id="trp-options" class="form-table">
10
+ <tr>
11
+ <th scope="row"><?php esc_html_e( 'Default Language', 'translatepress-multilingual' ); ?> </th>
12
+ <td>
13
+ <select id="trp-default-language" name="trp_settings[default-language]" class="trp-select2">
14
+ <?php
15
+ foreach( $languages as $language_code => $language_name ){ ?>
16
+ <option title="<?php echo esc_attr( $language_code ); ?>" value="<?php echo esc_attr( $language_code ); ?>" <?php echo ( $this->settings['default-language'] == $language_code ? 'selected' : '' ); ?> >
17
+ <?php echo esc_html( $language_name ); ?>
18
+ </option>
19
+ <?php }?>
20
+ </select>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  <p class="description">
22
+ <?php esc_html_e( 'Select the original language of your content.', 'translatepress-multilingual' ); ?>
23
  </p>
24
+
25
+ <p class="warning" style="display: none;" >
26
+ <?php esc_html_e( 'WARNING. Changing the default language will invalidate existing translations.', 'translatepress-multilingual' ); ?><br/>
27
+ <?php esc_html_e( 'Even changing from en_US to en_GB, because they are treated as two different languages.', 'translatepress-multilingual' ); ?><br/>
28
+ <?php esc_html_e( 'In most cases changing the default flag is all it is needed: ', 'translatepress-multilingual' ); ?>
29
+ <a href="https://translatepress.com/docs/developers/replace-default-flags/"><?php esc_html_e( 'replace the default flag', 'translatepress-multilingual' ); ?></a>
30
+ </p>
31
+
32
+ </td>
33
+ </tr>
34
+
35
+ <?php do_action( 'trp_language_selector', $languages ); ?>
36
+
37
+ <tr>
38
+ <th scope="row"><?php esc_html_e( 'Native language name', 'translatepress-multilingual' ); ?> </th>
39
+ <td>
40
+ <select id="trp-native-language-name" name="trp_settings[native_or_english_name]" class="trp-select">
41
+ <option value="english_name" <?php selected( $this->settings['native_or_english_name'], 'english_name' ); ?>><?php esc_html_e( 'No', 'translatepress-multilingual') ?></option>
42
+ <option value="native_name" <?php selected( $this->settings['native_or_english_name'], 'native_name' ); ?>><?php esc_html_e( 'Yes', 'translatepress-multilingual') ?></option>
43
+ </select>
44
  <p class="description">
45
+ <?php esc_html_e( 'Select Yes if you want to display languages in their native names. Otherwise, languages will be displayed in English.', 'translatepress-multilingual' ); ?>
 
 
 
 
46
  </p>
47
+ </td>
48
+ </tr>
49
+
50
+ <tr>
51
+ <th scope="row"><?php esc_html_e( 'Use a subdirectory for the default language', 'translatepress-multilingual' ); ?> </th>
52
+ <td>
53
+ <select id="trp-subdirectory-for-default-language" name="trp_settings[add-subdirectory-to-default-language]" class="trp-select">
54
+ <option value="no" <?php selected( $this->settings['add-subdirectory-to-default-language'], 'no' ); ?>><?php esc_html_e( 'No', 'translatepress-multilingual') ?></option>
55
+ <option value="yes" <?php selected( $this->settings['add-subdirectory-to-default-language'], 'yes' ); ?>><?php esc_html_e( 'Yes', 'translatepress-multilingual') ?></option>
56
+ </select>
57
+ <p class="description">
58
+ <?php echo wp_kses ( __( 'Select Yes if you want to add the subdirectory in the URL for the default language.</br>By selecting Yes, the default language seen by website visitors will become the first one in the "All Languages" list.', 'translatepress-multilingual' ), array( 'br' => array() ) ); ?>
59
+ </p>
60
+ </td>
61
+ </tr>
62
+
63
+ <tr>
64
+ <th scope="row"><?php esc_html_e( 'Force language in custom links', 'translatepress-multilingual' ); ?> </th>
65
+ <td>
66
+ <select id="trp-force-language-in-custom-links" name="trp_settings[force-language-to-custom-links]" class="trp-select">
67
+ <option value="no" <?php selected( $this->settings['force-language-to-custom-links'], 'no' ); ?>><?php esc_html_e( 'No', 'translatepress-multilingual') ?></option>
68
+ <option value="yes" <?php selected( $this->settings['force-language-to-custom-links'], 'yes' ); ?>><?php esc_html_e( 'Yes', 'translatepress-multilingual') ?></option>
69
+ </select>
70
+ <p class="description">
71
+ <?php esc_html_e( 'Select Yes if you want to force custom links without language encoding to keep the currently selected language.', 'translatepress-multilingual' ); ?>
72
+ </p>
73
+ </td>
74
+ </tr>
75
+
76
+ <tr>
77
+ <th scope="row"><?php esc_html_e( 'Language Switcher', 'translatepress-multilingual' ); ?> </th>
78
+ <td>
79
+ <div class="trp-ls-type">
80
+ <input type="checkbox" disabled checked id="trp-ls-shortcode" ><b><?php esc_html_e( 'Shortcode ', 'translatepress-multilingual' ); ?>[language-switcher] </b>
81
+ <div>
82
+ <?php $this->output_language_switcher_select( 'shortcode-options', $this->settings['shortcode-options'] ); ?>
83
+ </div>
84
+ <p class="description">
85
+ <?php esc_html_e( 'Use shortcode on any page or widget.', 'translatepress-multilingual' ); ?>
86
+ </p>
87
+ </div>
88
+ <div class="trp-ls-type">
89
+ <label><input type="checkbox" id="trp-ls-menu" disabled checked ><b><?php esc_html_e( 'Menu item', 'translatepress-multilingual' ); ?></b></label>
90
+ <div>
91
+ <?php $this->output_language_switcher_select( 'menu-options', $this->settings['menu-options'] ); ?>
92
+ </div>
93
+ <p class="description">
94
+ <?php
95
+ $link_start = '<a href="' . esc_url( admin_url( 'nav-menus.php' ) ) .'">';
96
+ $link_end = '</a>';
97
+ printf( wp_kses( __( 'Go to %1$s Appearance -> Menus%2$s to add languages to the Language Switcher in any menu.', 'translatepress-multilingual' ), [ 'a' => [ 'href' => [] ] ] ), $link_start, $link_end ); //phpcs:ignore ?>
98
+ <a href="https://translatepress.com/docs/settings/#language-switcher"><?php esc_html_e( 'Learn more in our documentation.', 'translatepress-multilingual' ); ?></a>
99
+ </p>
100
+ </div>
101
+ <div class="trp-ls-type">
102
+ <label><input type="checkbox" id="trp-ls-floater" name="trp_settings[trp-ls-floater]" value="yes" <?php if ( isset($this->settings['trp-ls-floater']) && ( $this->settings['trp-ls-floater'] == 'yes' ) ){ echo 'checked'; } ?>><b><?php esc_html_e( 'Floating language selection', 'translatepress-multilingual' ); ?></b></label>
103
+ <div>
104
+ <?php $this->output_language_switcher_select( 'floater-options', $this->settings['floater-options'] ); ?>
105
+ <?php $this->output_language_switcher_floater_color( $this->settings['floater-color'] ); ?>
106
+ <?php $this->output_language_switcher_floater_possition( $this->settings['floater-position'] ); ?>
107
+ </div>
108
+ <p class="description">
109
+ <?php esc_html_e( 'Add a floating dropdown that follows the user on every page.', 'translatepress-multilingual' ); ?>
110
+ </p>
111
  </div>
112
+ <div class="trp-ls-type">
113
+ <label><input type="checkbox" id="trp-ls-show-poweredby" name="trp_settings[trp-ls-show-poweredby]" value="yes" <?php if ( isset($this->settings['trp-ls-show-poweredby']) && ( $this->settings['trp-ls-show-poweredby'] == 'yes' ) ){ echo 'checked'; } ?>><b><?php esc_html_e( 'Show "Powered by TranslatePress"', 'translatepress-multilingual' ); ?></b></label>
114
  <p class="description">
115
+ <?php esc_html_e( 'Show the small "Powered by TranslatePress" label in the floater language switcher.', 'translatepress-multilingual' ); ?>
116
  </p>
117
+ </div>
118
+ </td>
119
+ </tr>
120
+
121
+ <?php do_action ( 'trp_extra_settings', $this->settings ); ?>
122
+ </table>
123
+
124
+ <?php
125
+ $email_course_dismissed = get_user_meta( get_current_user_id(), 'trp_email_course_dismissed', true );
126
+
127
+ if( empty( $email_course_dismissed ) || $email_course_dismissed != '1' ) : ?>
128
+ <div class="trp-email-course">
129
+ <div class="trp-email-course__content">
130
+ <h2>
131
+ <?php esc_html_e( '5 Days to Better Multilingual Websites', 'translatepress-multilingual' ); ?>
132
+ </h2>
133
+
134
+ <p>
135
+ <?php printf( esc_html__( '%sJoin our FREE & EXCLUSIVE onboarding course%s and learn how to grow your multilingual traffic, reach international markets, and save time & money while getting the most out of TranslatePress!', 'translatepress-multilingual' ), '<strong>', '</strong>' ); ?>
136
+ </p>
137
+
138
+ <div class="trp-email-course__message"></div>
139
+
140
+ <div class="trp-email-course__form">
141
+ <div class="trp-email-course__error"><?php esc_html_e( 'Invalid email address', 'translatepress-multilingual' ) ?></div>
142
+
143
+ <input type="email" name="trp_email_course_email" placeholder="<?php esc_html_e( 'Your email', 'translatepress-multilingual' ) ?>" value=""/>
144
+
145
+ <input type="submit" class="button-primary" value="<?php esc_attr_e( 'Sign me up!', 'translatepress-multilingual' ); ?>"/>
146
+ </div>
147
+
148
+ <p class="trp-email-course__footer">
149
+ <?php esc_html_e( 'Sign up with your email address and receive a 5-part email guide to help you maximize the power of TranslatePress.', 'translatepress-multilingual' ); ?>
150
+ </p>
151
+
152
+ <a class="trp-email-course__close" href="#dismiss-email-course" title="<?php esc_html_e( 'Dismiss email course notification', 'translatepress-multilingual') ?>"></a>
153
  </div>
154
+ </div>
155
+ <?php endif; ?>
 
 
 
 
 
 
156
 
157
+ </div>
 
158
 
159
  <p class="submit"><input type="submit" class="button-primary" value="<?php esc_attr_e( 'Save Changes', 'translatepress-multilingual' ); ?>" /></p>
160
  </form>
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: translate, translation, multilingual, automatic translation, bilingual, fr
5
  Requires at least: 3.1.0
6
  Tested up to: 5.8.2
7
  Requires PHP: 5.6.20
8
- Stable tag: 2.1.6
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -140,6 +140,12 @@ For more information please check out our [documentation](https://translatepress
140
 
141
 
142
  == Changelog ==
 
 
 
 
 
 
143
  = 2.1.6 =
144
  * Show sanitized translation when editing gettext strings in Translation Editor
145
  * Fixed showing translation language instead of default language in some cases in Elementor, Divi and WPBakery editors
5
  Requires at least: 3.1.0
6
  Tested up to: 5.8.2
7
  Requires PHP: 5.6.20
8
+ Stable tag: 2.1.7
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
140
 
141
 
142
  == Changelog ==
143
+ = 2.1.7 =
144
+ * Added form in settings to sign up for TranslatePress email course
145
+ * Fixed issue when logging in that redirected to "page not found" when languages are reordered
146
+ * Fixed hyphenation issue on default language when using WP-typography plugin
147
+ * Fixed notices regarding is_file call
148
+
149
  = 2.1.6 =
150
  * Show sanitized translation when editing gettext strings in Translation Editor
151
  * Fixed showing translation language instead of default language in some cases in Elementor, Divi and WPBakery editors