#55226 closed enhancement (fixed)
Update class-wp-site-query.php - Change function parse_orderby()
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 6.0 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Networks and Sites | Keywords: | has-patch |
Focuses: | Cc: |
Description
This is a follow-up to #26580.
Currently there isn't allowed to sort the site query based on the 'deleted' field which is striped from the "orderby" keys due to parse_orderby() function.
In order to have plugins that give the ability to add filters to the sites list to sort deleted/active sites, we need the 'deleted' field of wp_blogs table to be sortable.
A possible solution suggestion into the following PR
Change History (8)
This ticket was mentioned in PR #2345 on WordPress/wordpress-develop by lenasterg.
19 months ago
#1
- Keywords has-patch added
#3
follow-up:
↓ 4
@
19 months ago
To try and avoid followup tickets, is the same needed for any/all of the other boolean fields in the table: mature, spam, archived, public?
#4
in reply to:
↑ 3
@
19 months ago
Hi,
I think you are right about that. It's better to do it for all the fieldes.
Replying to peterwilsoncc:
To try and avoid followup tickets, is the same needed for any/all of the other boolean fields in the table: mature, spam, archived, public?
This ticket was mentioned in Slack in #core by costdev. View the logs.
18 months ago
#6
@
18 months ago
@lenasterg I've pushed some additional commits to your branch to add the additional booleans and include them in the documentation.
#7
@
18 months ago
- Owner set to peterwilsoncc
- Resolution set to fixed
- Status changed from new to closed
In 53107:
Addition to function parse_orderby()
the case 'deleted'
This is useful in order to allow the sites to be sortable based on the 'deleted' field column.
Trac ticket: https://core.trac.wordpress.org/ticket/55226