Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#40196 closed enhancement (fixed)

Support querying sites by lang_id

Reported by: ocean90's profile ocean90 Owned by: jeremyfelt's profile jeremyfelt
Milestone: 4.8 Priority: normal
Severity: normal Version:
Component: Networks and Sites Keywords: has-patch has-unit-tests commit
Focuses: multisite Cc:

Description

The wp_blogs table has a lang_id field and I don't see why we shouldn't support this field in WP_Site_Query.

WordPress.org has a separate table to store all locales with its data. By using WP_Site_Query we would benefit of the built-in query cache.

Attachments (2)

40196.patch (4.5 KB) - added by ocean90 8 years ago.
40196.2.patch (7.2 KB) - added by ocean90 8 years ago.

Download all attachments as: .zip

Change History (5)

@ocean90
8 years ago

#1 @spacedmonkey
8 years ago

Thanks for the patch. Can't believe we miss this. The only thing I would change is that I would also add lang_idin and lang_idnot_in to bring it inline with other params

@ocean90
8 years ago

#2 @ocean90
8 years ago

  • Keywords commit added

40196.2.patch adds lang__in and lang__not_in.

#3 @jeremyfelt
8 years ago

  • Owner set to jeremyfelt
  • Resolution set to fixed
  • Status changed from new to closed

In 40340:

Multisite: Add lang_id support to WP_Site_Query.

Sites can now be queried by lang_id, lang__in, and lang__not_in.

Props ocean90.
Fixes #40196.

Note: See TracTickets for help on using tickets.