get_current_language() ) ) { $clauses['join'] = preg_replace( '/(^.* AS tt ON t.term_id = tt.term_id)/m', '${1}' . ' JOIN `' . $wpdb->prefix . 'icl_translations` AS icl_t ON icl_t.element_id = tt.term_taxonomy_id', $clauses['join'] ); $clauses['where'] .= " AND icl_t.language_code = '" . $current_language . "'"; if ( is_string( $query_taxonomies = self::$all_query_parameters['taxonomy'] ) ) { $query_taxonomies = array ( $query_taxonomies ); } $taxonomies = array(); foreach ( $query_taxonomies as $taxonomy) { $taxonomies[] = 'tax_' . $taxonomy; } $clauses['where'] .= "AND icl_t.element_type IN ( '" . join( "','", $taxonomies ) . "' )"; } return $clauses; } // mla_get_terms_clauses } // Class MLA_WPML_Shortcodes ?>