From 22fbb4a9ae877610f35fa5908c36839d9631674c Mon Sep 17 00:00:00 2001 From: Peter Wilson Date: Fri, 8 Apr 2022 06:34:21 +0000 Subject: [PATCH] Networks and Sites: Increase sort options in `WP_Site_Query`. Add orderby support for the boolean options: deleted, spam, mature, archived and public. Props lenasterg, SergeyBiryukov. Fixes #55226. git-svn-id: https://develop.svn.wordpress.org/trunk@53107 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-site-query.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/wp-includes/class-wp-site-query.php b/src/wp-includes/class-wp-site-query.php index af227c572e..c405cf0ded 100644 --- a/src/wp-includes/class-wp-site-query.php +++ b/src/wp-includes/class-wp-site-query.php @@ -139,6 +139,11 @@ class WP_Site_Query { * - 'path_length' * - 'site__in' * - 'network__in' + * - 'deleted' + * - 'mature' + * - 'spam' + * - 'archived' + * - 'public' * - false, an empty array, or 'none' to disable `ORDER BY` clause. * Default 'id'. * @type string $order How to order retrieved sites. Accepts 'ASC', 'DESC'. Default 'ASC'. @@ -783,6 +788,11 @@ class WP_Site_Query { case 'last_updated': case 'path': case 'registered': + case 'deleted': + case 'spam': + case 'mature': + case 'archived': + case 'public': $parsed = $orderby; break; case 'network_id':