Skip to content

Commit

Permalink
WP45 fix: /wp-admin/term.php #342
Browse files Browse the repository at this point in the history
  • Loading branch information
johnclause committed Apr 19, 2016
1 parent 64cf3da commit f8149ca
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
9 changes: 7 additions & 2 deletions admin/qtx_admin_utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,7 @@ function qtranxf_useAdminTermLibJoin($obj, $taxonomies=null, $args=null) {
switch($pagenow){
case 'nav-menus.php':
case 'edit-tags.php':
case 'term.php':
case 'edit.php':
return qtranxf_get_terms_joined($obj);
default: return qtranxf_useTermLib($obj);
Expand All @@ -380,8 +381,8 @@ function qtranxf_useAdminTermLibJoin($obj, $taxonomies=null, $args=null) {
//does someone use it?
function qtranxf_useAdminTermLib($obj) {
//qtranxf_dbg_echo('qtranxf_useAdminTermLib: $obj: ',$obj,true);
if ($script_name==='/wp-admin/edit-tags.php' &&
strstr($_SERVER['QUERY_STRING'], 'action=edit' )!==FALSE)
if ($script_name==='/wp-admin/term.php' || ($script_name==='/wp-admin/edit-tags.php' &&
strstr($_SERVER['QUERY_STRING'], 'action=edit' )!==FALSE))
{
return $obj;
}
Expand Down Expand Up @@ -598,6 +599,7 @@ function qtranxf_admin_list_cats($text) {
//qtranxf_dbg_echo('qtranxf_admin_list_cats: $text',$text);
switch($pagenow){
case 'edit-tags.php':
case 'term.php':
//replace [:] with <:>
$blocks = qtranxf_get_language_blocks($text);
if(count($blocks)<=1) return $text;
Expand All @@ -615,6 +617,7 @@ function qtranxf_admin_dropdown_cats($text) {
//qtranxf_dbg_echo('qtranxf_admin_list_cats: $text',$text);
switch($pagenow){
case 'edit-tags.php':
case 'term.php':
return $text;
default: return qtranxf_useCurrentLanguageIfNotFoundUseDefaultLanguage($text);
}
Expand All @@ -624,6 +627,7 @@ function qtranxf_admin_dropdown_cats($text) {
function qtranxf_admin_category_description($text) {
global $pagenow;
switch($pagenow){
case 'term.php':
case 'edit-tags.php':
return $text;
default: return qtranxf_useCurrentLanguageIfNotFoundUseDefaultLanguage($text);
Expand All @@ -634,6 +638,7 @@ function qtranxf_admin_category_description($text) {
function qtranxf_admin_the_title($title) {
global $pagenow;
switch($pagenow){
//case 'term.php':
//case 'edit-tags.php':
case 'nav-menus.php':
return $title;
Expand Down
2 changes: 1 addition & 1 deletion i18n-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
}
,
"edit-tag":{
"pages":{"edit-tags.php":"action=edit"},
"pages":{"term.php":"","edit-tags.php":"action=edit"},
"forms":{
"edittag":{
"fields":{
Expand Down
7 changes: 4 additions & 3 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Developed by: qTranslate Team based on original code by Qian Qin
Contributors: johnclause, chineseleper, Vavooon, grafcom
Tags: multilingual, language, admin, tinymce, bilingual, widget, switcher, i18n, l10n, multilanguage, translation
Requires at least: 3.9
Tested up to: 4.4
Stable tag: 3.4.6.4
Tested up to: 4.5
Stable tag: 3.4.6.5
License: GPLv3 or later
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QEXEK3HX8AR6U
License URI: http://www.gnu.org/licenses/gpl-3.0.html
Expand Down Expand Up @@ -96,7 +96,7 @@ Developers: please drop new topics here, the text will be moved to [qTranslate-X
## Upgrade Notice ##

### 3.4.6.5 ###
Fix: Handling the lack of PHP function `mb_convert_case`, as PHP module `mbstring` may not be installed by default.
Compatibility issues with WP 4.5

### 3.4.6.4 ###
Fix: A fix for Internal Server Error 500 under some circumstances.
Expand All @@ -117,6 +117,7 @@ This version recovers translation of parent of a category on category edit page.
* Fix: regular expression to detect `lang=xx` in line `preg_match('/(^|&|&amp;|&#038;|\?)lang=([a-z]{2})/i',$url_info['query'],$match)` of file `qtranslate_core.php`: [Issue #288](https://github.com/qTranslate-Team/qtranslate-x/issues/288).
* Fix: smooth run of wp-cron.php from command line: [WP Topic](https://wordpress.org/support/topic/messy-wp-cronphp-command-line-output).
* Fix: consistency of option "Hide Content ..." to show single post without 404 error, like it is with single page: [Issue #297](https://github.com/qTranslate-Team/qtranslate-x/issues/297).
* Fix: LSB on term adit page in WP45: [Issue #342](https://github.com/qTranslate-Team/qtranslate-x/issues/342)

### 3.4.6.4 release ###
* Enhancement: The list of avalable languages in "Not Available Message" and alternative language shown now follow the order of languges defined on configuration page, ignoring the default language. For example, if the first language in the order is English, the second is your native and the default, then English translation will be preferably shown as alternative language. Most sites are expected to be unaffected, since the first language in the order is normally the default langauge. However, it may make sense to first try to show most common language (like English in this example), instead of the default language. Now this is possible with putting the most common language to be the first in the order of languages. The order affects language menu, widget and language shown when translation is not available, as well as any other place where languages need to be listed in an order.
Expand Down

0 comments on commit f8149ca

Please sign in to comment.