Skip to content

Commit

Permalink
Fix term update with same value for all langs (#1230)
Browse files Browse the repository at this point in the history
  • Loading branch information
spleen1981 committed Oct 23, 2022
1 parent 451724c commit 821e94b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions admin/qtx_admin_taxonomy.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,13 @@ function qtranxf_term_sanitize_name_unslashed( $term, $taxonomy = null ) {
*/
function qtranxf_term_sanitize_name_db( $term, $taxonomy = null ) {
global $q_config;

if ( ! qtranxf_isMultilingual( $term ) ) {
// Don't call `qtranxf_term_sanitize_name_unslashed`, otherwise the term won't be updated.
// The 'term_sanitized' config should remain empty for that term.
return $term;
}

$term_db = stripcslashes( $term );
if ( isset( $q_config['terms_sanitized'][ $term_db ] ) ) {
return $term;
Expand Down

0 comments on commit 821e94b

Please sign in to comment.