| @@ -6,9 +6,9 @@ | ||
| 6 | 6 | * @since 2.2 |
| 7 | 7 | */ |
| 8 | 8 | class PLL_Query { |
| 9 | 9 | |
| 10 | - protected static $excludes = array( | |
| 10 | + static protected $excludes = array( | |
| 11 | 11 | 'p', |
| 12 | 12 | 'post_parent', |
| 13 | 13 | 'attachment', |
| 14 | 14 | 'attachment_id', |
| @@ -45,9 +45,8 @@ | ||
| 45 | 45 | |
| 46 | 46 | /** |
| 47 | 47 | * Check if translated taxonomy is queried |
| 48 | 48 | * Compatible with nested queries introduced in WP 4.1 |
| 49 | - * | |
| 50 | 49 | * @see https://wordpress.org/support/topic/tax_query-bug |
| 51 | 50 | * |
| 52 | 51 | * @since 1.7 |
| 53 | 52 | * |
| @@ -106,16 +105,10 @@ | ||
| 106 | 105 | $lang_query, |
| 107 | 106 | array( $tax_query ), |
| 108 | 107 | 'relation' => 'AND', |
| 109 | 108 | ); |
| 110 | - } elseif ( is_array( $tax_query ) ) { | |
| 111 | - // The tax query is expected to be *always* an array, but it seems that 3rd parties fill it with a string | |
| 112 | - // Causing a fatal error if we don't check it. | |
| 113 | - // See https://wordpress.org/support/topic/fatal-error-2947/ | |
| 109 | + } else { | |
| 114 | 110 | $tax_query[] = $lang_query; |
| 115 | - } elseif ( empty( $tax_query ) ) { | |
| 116 | - // Supposing the tax query has been wrongly filled with an empty string | |
| 117 | - $tax_query = array( $lang_query ); | |
| 118 | 111 | } |
| 119 | 112 | } |
| 120 | 113 | |
| 121 | 114 | /** |