File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed
Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -1308,4 +1308,33 @@ public function test_orderby_array_backward_compatibility() {
13081308
13091309 $ this ->assertSame ( $ terms , $ q2 ->terms );
13101310 }
1311+
1312+ /**
1313+ * @ticket 63890
1314+ */
1315+ public function test_orderby_array_all_invalid_fields_fallback () {
1316+ register_taxonomy ( 'wptests_tax_fallback ' , 'post ' );
1317+
1318+ $ terms = self ::factory ()->term ->create_many (
1319+ 2 ,
1320+ array (
1321+ 'taxonomy ' => 'wptests_tax_fallback ' ,
1322+ )
1323+ );
1324+
1325+ $ q = new WP_Term_Query (
1326+ array (
1327+ 'taxonomy ' => 'wptests_tax_fallback ' ,
1328+ 'orderby ' => array (
1329+ 'invalid_field1 ' => 'ASC ' ,
1330+ 'invalid_field2 ' => 'DESC ' ,
1331+ ),
1332+ 'hide_empty ' => false ,
1333+ 'fields ' => 'ids ' ,
1334+ )
1335+ );
1336+
1337+ $ this ->assertNotEmpty ( $ q ->terms );
1338+ $ this ->assertCount ( 2 , $ q ->terms );
1339+ }
13111340}
You can’t perform that action at this time.
0 commit comments