-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add hooks for terms #39
Conversation
get_terms will translate all terms (for example for the tag cloud) term_description will translate the term description (for example for themes that show the WooCommerce product category description)
@@ -225,6 +225,9 @@ function qtranxf_wpseo_replacements($replacements){ | |||
add_filter('link_description', 'qtranxf_useCurrentLanguageIfNotFoundUseDefaultLanguage',0); | |||
add_filter('the_author', 'qtranxf_useCurrentLanguageIfNotFoundUseDefaultLanguage',0); | |||
|
|||
add_filter('get_terms', 'qtranxf_useCurrentLanguageIfNotFoundUseDefaultLanguage',0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Filter 'get_terms' is already in the code at line 484 in qtranslate_frontend.php. Did you test it, btw? Since terms are translated with a different method other than useCurrentLanguageIfNotFoundUseDefaultLanguage
and I do not see how your filter can work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did test it. It probably works here because I imported the terms with my W2Q: WPML to qTranslate tool and I wasn't aware that terms were translated a different way. Any reason why terms are treated differently?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, translations of terms are stored differently in database.
…se the translations are not available inside the constructor Fixes #43
Replaced mysql_real_escape_string with $wpdb->prepare to avoid errors happening under PHP 5.5
Corrected .pot
Corrected country flag for original 'pt' localization Corrected text and localization codes from Brazil to native Portuguese (pt_BR to pt_PT) WordPress have 'pt' and 'pt_BR', pt as native PT and uses _BR sufix for Brazil localization.
…cale code 'pt-br'
* Textarea was not highlighted in Text mode, and in Visual mode only if it was already in Visual mode on page load * Also fixes the problem of the class name being added multiple times
How do I disable this behaviour temporarily? |
@tyteen4a03: which filter? which behaviour? This issue is awfully obsolete and outdated. Please, open a new issue with a step-by-step description of how to reproduce your specific problem. |
get_terms will translate all terms (for example for the tag cloud)
term_description will translate the term description (for example for themes that show the WooCommerce product category description)