WordPress.org

Make WordPress Core

Opened 2 months ago

Last modified 11 days ago

#45749 assigned enhancement

Add short circuits for multisite classes.

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

Description

The multisite query classes, should have the ability to short circuit results, similar to posts_pre_query to WP_Query (#36687) and posts_pre_query in WP_User_Query (#44169). This short circuit let you load sites / network from another source like ElasticPress.

Attachments (2)

45749.diff (3.6 KB) - added by spacedmonkey 2 months ago.
45749.1.diff (2.8 KB) - added by spacedmonkey 2 months ago.

Download all attachments as: .zip

Change History (7)

@spacedmonkey
2 months ago

#1 @spacedmonkey
2 months ago

There are two way I have gone about this.

  1. In 45749.diff there are no new filters added. This short circult, would work by using the existing action pre_get_sites which would allow you to change the class property of site_ids.
  2. In 45749.1.diff adds a new filter sites_pre_query similar to other filters existing in core.

#2 @spacedmonkey
7 weeks ago

  • Owner set to spacedmonkey
  • Status changed from new to assigned

#3 @desrosj
6 weeks ago

  • Milestone changed from Awaiting Review to Future Release

This ticket was mentioned in Slack in #core-multisite by spacedmonkey. View the logs.


4 weeks ago

This ticket was mentioned in Slack in #core-multisite by spacedmonkey. View the logs.


11 days ago

Note: See TracTickets for help on using tickets.