PluginProbe
Polylang / 2.3.6
Polylang v2.3.6
3.8.9 3.8.8 3.8.7 3.8.6 3.8.5 3.8.4 3.8.3 2.7 2.7.0.1 2.7.1 2.7.2 2.7.3 2.7.4 2.8 2.8.1 2.8.2 2.8.3 2.8.4 2.9 2.9.1 2.9.2 3.0 3.0.1 3.0.2 3.0.3 All 233 releases
← All changes | include/query.php +2 -9 2.7.32.3.6 View file →
@@ -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 /**