Make WordPress Core

Changeset 53107


Ignore:
Timestamp:
04/08/2022 06:34:21 AM (5 years ago)
Author:
peterwilsoncc
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-site-query.php

    r53097 r53107  
    140140         *                                                   - 'site__in'
    141141         *                                                   - 'network__in'
     142         *                                                   - 'deleted'
     143         *                                                   - 'mature'
     144         *                                                   - 'spam'
     145         *                                                   - 'archived'
     146         *                                                   - 'public'
    142147         *                                                   - false, an empty array, or 'none' to disable `ORDER BY` clause.
    143148         *                                                   Default 'id'.
    … …  
    784789                        case 'path':
    785790                        case 'registered':
     791                        case 'deleted':
     792                        case 'spam':
     793                        case 'mature':
     794                        case 'archived':
     795                        case 'public':
    786796                                $parsed = $orderby;
    787797                                break;
Note: See TracChangeset for help on using the changeset viewer.