Query component

The Query component includes the following:

  • WP_Query, WP_User_Query, and WP_Comment_Query. These are the three APIs that WordPress offers for constructing complex data queries.
  • Template functions used to deterimine the kind of page currently being requested. These are the is_*() functions – is_month(), is_single(), and so on.
  • WP_Meta_Query, WP_Tax_Query, and WP_Date_Query. These are helper classes, used by the main query classes as well as third-party plugins, to construct SQL clauses related to metadata, taxonomyTaxonomy A taxonomy is a way to group things together. In WordPress, some common taxonomies are category, link, tag, or post format. https://codex.wordpress.org/Taxonomies#Default_Taxonomies. terms, and date ranges.

Projects for future releases

  • Improved caching. Most queries are currently cached at the level of individual items (posts, users, etc), but the IDs that result from the query are uncached. See #22176 for an example.
  • The query classes, and particularly WP_Query, contain lots of legacy code that causes problems in edge cases, makes unit testing difficult, and so on. There are various initiatives underway to clean up some of these problems. See #30911 for an example related to post_status.

 

Recent posts on the make/coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. blogblog (versus network, site)

View all posts tagged query.

255 open tickets in the Query component

255 open tickets defect (bug) enhancement feature request
24 30 2
6.8 2 0 0
Awaiting Review 105 33 9
Future Release 28 20 2

255 open tickets. Last 7 days: +0 tickets

2 tickets slated for 6.8

View list in Trac

  • #59516  Improve cache key generation in query classes performance
  • #60745  WP_Query::parse_query() does not handle invalidinvalid A resolution on the bug tracker (and generally common in software development, sometimes also notabug) that indicates the ticket is not a bug, is a support request, or is generally invalid. query arg values

255 open tickets

Open enhancements: 83 View list on Trac
Open tasks: 0 View list on Trac
Open feature requests: 13 View list on Trac
Open defects: 159 View list on Trac

Help maintain this component

Component maintainers:

Many contributors help maintain one or more components. These maintainers are vital to keeping WordPress development running as smoothly as possible. They triagetriage The act of evaluating and sorting bug reports, in order to decide priority, severity, and other factors. new tickets, look after existing ones, spearhead or mentor tasks, pitch new ideas, curate roadmaps, and provide feedback to other contributors. Longtime maintainers with a deep understanding of particular areas of Core are always seeking to mentor others to impart their knowledge.

Want to help? Start following this component! Adjust your notifications here. Feel free to dig into any ticketticket Created for both bug reports and feature development on the bug tracker..

Contributors following this component: