From 395f39aee41fd9f4ba867ed2339e03d09a07bac4 Mon Sep 17 00:00:00 2001 From: Peter Wilson Date: Fri, 8 Apr 2022 06:36:03 +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. Built from https://develop.svn.wordpress.org/trunk@53107 git-svn-id: http://core.svn.wordpress.org/trunk@52696 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-site-query.php | 10 ++++++++++ wp-includes/version.php | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/wp-includes/class-wp-site-query.php b/wp-includes/class-wp-site-query.php index af227c572e..c405cf0ded 100644 --- a/wp-includes/class-wp-site-query.php +++ b/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': diff --git a/wp-includes/version.php b/wp-includes/version.php index 3f24f76a46..0b99ce0a25 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.0-alpha-53106'; +$wp_version = '6.0-alpha-53107'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.