Version Description
- Dix incorrect opengraph url in Yoast SEO that caused fatal error with older versions
- Fix for blog page url slug translation
- Fix problem with updating Translator Accounts Add-on
- Fix incorrect number of parameters in wpseo_canonical filter
Download this release
Release Info
Developer | madalin.ungureanu |
Plugin | TranslatePress – Translate Multilingual sites |
Version | 1.7.5 |
Comparing to | |
See all releases |
Code changes from version 1.7.4 to 1.7.5
- class-translate-press.php +1 -1
- includes/class-edd-sl-plugin-updater.php +8 -0
- includes/class-url-converter.php +4 -0
- includes/compatibility-functions.php +13 -3
- index.php +2 -2
- languages/translatepress-multilingual.pot +9 -9
- readme.txt +7 -1
class-translate-press.php
CHANGED
@@ -56,7 +56,7 @@ class TRP_Translate_Press{
|
|
56 |
define( 'TRP_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
57 |
define( 'TRP_PLUGIN_BASE', plugin_basename( __DIR__ . '/index.php' ) );
|
58 |
define( 'TRP_PLUGIN_SLUG', 'translatepress-multilingual' );
|
59 |
-
define( 'TRP_PLUGIN_VERSION', '1.7.
|
60 |
|
61 |
wp_cache_add_non_persistent_groups(array('trp'));
|
62 |
|
56 |
define( 'TRP_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
57 |
define( 'TRP_PLUGIN_BASE', plugin_basename( __DIR__ . '/index.php' ) );
|
58 |
define( 'TRP_PLUGIN_SLUG', 'translatepress-multilingual' );
|
59 |
+
define( 'TRP_PLUGIN_VERSION', '1.7.5' );
|
60 |
|
61 |
wp_cache_add_non_persistent_groups(array('trp'));
|
62 |
|
includes/class-edd-sl-plugin-updater.php
CHANGED
@@ -40,6 +40,14 @@ if( !class_exists('TRP_EDD_SL_Plugin_Updater') ) {
|
|
40 |
$this->api_data = $_api_data;
|
41 |
$this->name = plugin_basename($_plugin_file);
|
42 |
$this->slug = basename($_plugin_file, '.php');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
$this->version = $_api_data['version'];
|
44 |
$this->wp_override = isset($_api_data['wp_override']) ? (bool)$_api_data['wp_override'] : false;
|
45 |
$this->beta = !empty($this->api_data['beta']) ? true : false;
|
40 |
$this->api_data = $_api_data;
|
41 |
$this->name = plugin_basename($_plugin_file);
|
42 |
$this->slug = basename($_plugin_file, '.php');
|
43 |
+
|
44 |
+
// IMPORTANT TranslatePress modification.
|
45 |
+
if ( $this->slug === 'index') {
|
46 |
+
// $this->slug is the add-on file name. For Deepl and Translator accounts the file name is 'index' causing a conflict.
|
47 |
+
$this->slug = dirname( plugin_basename( $_plugin_file ) );
|
48 |
+
}
|
49 |
+
// end modification
|
50 |
+
|
51 |
$this->version = $_api_data['version'];
|
52 |
$this->wp_override = isset($_api_data['wp_override']) ? (bool)$_api_data['wp_override'] : false;
|
53 |
$this->beta = !empty($this->api_data['beta']) ? true : false;
|
includes/class-url-converter.php
CHANGED
@@ -321,6 +321,10 @@ class TRP_Url_Converter {
|
|
321 |
$new_url = $url;
|
322 |
|
323 |
$TRP_LANGUAGE = $trp_language_copy;
|
|
|
|
|
|
|
|
|
324 |
}else {
|
325 |
// we're just adding the new language to the url
|
326 |
$new_url_obj = $url_obj;
|
321 |
$new_url = $url;
|
322 |
|
323 |
$TRP_LANGUAGE = $trp_language_copy;
|
324 |
+
}else if( is_home() ) {
|
325 |
+
$TRP_LANGUAGE = $language;
|
326 |
+
$new_url = get_post_type_archive_link( 'post' );
|
327 |
+
$TRP_LANGUAGE = $trp_language_copy;
|
328 |
}else {
|
329 |
// we're just adding the new language to the url
|
330 |
$new_url_obj = $url_obj;
|
includes/compatibility-functions.php
CHANGED
@@ -667,15 +667,25 @@ function trp_superfly_change_menu_loading_hook(){
|
|
667 |
}
|
668 |
|
669 |
/**
|
670 |
-
* Compatibility with Yoast SEO Canonical URL
|
671 |
* Yoast places the canonical wrongly and it's not processed correctly.
|
672 |
*/
|
673 |
add_filter( 'wpseo_canonical', 'trp_wpseo_canonical_compat', 99999, 2);
|
674 |
-
function trp_wpseo_canonical_compat( $canonical, $presentation_class ){
|
675 |
global $TRP_LANGUAGE;
|
676 |
$trp = TRP_Translate_Press::get_trp_instance();
|
677 |
$url_converter = $trp->get_component( 'url_converter' );
|
678 |
$canonical = $url_converter->get_url_for_language($TRP_LANGUAGE, $canonical, '');
|
679 |
|
680 |
return $canonical;
|
681 |
-
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
667 |
}
|
668 |
|
669 |
/**
|
670 |
+
* Compatibility with Yoast SEO Canonical URL and Opengraph URL
|
671 |
* Yoast places the canonical wrongly and it's not processed correctly.
|
672 |
*/
|
673 |
add_filter( 'wpseo_canonical', 'trp_wpseo_canonical_compat', 99999, 2);
|
674 |
+
function trp_wpseo_canonical_compat( $canonical, $presentation_class = null ){
|
675 |
global $TRP_LANGUAGE;
|
676 |
$trp = TRP_Translate_Press::get_trp_instance();
|
677 |
$url_converter = $trp->get_component( 'url_converter' );
|
678 |
$canonical = $url_converter->get_url_for_language($TRP_LANGUAGE, $canonical, '');
|
679 |
|
680 |
return $canonical;
|
681 |
+
};
|
682 |
+
|
683 |
+
add_filter( 'wpseo_opengraph_url', 'trp_opengraph_url', 99999 );
|
684 |
+
function trp_opengraph_url( $url ) {
|
685 |
+
global $TRP_LANGUAGE;
|
686 |
+
$trp = TRP_Translate_Press::get_trp_instance();
|
687 |
+
$url_converter = $trp->get_component( 'url_converter' );
|
688 |
+
$url = $url_converter->get_url_for_language($TRP_LANGUAGE, $url, '');
|
689 |
+
|
690 |
+
return $url;
|
691 |
+
}
|
index.php
CHANGED
@@ -3,14 +3,14 @@
|
|
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: 1.7.
|
7 |
Author: Cozmoslabs, Razvan Mocanu, Madalin Ungureanu, Cristophor Hurduban
|
8 |
Author URI: https://cozmoslabs.com/
|
9 |
Text Domain: translatepress-multilingual
|
10 |
Domain Path: /languages
|
11 |
License: GPL2
|
12 |
WC requires at least: 2.5.0
|
13 |
-
WC tested up to:
|
14 |
|
15 |
== Copyright ==
|
16 |
Copyright 2017 Cozmoslabs (www.cozmoslabs.com)
|
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: 1.7.5
|
7 |
Author: Cozmoslabs, Razvan Mocanu, Madalin Ungureanu, Cristophor Hurduban
|
8 |
Author URI: https://cozmoslabs.com/
|
9 |
Text Domain: translatepress-multilingual
|
10 |
Domain Path: /languages
|
11 |
License: GPL2
|
12 |
WC requires at least: 2.5.0
|
13 |
+
WC tested up to: 4.1.1
|
14 |
|
15 |
== Copyright ==
|
16 |
Copyright 2017 Cozmoslabs (www.cozmoslabs.com)
|
languages/translatepress-multilingual.pot
CHANGED
@@ -113,7 +113,7 @@ msgstr ""
|
|
113 |
msgid "Select the languages you wish to make your website available in."
|
114 |
msgstr ""
|
115 |
|
116 |
-
#: ../tp-add-on-seo-pack/includes/class-slug-manager.php:
|
117 |
msgid "Post Slug"
|
118 |
msgstr ""
|
119 |
|
@@ -129,35 +129,35 @@ msgstr ""
|
|
129 |
msgid "Are you sure you want to remove this item?"
|
130 |
msgstr ""
|
131 |
|
132 |
-
#: ../translatepress/includes/class-edd-sl-plugin-updater.php:
|
133 |
msgid "An error occurred, please try again."
|
134 |
msgstr ""
|
135 |
|
136 |
-
#: ../translatepress/includes/class-edd-sl-plugin-updater.php:
|
137 |
msgid "Your license key expired on %s."
|
138 |
msgstr ""
|
139 |
|
140 |
-
#: ../translatepress/includes/class-edd-sl-plugin-updater.php:
|
141 |
msgid "Your license key has been disabled."
|
142 |
msgstr ""
|
143 |
|
144 |
-
#: ../translatepress/includes/class-edd-sl-plugin-updater.php:
|
145 |
msgid "Invalid license."
|
146 |
msgstr ""
|
147 |
|
148 |
-
#: ../translatepress/includes/class-edd-sl-plugin-updater.php:
|
149 |
msgid "Your license is not active for this URL."
|
150 |
msgstr ""
|
151 |
|
152 |
-
#: ../translatepress/includes/class-edd-sl-plugin-updater.php:
|
153 |
msgid "This appears to be an invalid license key for %s."
|
154 |
msgstr ""
|
155 |
|
156 |
-
#: ../translatepress/includes/class-edd-sl-plugin-updater.php:
|
157 |
msgid "Your license key has reached its activation limit."
|
158 |
msgstr ""
|
159 |
|
160 |
-
#: ../translatepress/includes/class-edd-sl-plugin-updater.php:
|
161 |
msgid "You have successfully activated your license"
|
162 |
msgstr ""
|
163 |
|
113 |
msgid "Select the languages you wish to make your website available in."
|
114 |
msgstr ""
|
115 |
|
116 |
+
#: ../tp-add-on-seo-pack/includes/class-slug-manager.php:40, ../tp-add-on-seo-pack/includes/string-translation/class-string-translation-seo.php:56
|
117 |
msgid "Post Slug"
|
118 |
msgstr ""
|
119 |
|
129 |
msgid "Are you sure you want to remove this item?"
|
130 |
msgstr ""
|
131 |
|
132 |
+
#: ../translatepress/includes/class-edd-sl-plugin-updater.php:689, ../translatepress/includes/class-edd-sl-plugin-updater.php:721, ../translatepress/includes/class-edd-sl-plugin-updater.php:792
|
133 |
msgid "An error occurred, please try again."
|
134 |
msgstr ""
|
135 |
|
136 |
+
#: ../translatepress/includes/class-edd-sl-plugin-updater.php:700
|
137 |
msgid "Your license key expired on %s."
|
138 |
msgstr ""
|
139 |
|
140 |
+
#: ../translatepress/includes/class-edd-sl-plugin-updater.php:705
|
141 |
msgid "Your license key has been disabled."
|
142 |
msgstr ""
|
143 |
|
144 |
+
#: ../translatepress/includes/class-edd-sl-plugin-updater.php:708
|
145 |
msgid "Invalid license."
|
146 |
msgstr ""
|
147 |
|
148 |
+
#: ../translatepress/includes/class-edd-sl-plugin-updater.php:712
|
149 |
msgid "Your license is not active for this URL."
|
150 |
msgstr ""
|
151 |
|
152 |
+
#: ../translatepress/includes/class-edd-sl-plugin-updater.php:715
|
153 |
msgid "This appears to be an invalid license key for %s."
|
154 |
msgstr ""
|
155 |
|
156 |
+
#: ../translatepress/includes/class-edd-sl-plugin-updater.php:718
|
157 |
msgid "Your license key has reached its activation limit."
|
158 |
msgstr ""
|
159 |
|
160 |
+
#: ../translatepress/includes/class-edd-sl-plugin-updater.php:752
|
161 |
msgid "You have successfully activated your license"
|
162 |
msgstr ""
|
163 |
|
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.4.1
|
7 |
Requires PHP: 5.6.20
|
8 |
-
Stable tag: 1.7.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -138,6 +138,12 @@ For more information please check out our [documentation](https://translatepress
|
|
138 |
|
139 |
|
140 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
141 |
= 1.7.4 =
|
142 |
* Fix fatal error with get_the_date filter due to other plugins calling incorrect params
|
143 |
* Fix issue with identical string in multiple places not showing all related strings
|
5 |
Requires at least: 3.1.0
|
6 |
Tested up to: 5.4.1
|
7 |
Requires PHP: 5.6.20
|
8 |
+
Stable tag: 1.7.5
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
138 |
|
139 |
|
140 |
== Changelog ==
|
141 |
+
= 1.7.5 =
|
142 |
+
* Dix incorrect opengraph url in Yoast SEO that caused fatal error with older versions
|
143 |
+
* Fix for blog page url slug translation
|
144 |
+
* Fix problem with updating Translator Accounts Add-on
|
145 |
+
* Fix incorrect number of parameters in wpseo_canonical filter
|
146 |
+
|
147 |
= 1.7.4 =
|
148 |
* Fix fatal error with get_the_date filter due to other plugins calling incorrect params
|
149 |
* Fix issue with identical string in multiple places not showing all related strings
|