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
This commit is contained in:
parent
67e97dc748
commit
395f39aee4
|
@ -139,6 +139,11 @@ class WP_Site_Query {
|
||||||
* - 'path_length'
|
* - 'path_length'
|
||||||
* - 'site__in'
|
* - 'site__in'
|
||||||
* - 'network__in'
|
* - 'network__in'
|
||||||
|
* - 'deleted'
|
||||||
|
* - 'mature'
|
||||||
|
* - 'spam'
|
||||||
|
* - 'archived'
|
||||||
|
* - 'public'
|
||||||
* - false, an empty array, or 'none' to disable `ORDER BY` clause.
|
* - false, an empty array, or 'none' to disable `ORDER BY` clause.
|
||||||
* Default 'id'.
|
* Default 'id'.
|
||||||
* @type string $order How to order retrieved sites. Accepts 'ASC', 'DESC'. Default 'ASC'.
|
* @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 'last_updated':
|
||||||
case 'path':
|
case 'path':
|
||||||
case 'registered':
|
case 'registered':
|
||||||
|
case 'deleted':
|
||||||
|
case 'spam':
|
||||||
|
case 'mature':
|
||||||
|
case 'archived':
|
||||||
|
case 'public':
|
||||||
$parsed = $orderby;
|
$parsed = $orderby;
|
||||||
break;
|
break;
|
||||||
case 'network_id':
|
case 'network_id':
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue