WordPress.org

Make WordPress Core

Opened 8 months ago

Last modified 7 months ago

#46184 new enhancement

Add WP_Tax_Query support to WP_Site_Query

Reported by: desrosj Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Networks and Sites Keywords:
Focuses: multisite, performance Cc:

Description

Because sites are just another object type in WordPress, taxonomies can already be added to the site object type. Even though there are no user interfaces in Core for taxonomies when assigned to object types other than post (for example, see users #31383), it would be nice to add WP_Tax_Query support to WP_Site_Query.

One thing to be aware of though is that there are issues in Core when a taxonomy is assigned to multiple object types. I don't think this should be added until that is addressed. #45107 has a more detailed breakdown of that.

Change History (4)

#1 @johnjamesjacoby
8 months ago

This brings back memories (and nightmares) of the global taxonomy tables.

Interesting idea though. 👍

#2 @pbiron
8 months ago

I don't think this should be added until that is addressed. #45107 has a more detailed breakdown of that.

Another thing that should be addressed is that wp_uninitialize_site() should remove all term relationships for the site.

I'm currently developing a multisite (w/ 2000-3000 sites) that is heavily using blogmeta and site taxonomies (go-live certainly after 5.1, and maybe even 5.2). blogmeta has significantly simplified the code, having more seamless core support for taxonomies on sites would simplify it even more!

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


7 months ago

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


7 months ago

Note: See TracTickets for help on using tickets.