WordPress.org

Make WordPress Core

Opened 7 months ago

Last modified 5 months ago

#26580 new enhancement

Add filters to WP_MS_Sites_List_Table::prepare_items()

Reported by: csixty4 Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Networks and Sites Keywords: needs-patch
Focuses: multisite Cc:

Description

In WP_MS_Sites_List_Table::prepare_items(), it would be helpful to be able to filter $like_s before it gets integrated into the query (we needed to force a like %keyword% query).

It might also be handy to filter the WHERE and ORDER BY clauses.

The query filter can be used to alter the SQL after it's generated, but that's just asking for trouble.

Change History (3)

comment:2 jeremyfelt6 months ago

  • Component changed from Multisite to Networks and Sites
  • Focuses multisite added

comment:3 danielbachhuber5 months ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to Future Release

#25338 is related in the sense that there's this general trend of wanting to be able to easily filter prepare_items(). I think it would be interesting to see a patch (that would also solve pagination, total items, etc.)

Note: See TracTickets for help on using tickets.