<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[52226] trunk/src/wp-includes: Query: Correct and standardise the meta query documentation.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { white-space: pre-line; overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="https://core.trac.wordpress.org/changeset/52226">52226</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"https://core.trac.wordpress.org/changeset/52226","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>johnbillion</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2021-11-20 00:06:06 +0000 (Sat, 20 Nov 2021)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Query: Correct and standardise the meta query documentation.
Also improves the formatting of some surrounding documentation.
Props audrasjb, johnbillion
Fixes <a href="https://core.trac.wordpress.org/ticket/53467">#53467</a></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpincludesclasswpcommentqueryphp">trunk/src/wp-includes/class-wp-comment-query.php</a></li>
<li><a href="#trunksrcwpincludesclasswpmetaqueryphp">trunk/src/wp-includes/class-wp-meta-query.php</a></li>
<li><a href="#trunksrcwpincludesclasswpqueryphp">trunk/src/wp-includes/class-wp-query.php</a></li>
<li><a href="#trunksrcwpincludesclasswpsitequeryphp">trunk/src/wp-includes/class-wp-site-query.php</a></li>
<li><a href="#trunksrcwpincludesclasswptermqueryphp">trunk/src/wp-includes/class-wp-term-query.php</a></li>
<li><a href="#trunksrcwpincludesclasswpuserqueryphp">trunk/src/wp-includes/class-wp-user-query.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpincludesclasswpcommentqueryphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/class-wp-comment-query.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-comment-query.php 2021-11-19 22:54:34 UTC (rev 52225)
+++ trunk/src/wp-includes/class-wp-comment-query.php 2021-11-20 00:06:06 UTC (rev 52226)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -141,114 +141,134 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.5.0 Introduced the `$author_url` argument.
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.6.0 Introduced the `$cache_domain` argument.
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.9.0 Introduced the `$paged` argument.
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since 5.1.0 Introduced the `$meta_compare_key` argument.
+ * @since 5.3.0 Introduced the `$meta_type_key` argument.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string|array $query {
</span><span class="cx" style="display: block; padding: 0 10px"> * Optional. Array or query string of comment query parameters. Default empty.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @type string $author_email Comment author email address. Default empty.
- * @type string $author_url Comment author URL. Default empty.
- * @type int[] $author__in Array of author IDs to include comments for. Default empty.
- * @type int[] $author__not_in Array of author IDs to exclude comments for. Default empty.
- * @type int[] $comment__in Array of comment IDs to include. Default empty.
- * @type int[] $comment__not_in Array of comment IDs to exclude. Default empty.
- * @type bool $count Whether to return a comment count (true) or array of
- * comment objects (false). Default false.
- * @type array $date_query Date query clauses to limit comments by. See WP_Date_Query.
- * Default null.
- * @type string $fields Comment fields to return. Accepts 'ids' for comment IDs
- * only or empty for all fields. Default empty.
- * @type int $ID Currently unused.
- * @type array $include_unapproved Array of IDs or email addresses of users whose unapproved
- * comments will be returned by the query regardless of
- * `$status`. Default empty.
- * @type int $karma Karma score to retrieve matching comments for.
- * Default empty.
- * @type string $meta_key Include comments with a matching comment meta key.
- * Default empty.
- * @type string $meta_value Include comments with a matching comment meta value.
- * Requires `$meta_key` to be set. Default empty.
- * @type array $meta_query Meta query clauses to limit retrieved comments by.
- * See WP_Meta_Query. Default empty.
- * @type int $number Maximum number of comments to retrieve.
- * Default empty (no limit).
- * @type int $paged When used with $number, defines the page of results to return.
- * When used with $offset, $offset takes precedence. Default 1.
- * @type int $offset Number of comments to offset the query. Used to build
- * LIMIT clause. Default 0.
- * @type bool $no_found_rows Whether to disable the `SQL_CALC_FOUND_ROWS` query.
- * Default: true.
- * @type string|array $orderby Comment status or array of statuses. To use 'meta_value'
- * or 'meta_value_num', `$meta_key` must also be defined.
- * To sort by a specific `$meta_query` clause, use that
- * clause's array key. Accepts 'comment_agent',
- * 'comment_approved', 'comment_author',
- * 'comment_author_email', 'comment_author_IP',
- * 'comment_author_url', 'comment_content', 'comment_date',
- * 'comment_date_gmt', 'comment_ID', 'comment_karma',
- * 'comment_parent', 'comment_post_ID', 'comment_type',
- * 'user_id', 'comment__in', 'meta_value', 'meta_value_num',
- * the value of $meta_key, and the array keys of
- * `$meta_query`. Also accepts false, an empty array, or
- * 'none' to disable `ORDER BY` clause.
- * Default: 'comment_date_gmt'.
- * @type string $order How to order retrieved comments. Accepts 'ASC', 'DESC'.
- * Default: 'DESC'.
- * @type int $parent Parent ID of comment to retrieve children of.
- * Default empty.
- * @type int[] $parent__in Array of parent IDs of comments to retrieve children for.
- * Default empty.
- * @type int[] $parent__not_in Array of parent IDs of comments *not* to retrieve
- * children for. Default empty.
- * @type int[] $post_author__in Array of author IDs to retrieve comments for.
- * Default empty.
- * @type int[] $post_author__not_in Array of author IDs *not* to retrieve comments for.
- * Default empty.
- * @type int $post_ID Currently unused.
- * @type int $post_id Limit results to those affiliated with a given post ID.
- * Default 0.
- * @type int[] $post__in Array of post IDs to include affiliated comments for.
- * Default empty.
- * @type int[] $post__not_in Array of post IDs to exclude affiliated comments for.
- * Default empty.
- * @type int $post_author Post author ID to limit results by. Default empty.
- * @type string|array $post_status Post status or array of post statuses to retrieve
- * affiliated comments for. Pass 'any' to match any value.
- * Default empty.
- * @type string|array $post_type Post type or array of post types to retrieve affiliated
- * comments for. Pass 'any' to match any value. Default empty.
- * @type string $post_name Post name to retrieve affiliated comments for.
- * Default empty.
- * @type int $post_parent Post parent ID to retrieve affiliated comments for.
- * Default empty.
- * @type string $search Search term(s) to retrieve matching comments for.
- * Default empty.
- * @type string|array $status Comment statuses to limit results by. Accepts an array
- * or space/comma-separated list of 'hold' (`comment_status=0`),
- * 'approve' (`comment_status=1`), 'all', or a custom
- * comment status. Default 'all'.
- * @type string|array $type Include comments of a given type, or array of types.
- * Accepts 'comment', 'pings' (includes 'pingback' and
- * 'trackback'), or any custom type string. Default empty.
- * @type string[] $type__in Include comments from a given array of comment types.
- * Default empty.
- * @type string[] $type__not_in Exclude comments from a given array of comment types.
- * Default empty.
- * @type int $user_id Include comments for a specific user ID. Default empty.
- * @type bool|string $hierarchical Whether to include comment descendants in the results.
- * - 'threaded' returns a tree, with each comment's children
- * stored in a `children` property on the `WP_Comment` object.
- * - 'flat' returns a flat array of found comments plus
- * their children.
- * - Boolean `false` leaves out descendants.
- * The parameter is ignored (forced to `false`) when
- * `$fields` is 'ids' or 'counts'. Accepts 'threaded',
- * 'flat', or false. Default: false.
- * @type string $cache_domain Unique cache key to be produced when this query is stored in
- * an object cache. Default is 'core'.
- * @type bool $update_comment_meta_cache Whether to prime the metadata cache for found comments.
- * Default true.
- * @type bool $update_comment_post_cache Whether to prime the cache for comment posts.
- * Default false.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @type string $author_email Comment author email address. Default empty.
+ * @type string $author_url Comment author URL. Default empty.
+ * @type int[] $author__in Array of author IDs to include comments for. Default empty.
+ * @type int[] $author__not_in Array of author IDs to exclude comments for. Default empty.
+ * @type int[] $comment__in Array of comment IDs to include. Default empty.
+ * @type int[] $comment__not_in Array of comment IDs to exclude. Default empty.
+ * @type bool $count Whether to return a comment count (true) or array of
+ * comment objects (false). Default false.
+ * @type array $date_query Date query clauses to limit comments by. See WP_Date_Query.
+ * Default null.
+ * @type string $fields Comment fields to return. Accepts 'ids' for comment IDs
+ * only or empty for all fields. Default empty.
+ * @type int $ID Currently unused.
+ * @type array $include_unapproved Array of IDs or email addresses of users whose unapproved
+ * comments will be returned by the query regardless of
+ * `$status`. Default empty.
+ * @type int $karma Karma score to retrieve matching comments for.
+ * Default empty.
+ * @type string|string[] $meta_key Meta key or keys to filter by.
+ * @type string|string[] $meta_value Meta value or values to filter by.
+ * @type string $meta_compare MySQL operator used for comparing the meta value.
+ * See WP_Meta_Query::__construct for accepted values and default value.
+ * @type string $meta_compare_key MySQL operator used for comparing the meta key.
+ * See WP_Meta_Query::__construct for accepted values and default value.
+ * @type string $meta_type MySQL data type that the meta_value column will be CAST to for comparisons.
+ * See WP_Meta_Query::__construct for accepted values and default value.
+ * @type string $meta_type_key MySQL data type that the meta_key column will be CAST to for comparisons.
+ * See WP_Meta_Query::__construct for accepted values and default value.
+ * @type array $meta_query An associative array of WP_Meta_Query arguments.
+ * See WP_Meta_Query::__construct for accepted values.
+ * @type int $number Maximum number of comments to retrieve.
+ * Default empty (no limit).
+ * @type int $paged When used with `$number`, defines the page of results to return.
+ * When used with `$offset`, `$offset` takes precedence. Default 1.
+ * @type int $offset Number of comments to offset the query. Used to build
+ * LIMIT clause. Default 0.
+ * @type bool $no_found_rows Whether to disable the `SQL_CALC_FOUND_ROWS` query.
+ * Default: true.
+ * @type string|array $orderby Comment status or array of statuses. To use 'meta_value'
+ * or 'meta_value_num', `$meta_key` must also be defined.
+ * To sort by a specific `$meta_query` clause, use that
+ * clause's array key. Accepts:
+ * - 'comment_agent'
+ * - 'comment_approved'
+ * - 'comment_author'
+ * - 'comment_author_email'
+ * - 'comment_author_IP'
+ * - 'comment_author_url'
+ * - 'comment_content'
+ * - 'comment_date'
+ * - 'comment_date_gmt'
+ * - 'comment_ID'
+ * - 'comment_karma'
+ * - 'comment_parent'
+ * - 'comment_post_ID'
+ * - 'comment_type'
+ * - 'user_id'
+ * - 'comment__in'
+ * - 'meta_value'
+ * - 'meta_value_num'
+ * - The value of `$meta_key`
+ * - The array keys of `$meta_query`
+ * - false, an empty array, or 'none' to disable `ORDER BY` clause.
+ * Default: 'comment_date_gmt'.
+ * @type string $order How to order retrieved comments. Accepts 'ASC', 'DESC'.
+ * Default: 'DESC'.
+ * @type int $parent Parent ID of comment to retrieve children of.
+ * Default empty.
+ * @type int[] $parent__in Array of parent IDs of comments to retrieve children for.
+ * Default empty.
+ * @type int[] $parent__not_in Array of parent IDs of comments *not* to retrieve
+ * children for. Default empty.
+ * @type int[] $post_author__in Array of author IDs to retrieve comments for.
+ * Default empty.
+ * @type int[] $post_author__not_in Array of author IDs *not* to retrieve comments for.
+ * Default empty.
+ * @type int $post_ID Currently unused.
+ * @type int $post_id Limit results to those affiliated with a given post ID.
+ * Default 0.
+ * @type int[] $post__in Array of post IDs to include affiliated comments for.
+ * Default empty.
+ * @type int[] $post__not_in Array of post IDs to exclude affiliated comments for.
+ * Default empty.
+ * @type int $post_author Post author ID to limit results by. Default empty.
+ * @type string|array $post_status Post status or array of post statuses to retrieve
+ * affiliated comments for. Pass 'any' to match any value.
+ * Default empty.
+ * @type string|array $post_type Post type or array of post types to retrieve affiliated
+ * comments for. Pass 'any' to match any value. Default empty.
+ * @type string $post_name Post name to retrieve affiliated comments for.
+ * Default empty.
+ * @type int $post_parent Post parent ID to retrieve affiliated comments for.
+ * Default empty.
+ * @type string $search Search term(s) to retrieve matching comments for.
+ * Default empty.
+ * @type string|array $status Comment statuses to limit results by. Accepts an array
+ * or space/comma-separated list of 'hold' (`comment_status=0`),
+ * 'approve' (`comment_status=1`), 'all', or a custom
+ * comment status. Default 'all'.
+ * @type string|array $type Include comments of a given type, or array of types.
+ * Accepts 'comment', 'pings' (includes 'pingback' and
+ * 'trackback'), or any custom type string. Default empty.
+ * @type string[] $type__in Include comments from a given array of comment types.
+ * Default empty.
+ * @type string[] $type__not_in Exclude comments from a given array of comment types.
+ * Default empty.
+ * @type int $user_id Include comments for a specific user ID. Default empty.
+ * @type bool|string $hierarchical Whether to include comment descendants in the results.
+ * - 'threaded' returns a tree, with each comment's children
+ * stored in a `children` property on the `WP_Comment` object.
+ * - 'flat' returns a flat array of found comments plus
+ * their children.
+ * - Boolean `false` leaves out descendants.
+ * The parameter is ignored (forced to `false`) when
+ * `$fields` is 'ids' or 'counts'. Accepts 'threaded',
+ * 'flat', or false. Default: false.
+ * @type string $cache_domain Unique cache key to be produced when this query is stored in
+ * an object cache. Default is 'core'.
+ * @type bool $update_comment_meta_cache Whether to prime the metadata cache for found comments.
+ * Default true.
+ * @type bool $update_comment_post_cache Whether to prime the cache for comment posts.
+ * Default false.
</ins><span class="cx" style="display: block; padding: 0 10px"> * }
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function __construct( $query = '' ) {
</span></span></pre></div>
<a id="trunksrcwpincludesclasswpmetaqueryphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/class-wp-meta-query.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-meta-query.php 2021-11-19 22:54:34 UTC (rev 52225)
+++ trunk/src/wp-includes/class-wp-meta-query.php 2021-11-20 00:06:06 UTC (rev 52226)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -99,37 +99,68 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.2.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.2.0 Introduced support for naming query clauses by associative array keys.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @since 5.1.0 Introduced $compare_key clause parameter, which enables LIKE key matches.
- * @since 5.3.0 Increased the number of operators available to $compare_key. Introduced $type_key,
- * which enables the $key to be cast to a new data type for comparisons.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since 5.1.0 Introduced `$compare_key` clause parameter, which enables LIKE key matches.
+ * @since 5.3.0 Increased the number of operators available to `$compare_key`. Introduced `$type_key`,
+ * which enables the `$key` to be cast to a new data type for comparisons.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param array $meta_query {
</span><span class="cx" style="display: block; padding: 0 10px"> * Array of meta query clauses. When first-order clauses or sub-clauses use strings as
</span><span class="cx" style="display: block; padding: 0 10px"> * their array keys, they may be referenced in the 'orderby' parameter of the parent query.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @type string $relation Optional. The MySQL keyword used to join
- * the clauses of the query. Accepts 'AND', or 'OR'. Default 'AND'.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @type string $relation Optional. The MySQL keyword used to join the clauses of the query.
+ * Accepts 'AND' or 'OR'. Default 'AND'.
</ins><span class="cx" style="display: block; padding: 0 10px"> * @type array ...$0 {
</span><span class="cx" style="display: block; padding: 0 10px"> * Optional. An array of first-order clause parameters, or another fully-formed meta query.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @type string $key Meta key to filter by.
- * @type string $compare_key MySQL operator used for comparing the $key. Accepts '=', '!='
- * 'LIKE', 'NOT LIKE', 'IN', 'NOT IN', 'REGEXP', 'NOT REGEXP', 'RLIKE',
- * 'EXISTS' (alias of '=') or 'NOT EXISTS' (alias of '!=').
- * Default is 'IN' when `$key` is an array, '=' otherwise.
- * @type string $type_key MySQL data type that the meta_key column will be CAST to for
- * comparisons. Accepts 'BINARY' for case-sensitive regular expression
- * comparisons. Default is ''.
- * @type string $value Meta value to filter by.
- * @type string $compare MySQL operator used for comparing the $value. Accepts '=',
- * '!=', '>', '>=', '<', '<=', 'LIKE', 'NOT LIKE',
- * 'IN', 'NOT IN', 'BETWEEN', 'NOT BETWEEN', 'REGEXP',
- * 'NOT REGEXP', 'RLIKE', 'EXISTS' or 'NOT EXISTS'.
- * Default is 'IN' when `$value` is an array, '=' otherwise.
- * @type string $type MySQL data type that the meta_value column will be CAST to for
- * comparisons. Accepts 'NUMERIC', 'BINARY', 'CHAR', 'DATE',
- * 'DATETIME', 'DECIMAL', 'SIGNED', 'TIME', or 'UNSIGNED'.
- * Default is 'CHAR'.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @type string|string[] $key Meta key or keys to filter by.
+ * @type string $compare_key MySQL operator used for comparing the $key. Accepts:
+ * - '='
+ * - '!='
+ * - 'LIKE'
+ * - 'NOT LIKE'
+ * - 'IN'
+ * - 'NOT IN'
+ * - 'REGEXP'
+ * - 'NOT REGEXP'
+ * - 'RLIKE',
+ * - 'EXISTS' (alias of '=')
+ * - 'NOT EXISTS' (alias of '!=')
+ * Default is 'IN' when `$key` is an array, '=' otherwise.
+ * @type string $type_key MySQL data type that the meta_key column will be CAST to for
+ * comparisons. Accepts 'BINARY' for case-sensitive regular expression
+ * comparisons. Default is ''.
+ * @type string|string[] $value Meta value or values to filter by.
+ * @type string $compare MySQL operator used for comparing the $value. Accepts:
+ * - '=',
+ * - '!='
+ * - '>'
+ * - '>='
+ * - '<'
+ * - '<='
+ * - 'LIKE'
+ * - 'NOT LIKE'
+ * - 'IN'
+ * - 'NOT IN'
+ * - 'BETWEEN'
+ * - 'NOT BETWEEN'
+ * - 'REGEXP'
+ * - 'NOT REGEXP'
+ * - 'RLIKE'
+ * - 'EXISTS'
+ * - 'NOT EXISTS'
+ * Default is 'IN' when `$value` is an array, '=' otherwise.
+ * @type string $type MySQL data type that the meta_value column will be CAST to for
+ * comparisons. Accepts:
+ * - 'NUMERIC'
+ * - 'BINARY'
+ * - 'CHAR'
+ * - 'DATE'
+ * - 'DATETIME'
+ * - 'DECIMAL'
+ * - 'SIGNED'
+ * - 'TIME'
+ * - 'UNSIGNED'
+ * Default is 'CHAR'.
</ins><span class="cx" style="display: block; padding: 0 10px"> * }
</span><span class="cx" style="display: block; padding: 0 10px"> * }
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span></span></pre></div>
<a id="trunksrcwpincludesclasswpqueryphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/class-wp-query.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-query.php 2021-11-19 22:54:34 UTC (rev 52225)
+++ trunk/src/wp-includes/class-wp-query.php 2021-11-20 00:06:06 UTC (rev 52226)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -630,118 +630,137 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string|array $query {
</span><span class="cx" style="display: block; padding: 0 10px"> * Optional. Array or string of Query parameters.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @type int $attachment_id Attachment post ID. Used for 'attachment' post_type.
- * @type int|string $author Author ID, or comma-separated list of IDs.
- * @type string $author_name User 'user_nicename'.
- * @type int[] $author__in An array of author IDs to query from.
- * @type int[] $author__not_in An array of author IDs not to query from.
- * @type bool $cache_results Whether to cache post information. Default true.
- * @type int|string $cat Category ID or comma-separated list of IDs (this or any children).
- * @type int[] $category__and An array of category IDs (AND in).
- * @type int[] $category__in An array of category IDs (OR in, no children).
- * @type int[] $category__not_in An array of category IDs (NOT in).
- * @type string $category_name Use category slug (not name, this or any children).
- * @type array|int $comment_count Filter results by comment count. Provide an integer to match
- * comment count exactly. Provide an array with integer 'value'
- * and 'compare' operator ('=', '!=', '>', '>=', '<', '<=' ) to
- * compare against comment_count in a specific way.
- * @type string $comment_status Comment status.
- * @type int $comments_per_page The number of comments to return per page.
- * Default 'comments_per_page' option.
- * @type array $date_query An associative array of WP_Date_Query arguments.
- * See WP_Date_Query::__construct().
- * @type int $day Day of the month. Default empty. Accepts numbers 1-31.
- * @type bool $exact Whether to search by exact keyword. Default false.
- * @type string $fields Post fields to query for. Accepts:
- * - '' Returns an array of complete post objects (`WP_Post[]`).
- * - 'ids' Returns an array of post IDs (`int[]`).
- * - 'id=>parent' Returns an associative array of parent post IDs,
- * keyed by post ID (`int[]`).
- * Default ''.
- * @type int $hour Hour of the day. Default empty. Accepts numbers 0-23.
- * @type int|bool $ignore_sticky_posts Whether to ignore sticky posts or not. Setting this to false
- * excludes stickies from 'post__in'. Accepts 1|true, 0|false.
- * Default false.
- * @type int $m Combination YearMonth. Accepts any four-digit year and month
- * numbers 1-12. Default empty.
- * @type string $meta_compare Comparison operator to test the 'meta_value'.
- * @type string $meta_compare_key Comparison operator to test the 'meta_key'.
- * @type string $meta_key Custom field key.
- * @type array $meta_query An associative array of WP_Meta_Query arguments. See WP_Meta_Query.
- * @type string $meta_value Custom field value.
- * @type int $meta_value_num Custom field value number.
- * @type string $meta_type_key Cast for 'meta_key'. See WP_Meta_Query::construct().
- * @type int $menu_order The menu order of the posts.
- * @type int $minute Minute of the hour. Default empty. Accepts numbers 0-59.
- * @type int $monthnum The two-digit month. Default empty. Accepts numbers 1-12.
- * @type string $name Post slug.
- * @type bool $nopaging Show all posts (true) or paginate (false). Default false.
- * @type bool $no_found_rows Whether to skip counting the total rows found. Enabling can improve
- * performance. Default false.
- * @type int $offset The number of posts to offset before retrieval.
- * @type string $order Designates ascending or descending order of posts. Default 'DESC'.
- * Accepts 'ASC', 'DESC'.
- * @type string|array $orderby Sort retrieved posts by parameter. One or more options may be
- * passed. To use 'meta_value', or 'meta_value_num',
- * 'meta_key=keyname' must be also be defined. To sort by a
- * specific `$meta_query` clause, use that clause's array key.
- * Accepts 'none', 'name', 'author', 'date', 'title',
- * 'modified', 'menu_order', 'parent', 'ID', 'rand',
- * 'relevance', 'RAND(x)' (where 'x' is an integer seed value),
- * 'comment_count', 'meta_value', 'meta_value_num', 'post__in',
- * 'post_name__in', 'post_parent__in', and the array keys
- * of `$meta_query`. Default is 'date', except when a search
- * is being performed, when the default is 'relevance'.
- * @type int $p Post ID.
- * @type int $page Show the number of posts that would show up on page X of a
- * static front page.
- * @type int $paged The number of the current page.
- * @type int $page_id Page ID.
- * @type string $pagename Page slug.
- * @type string $perm Show posts if user has the appropriate capability.
- * @type string $ping_status Ping status.
- * @type int[] $post__in An array of post IDs to retrieve, sticky posts will be included.
- * @type int[] $post__not_in An array of post IDs not to retrieve. Note: a string of comma-
- * separated IDs will NOT work.
- * @type string $post_mime_type The mime type of the post. Used for 'attachment' post_type.
- * @type string[] $post_name__in An array of post slugs that results must match.
- * @type int $post_parent Page ID to retrieve child pages for. Use 0 to only retrieve
- * top-level pages.
- * @type int[] $post_parent__in An array containing parent page IDs to query child pages from.
- * @type int[] $post_parent__not_in An array containing parent page IDs not to query child pages from.
- * @type string|array $post_type A post type slug (string) or array of post type slugs.
- * Default 'any' if using 'tax_query'.
- * @type string|array $post_status A post status (string) or array of post statuses.
- * @type int $posts_per_page The number of posts to query for. Use -1 to request all posts.
- * @type int $posts_per_archive_page The number of posts to query for by archive page. Overrides
- * 'posts_per_page' when is_archive(), or is_search() are true.
- * @type string $s Search keyword(s). Prepending a term with a hyphen will
- * exclude posts matching that term. Eg, 'pillow -sofa' will
- * return posts containing 'pillow' but not 'sofa'. The
- * character used for exclusion can be modified using the
- * the 'wp_query_search_exclusion_prefix' filter.
- * @type int $second Second of the minute. Default empty. Accepts numbers 0-59.
- * @type bool $sentence Whether to search by phrase. Default false.
- * @type bool $suppress_filters Whether to suppress filters. Default false.
- * @type string $tag Tag slug. Comma-separated (either), Plus-separated (all).
- * @type int[] $tag__and An array of tag IDs (AND in).
- * @type int[] $tag__in An array of tag IDs (OR in).
- * @type int[] $tag__not_in An array of tag IDs (NOT in).
- * @type int $tag_id Tag id or comma-separated list of IDs.
- * @type string[] $tag_slug__and An array of tag slugs (AND in).
- * @type string[] $tag_slug__in An array of tag slugs (OR in). unless 'ignore_sticky_posts' is
- * true. Note: a string of comma-separated IDs will NOT work.
- * @type array $tax_query An associative array of WP_Tax_Query arguments.
- * See WP_Tax_Query->__construct().
- * @type string $title Post title.
- * @type bool $update_post_meta_cache Whether to update the post meta cache. Default true.
- * @type bool $update_post_term_cache Whether to update the post term cache. Default true.
- * @type bool $lazy_load_term_meta Whether to lazy-load term meta. Setting to false will
- * disable cache priming for term meta, so that each
- * get_term_meta() call will hit the database.
- * Defaults to the value of `$update_post_term_cache`.
- * @type int $w The week number of the year. Default empty. Accepts numbers 0-53.
- * @type int $year The four-digit year. Default empty. Accepts any four-digit year.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @type int $attachment_id Attachment post ID. Used for 'attachment' post_type.
+ * @type int|string $author Author ID, or comma-separated list of IDs.
+ * @type string $author_name User 'user_nicename'.
+ * @type int[] $author__in An array of author IDs to query from.
+ * @type int[] $author__not_in An array of author IDs not to query from.
+ * @type bool $cache_results Whether to cache post information. Default true.
+ * @type int|string $cat Category ID or comma-separated list of IDs (this or any children).
+ * @type int[] $category__and An array of category IDs (AND in).
+ * @type int[] $category__in An array of category IDs (OR in, no children).
+ * @type int[] $category__not_in An array of category IDs (NOT in).
+ * @type string $category_name Use category slug (not name, this or any children).
+ * @type array|int $comment_count Filter results by comment count. Provide an integer to match
+ * comment count exactly. Provide an array with integer 'value'
+ * and 'compare' operator ('=', '!=', '>', '>=', '<', '<=' ) to
+ * compare against comment_count in a specific way.
+ * @type string $comment_status Comment status.
+ * @type int $comments_per_page The number of comments to return per page.
+ * Default 'comments_per_page' option.
+ * @type array $date_query An associative array of WP_Date_Query arguments.
+ * See WP_Date_Query::__construct().
+ * @type int $day Day of the month. Default empty. Accepts numbers 1-31.
+ * @type bool $exact Whether to search by exact keyword. Default false.
+ * @type string $fields Post fields to query for. Accepts:
+ * - '' Returns an array of complete post objects (`WP_Post[]`).
+ * - 'ids' Returns an array of post IDs (`int[]`).
+ * - 'id=>parent' Returns an associative array of parent post IDs,
+ * keyed by post ID (`int[]`).
+ * Default ''.
+ * @type int $hour Hour of the day. Default empty. Accepts numbers 0-23.
+ * @type int|bool $ignore_sticky_posts Whether to ignore sticky posts or not. Setting this to false
+ * excludes stickies from 'post__in'. Accepts 1|true, 0|false.
+ * Default false.
+ * @type int $m Combination YearMonth. Accepts any four-digit year and month
+ * numbers 1-12. Default empty.
+ * @type string|string[] $meta_key Meta key or keys to filter by.
+ * @type string|string[] $meta_value Meta value or values to filter by.
+ * @type string $meta_compare MySQL operator used for comparing the meta value.
+ * See WP_Meta_Query::__construct for accepted values and default value.
+ * @type string $meta_compare_key MySQL operator used for comparing the meta key.
+ * See WP_Meta_Query::__construct for accepted values and default value.
+ * @type string $meta_type MySQL data type that the meta_value column will be CAST to for comparisons.
+ * See WP_Meta_Query::__construct for accepted values and default value.
+ * @type string $meta_type_key MySQL data type that the meta_key column will be CAST to for comparisons.
+ * See WP_Meta_Query::__construct for accepted values and default value.
+ * @type array $meta_query An associative array of WP_Meta_Query arguments.
+ * See WP_Meta_Query::__construct for accepted values.
+ * @type int $menu_order The menu order of the posts.
+ * @type int $minute Minute of the hour. Default empty. Accepts numbers 0-59.
+ * @type int $monthnum The two-digit month. Default empty. Accepts numbers 1-12.
+ * @type string $name Post slug.
+ * @type bool $nopaging Show all posts (true) or paginate (false). Default false.
+ * @type bool $no_found_rows Whether to skip counting the total rows found. Enabling can improve
+ * performance. Default false.
+ * @type int $offset The number of posts to offset before retrieval.
+ * @type string $order Designates ascending or descending order of posts. Default 'DESC'.
+ * Accepts 'ASC', 'DESC'.
+ * @type string|array $orderby Sort retrieved posts by parameter. One or more options may be passed.
+ * To use 'meta_value', or 'meta_value_num', 'meta_key=keyname' must be
+ * also be defined. To sort by a specific `$meta_query` clause, use that
+ * clause's array key. Accepts:
+ * - 'none'
+ * - 'name'
+ * - 'author'
+ * - 'date'
+ * - 'title'
+ * - 'modified'
+ * - 'menu_order'
+ * - 'parent'
+ * - 'ID'
+ * - 'rand'
+ * - 'relevance'
+ * - 'RAND(x)' (where 'x' is an integer seed value)
+ * - 'comment_count'
+ * - 'meta_value'
+ * - 'meta_value_num'
+ * - 'post__in'
+ * - 'post_name__in'
+ * - 'post_parent__in'
+ * - The array keys of `$meta_query`.
+ * Default is 'date', except when a search is being performed, when
+ * the default is 'relevance'.
+ * @type int $p Post ID.
+ * @type int $page Show the number of posts that would show up on page X of a
+ * static front page.
+ * @type int $paged The number of the current page.
+ * @type int $page_id Page ID.
+ * @type string $pagename Page slug.
+ * @type string $perm Show posts if user has the appropriate capability.
+ * @type string $ping_status Ping status.
+ * @type int[] $post__in An array of post IDs to retrieve, sticky posts will be included.
+ * @type int[] $post__not_in An array of post IDs not to retrieve. Note: a string of comma-
+ * separated IDs will NOT work.
+ * @type string $post_mime_type The mime type of the post. Used for 'attachment' post_type.
+ * @type string[] $post_name__in An array of post slugs that results must match.
+ * @type int $post_parent Page ID to retrieve child pages for. Use 0 to only retrieve
+ * top-level pages.
+ * @type int[] $post_parent__in An array containing parent page IDs to query child pages from.
+ * @type int[] $post_parent__not_in An array containing parent page IDs not to query child pages from.
+ * @type string|array $post_type A post type slug (string) or array of post type slugs.
+ * Default 'any' if using 'tax_query'.
+ * @type string|array $post_status A post status (string) or array of post statuses.
+ * @type int $posts_per_page The number of posts to query for. Use -1 to request all posts.
+ * @type int $posts_per_archive_page The number of posts to query for by archive page. Overrides
+ * 'posts_per_page' when is_archive(), or is_search() are true.
+ * @type string $s Search keyword(s). Prepending a term with a hyphen will
+ * exclude posts matching that term. Eg, 'pillow -sofa' will
+ * return posts containing 'pillow' but not 'sofa'. The
+ * character used for exclusion can be modified using the
+ * the 'wp_query_search_exclusion_prefix' filter.
+ * @type int $second Second of the minute. Default empty. Accepts numbers 0-59.
+ * @type bool $sentence Whether to search by phrase. Default false.
+ * @type bool $suppress_filters Whether to suppress filters. Default false.
+ * @type string $tag Tag slug. Comma-separated (either), Plus-separated (all).
+ * @type int[] $tag__and An array of tag IDs (AND in).
+ * @type int[] $tag__in An array of tag IDs (OR in).
+ * @type int[] $tag__not_in An array of tag IDs (NOT in).
+ * @type int $tag_id Tag id or comma-separated list of IDs.
+ * @type string[] $tag_slug__and An array of tag slugs (AND in).
+ * @type string[] $tag_slug__in An array of tag slugs (OR in). unless 'ignore_sticky_posts' is
+ * true. Note: a string of comma-separated IDs will NOT work.
+ * @type array $tax_query An associative array of WP_Tax_Query arguments.
+ * See WP_Tax_Query->__construct().
+ * @type string $title Post title.
+ * @type bool $update_post_meta_cache Whether to update the post meta cache. Default true.
+ * @type bool $update_post_term_cache Whether to update the post term cache. Default true.
+ * @type bool $lazy_load_term_meta Whether to lazy-load term meta. Setting to false will
+ * disable cache priming for term meta, so that each
+ * get_term_meta() call will hit the database.
+ * Defaults to the value of `$update_post_term_cache`.
+ * @type int $w The week number of the year. Default empty. Accepts numbers 0-53.
+ * @type int $year The four-digit year. Default empty. Accepts any four-digit year.
</ins><span class="cx" style="display: block; padding: 0 10px"> * }
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function parse_query( $query = '' ) {
</span></span></pre></div>
<a id="trunksrcwpincludesclasswpsitequeryphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/class-wp-site-query.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-site-query.php 2021-11-19 22:54:34 UTC (rev 52225)
+++ trunk/src/wp-includes/class-wp-site-query.php 2021-11-20 00:06:06 UTC (rev 52226)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -109,62 +109,74 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.6.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.8.0 Introduced the 'lang_id', 'lang__in', and 'lang__not_in' parameters.
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 5.1.0 Introduced the 'update_site_meta_cache', 'meta_query', 'meta_key',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * 'meta_value', 'meta_type' and 'meta_compare' parameters.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * 'meta_compare_key', 'meta_value', 'meta_type', and 'meta_compare' parameters.
+ * @since 5.3.0 Introduced the 'meta_type_key' parameter.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string|array $query {
</span><span class="cx" style="display: block; padding: 0 10px"> * Optional. Array or query string of site query parameters. Default empty.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @type int[] $site__in Array of site IDs to include. Default empty.
- * @type int[] $site__not_in Array of site IDs to exclude. Default empty.
- * @type bool $count Whether to return a site count (true) or array of site objects.
- * Default false.
- * @type array $date_query Date query clauses to limit sites by. See WP_Date_Query.
- * Default null.
- * @type string $fields Site fields to return. Accepts 'ids' (returns an array of site IDs)
- * or empty (returns an array of complete site objects). Default empty.
- * @type int $ID A site ID to only return that site. Default empty.
- * @type int $number Maximum number of sites to retrieve. Default 100.
- * @type int $offset Number of sites to offset the query. Used to build LIMIT clause.
- * Default 0.
- * @type bool $no_found_rows Whether to disable the `SQL_CALC_FOUND_ROWS` query. Default true.
- * @type string|array $orderby Site status or array of statuses. Accepts 'id', 'domain', 'path',
- * 'network_id', 'last_updated', 'registered', 'domain_length',
- * 'path_length', 'site__in' and 'network__in'. Also accepts false,
- * an empty array, or 'none' to disable `ORDER BY` clause.
- * Default 'id'.
- * @type string $order How to order retrieved sites. Accepts 'ASC', 'DESC'. Default 'ASC'.
- * @type int $network_id Limit results to those affiliated with a given network ID. If 0,
- * include all networks. Default 0.
- * @type int[] $network__in Array of network IDs to include affiliated sites for. Default empty.
- * @type int[] $network__not_in Array of network IDs to exclude affiliated sites for. Default empty.
- * @type string $domain Limit results to those affiliated with a given domain. Default empty.
- * @type string[] $domain__in Array of domains to include affiliated sites for. Default empty.
- * @type string[] $domain__not_in Array of domains to exclude affiliated sites for. Default empty.
- * @type string $path Limit results to those affiliated with a given path. Default empty.
- * @type string[] $path__in Array of paths to include affiliated sites for. Default empty.
- * @type string[] $path__not_in Array of paths to exclude affiliated sites for. Default empty.
- * @type int $public Limit results to public sites. Accepts '1' or '0'. Default empty.
- * @type int $archived Limit results to archived sites. Accepts '1' or '0'. Default empty.
- * @type int $mature Limit results to mature sites. Accepts '1' or '0'. Default empty.
- * @type int $spam Limit results to spam sites. Accepts '1' or '0'. Default empty.
- * @type int $deleted Limit results to deleted sites. Accepts '1' or '0'. Default empty.
- * @type int $lang_id Limit results to a language ID. Default empty.
- * @type string[] $lang__in Array of language IDs to include affiliated sites for. Default empty.
- * @type string[] $lang__not_in Array of language IDs to exclude affiliated sites for. Default empty.
- * @type string $search Search term(s) to retrieve matching sites for. Default empty.
- * @type string[] $search_columns Array of column names to be searched. Accepts 'domain' and 'path'.
- * Default empty array.
- * @type bool $update_site_cache Whether to prime the cache for found sites. Default true.
- * @type bool $update_site_meta_cache Whether to prime the metadata cache for found sites. Default true.
- * @type array $meta_query Meta query clauses to limit retrieved sites by. See `WP_Meta_Query`.
- * Default empty.
- * @type string $meta_key Limit sites to those matching a specific metadata key.
- * Can be used in conjunction with `$meta_value`. Default empty.
- * @type string $meta_value Limit sites to those matching a specific metadata value.
- * Usually used in conjunction with `$meta_key`. Default empty.
- * @type string $meta_type Data type that the `$meta_value` column will be CAST to for
- * comparisons. Default empty.
- * @type string $meta_compare Comparison operator to test the `$meta_value`. Default empty.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @type int[] $site__in Array of site IDs to include. Default empty.
+ * @type int[] $site__not_in Array of site IDs to exclude. Default empty.
+ * @type bool $count Whether to return a site count (true) or array of site objects.
+ * Default false.
+ * @type array $date_query Date query clauses to limit sites by. See WP_Date_Query.
+ * Default null.
+ * @type string $fields Site fields to return. Accepts 'ids' (returns an array of site IDs)
+ * or empty (returns an array of complete site objects). Default empty.
+ * @type int $ID A site ID to only return that site. Default empty.
+ * @type int $number Maximum number of sites to retrieve. Default 100.
+ * @type int $offset Number of sites to offset the query. Used to build LIMIT clause.
+ * Default 0.
+ * @type bool $no_found_rows Whether to disable the `SQL_CALC_FOUND_ROWS` query. Default true.
+ * @type string|array $orderby Site status or array of statuses. Accepts:
+ * - 'id'
+ * - 'domain'
+ * - 'path'
+ * - 'network_id'
+ * - 'last_updated'
+ * - 'registered'
+ * - 'domain_length'
+ * - 'path_length'
+ * - 'site__in'
+ * - 'network__in'
+ * - false, an empty array, or 'none' to disable `ORDER BY` clause.
+ * Default 'id'.
+ * @type string $order How to order retrieved sites. Accepts 'ASC', 'DESC'. Default 'ASC'.
+ * @type int $network_id Limit results to those affiliated with a given network ID. If 0,
+ * include all networks. Default 0.
+ * @type int[] $network__in Array of network IDs to include affiliated sites for. Default empty.
+ * @type int[] $network__not_in Array of network IDs to exclude affiliated sites for. Default empty.
+ * @type string $domain Limit results to those affiliated with a given domain. Default empty.
+ * @type string[] $domain__in Array of domains to include affiliated sites for. Default empty.
+ * @type string[] $domain__not_in Array of domains to exclude affiliated sites for. Default empty.
+ * @type string $path Limit results to those affiliated with a given path. Default empty.
+ * @type string[] $path__in Array of paths to include affiliated sites for. Default empty.
+ * @type string[] $path__not_in Array of paths to exclude affiliated sites for. Default empty.
+ * @type int $public Limit results to public sites. Accepts '1' or '0'. Default empty.
+ * @type int $archived Limit results to archived sites. Accepts '1' or '0'. Default empty.
+ * @type int $mature Limit results to mature sites. Accepts '1' or '0'. Default empty.
+ * @type int $spam Limit results to spam sites. Accepts '1' or '0'. Default empty.
+ * @type int $deleted Limit results to deleted sites. Accepts '1' or '0'. Default empty.
+ * @type int $lang_id Limit results to a language ID. Default empty.
+ * @type string[] $lang__in Array of language IDs to include affiliated sites for. Default empty.
+ * @type string[] $lang__not_in Array of language IDs to exclude affiliated sites for. Default empty.
+ * @type string $search Search term(s) to retrieve matching sites for. Default empty.
+ * @type string[] $search_columns Array of column names to be searched. Accepts 'domain' and 'path'.
+ * Default empty array.
+ * @type bool $update_site_cache Whether to prime the cache for found sites. Default true.
+ * @type bool $update_site_meta_cache Whether to prime the metadata cache for found sites. Default true.
+ * @type string|string[] $meta_key Meta key or keys to filter by.
+ * @type string|string[] $meta_value Meta value or values to filter by.
+ * @type string $meta_compare MySQL operator used for comparing the meta value.
+ * See WP_Meta_Query::__construct for accepted values and default value.
+ * @type string $meta_compare_key MySQL operator used for comparing the meta key.
+ * See WP_Meta_Query::__construct for accepted values and default value.
+ * @type string $meta_type MySQL data type that the meta_value column will be CAST to for comparisons.
+ * See WP_Meta_Query::__construct for accepted values and default value.
+ * @type string $meta_type_key MySQL data type that the meta_key column will be CAST to for comparisons.
+ * See WP_Meta_Query::__construct for accepted values and default value.
+ * @type array $meta_query An associative array of WP_Meta_Query arguments.
+ * See WP_Meta_Query::__construct for accepted values.
</ins><span class="cx" style="display: block; padding: 0 10px"> * }
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function __construct( $query = '' ) {
</span></span></pre></div>
<a id="trunksrcwpincludesclasswptermqueryphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/class-wp-term-query.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-term-query.php 2021-11-19 22:54:34 UTC (rev 52225)
+++ trunk/src/wp-includes/class-wp-term-query.php 2021-11-20 00:06:06 UTC (rev 52226)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -88,103 +88,108 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.6.0 Introduced 'term_taxonomy_id' parameter.
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.7.0 Introduced 'object_ids' parameter.
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.9.0 Added 'slug__in' support for 'orderby'.
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since 5.1.0 Introduced the 'meta_compare_key' parameter.
+ * @since 5.3.0 Introduced the 'meta_type_key' parameter.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string|array $query {
</span><span class="cx" style="display: block; padding: 0 10px"> * Optional. Array or query string of term query parameters. Default empty.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @type string|array $taxonomy Taxonomy name, or array of taxonomies, to which results should
- * be limited.
- * @type int|int[] $object_ids Object ID, or array of object IDs. Results will be
- * limited to terms associated with these objects.
- * @type string $orderby Field(s) to order terms by. Accepts:
- * * Term fields ('name', 'slug', 'term_group', 'term_id', 'id',
- * 'description', 'parent', 'term_order'). Unless `$object_ids`
- * is not empty, 'term_order' is treated the same as 'term_id'.
- * * 'count' to use the number of objects associated with the term.
- * * 'include' to match the 'order' of the `$include` param.
- * * 'slug__in' to match the 'order' of the `$slug` param.
- * * 'meta_value'
- * * 'meta_value_num'.
- * * The value of `$meta_key`.
- * * The array keys of `$meta_query`.
- * * 'none' to omit the ORDER BY clause.
- * Default 'name'.
- * @type string $order Whether to order terms in ascending or descending order.
- * Accepts 'ASC' (ascending) or 'DESC' (descending).
- * Default 'ASC'.
- * @type bool|int $hide_empty Whether to hide terms not assigned to any posts. Accepts
- * 1|true or 0|false. Default 1|true.
- * @type int[]|string $include Array or comma/space-separated string of term IDs to include.
- * Default empty array.
- * @type int[]|string $exclude Array or comma/space-separated string of term IDs to exclude.
- * If `$include` is non-empty, `$exclude` is ignored.
- * Default empty array.
- * @type int[]|string $exclude_tree Array or comma/space-separated string of term IDs to exclude
- * along with all of their descendant terms. If `$include` is
- * non-empty, `$exclude_tree` is ignored. Default empty array.
- * @type int|string $number Maximum number of terms to return. Accepts ''|0 (all) or any
- * positive number. Default ''|0 (all). Note that $number may
- * not return accurate results when coupled with `$object_ids`.
- * See #41796 for details.
- * @type int $offset The number by which to offset the terms query. Default empty.
- * @type string $fields Term fields to query for. Accepts:
- * * 'all' Returns an array of complete term objects (`WP_Term[]`).
- * * 'all_with_object_id' Returns an array of term objects
- * with the 'object_id' param (`WP_Term[]`). Works only
- * when the `$object_ids` parameter is populated.
- * * 'ids' Returns an array of term IDs (`int[]`).
- * * 'tt_ids' Returns an array of term taxonomy IDs (`int[]`).
- * * 'names' Returns an array of term names (`string[]`).
- * * 'slugs' Returns an array of term slugs (`string[]`).
- * * 'count' Returns the number of matching terms (`int`).
- * * 'id=>parent' Returns an associative array of parent term IDs,
- * keyed by term ID (`int[]`).
- * * 'id=>name' Returns an associative array of term names,
- * keyed by term ID (`string[]`).
- * * 'id=>slug' Returns an associative array of term slugs,
- * keyed by term ID (`string[]`).
- * Default 'all'.
- * @type bool $count Whether to return a term count. If true, will take precedence
- * over `$fields`. Default false.
- * @type string|array $name Name or array of names to return term(s) for.
- * Default empty.
- * @type string|array $slug Slug or array of slugs to return term(s) for.
- * Default empty.
- * @type int|int[] $term_taxonomy_id Term taxonomy ID, or array of term taxonomy IDs,
- * to match when querying terms.
- * @type bool $hierarchical Whether to include terms that have non-empty descendants
- * (even if `$hide_empty` is set to true). Default true.
- * @type string $search Search criteria to match terms. Will be SQL-formatted with
- * wildcards before and after. Default empty.
- * @type string $name__like Retrieve terms with criteria by which a term is LIKE
- * `$name__like`. Default empty.
- * @type string $description__like Retrieve terms where the description is LIKE
- * `$description__like`. Default empty.
- * @type bool $pad_counts Whether to pad the quantity of a term's children in the
- * quantity of each term's "count" object variable.
- * Default false.
- * @type string $get Whether to return terms regardless of ancestry or whether the
- * terms are empty. Accepts 'all' or '' (disabled).
- * Default ''.
- * @type int $child_of Term ID to retrieve child terms of. If multiple taxonomies
- * are passed, `$child_of` is ignored. Default 0.
- * @type int $parent Parent term ID to retrieve direct-child terms of.
- * Default empty.
- * @type bool $childless True to limit results to terms that have no children.
- * This parameter has no effect on non-hierarchical taxonomies.
- * Default false.
- * @type string $cache_domain Unique cache key to be produced when this query is stored in
- * an object cache. Default 'core'.
- * @type bool $update_term_meta_cache Whether to prime meta caches for matched terms. Default true.
- * @type array $meta_query Meta query clauses to limit retrieved terms by.
- * See `WP_Meta_Query`. Default empty.
- * @type string $meta_key Limit terms to those matching a specific metadata key.
- * Can be used in conjunction with `$meta_value`. Default empty.
- * @type string $meta_value Limit terms to those matching a specific metadata value.
- * Usually used in conjunction with `$meta_key`. Default empty.
- * @type string $meta_type MySQL data type that the `$meta_value` will be CAST to for
- * comparisons. Default empty.
- * @type string $meta_compare Comparison operator to test the 'meta_value'. Default empty.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @type string|array $taxonomy Taxonomy name, or array of taxonomies, to which results should
+ * be limited.
+ * @type int|int[] $object_ids Object ID, or array of object IDs. Results will be
+ * limited to terms associated with these objects.
+ * @type string $orderby Field(s) to order terms by. Accepts:
+ * - Term fields ('name', 'slug', 'term_group', 'term_id', 'id',
+ * 'description', 'parent', 'term_order'). Unless `$object_ids`
+ * is not empty, 'term_order' is treated the same as 'term_id'.
+ * - 'count' to use the number of objects associated with the term.
+ * - 'include' to match the 'order' of the `$include` param.
+ * - 'slug__in' to match the 'order' of the `$slug` param.
+ * - 'meta_value'
+ * - 'meta_value_num'.
+ * - The value of `$meta_key`.
+ * - The array keys of `$meta_query`.
+ * - 'none' to omit the ORDER BY clause.
+ * Default 'name'.
+ * @type string $order Whether to order terms in ascending or descending order.
+ * Accepts 'ASC' (ascending) or 'DESC' (descending).
+ * Default 'ASC'.
+ * @type bool|int $hide_empty Whether to hide terms not assigned to any posts. Accepts
+ * 1|true or 0|false. Default 1|true.
+ * @type int[]|string $include Array or comma/space-separated string of term IDs to include.
+ * Default empty array.
+ * @type int[]|string $exclude Array or comma/space-separated string of term IDs to exclude.
+ * If `$include` is non-empty, `$exclude` is ignored.
+ * Default empty array.
+ * @type int[]|string $exclude_tree Array or comma/space-separated string of term IDs to exclude
+ * along with all of their descendant terms. If `$include` is
+ * non-empty, `$exclude_tree` is ignored. Default empty array.
+ * @type int|string $number Maximum number of terms to return. Accepts ''|0 (all) or any
+ * positive number. Default ''|0 (all). Note that `$number` may
+ * not return accurate results when coupled with `$object_ids`.
+ * See #41796 for details.
+ * @type int $offset The number by which to offset the terms query. Default empty.
+ * @type string $fields Term fields to query for. Accepts:
+ * - 'all' Returns an array of complete term objects (`WP_Term[]`).
+ * - 'all_with_object_id' Returns an array of term objects
+ * with the 'object_id' param (`WP_Term[]`). Works only
+ * when the `$object_ids` parameter is populated.
+ * - 'ids' Returns an array of term IDs (`int[]`).
+ * - 'tt_ids' Returns an array of term taxonomy IDs (`int[]`).
+ * - 'names' Returns an array of term names (`string[]`).
+ * - 'slugs' Returns an array of term slugs (`string[]`).
+ * - 'count' Returns the number of matching terms (`int`).
+ * - 'id=>parent' Returns an associative array of parent term IDs,
+ * keyed by term ID (`int[]`).
+ * - 'id=>name' Returns an associative array of term names,
+ * keyed by term ID (`string[]`).
+ * - 'id=>slug' Returns an associative array of term slugs,
+ * keyed by term ID (`string[]`).
+ * Default 'all'.
+ * @type bool $count Whether to return a term count. If true, will take precedence
+ * over `$fields`. Default false.
+ * @type string|array $name Name or array of names to return term(s) for.
+ * Default empty.
+ * @type string|array $slug Slug or array of slugs to return term(s) for.
+ * Default empty.
+ * @type int|int[] $term_taxonomy_id Term taxonomy ID, or array of term taxonomy IDs,
+ * to match when querying terms.
+ * @type bool $hierarchical Whether to include terms that have non-empty descendants
+ * (even if `$hide_empty` is set to true). Default true.
+ * @type string $search Search criteria to match terms. Will be SQL-formatted with
+ * wildcards before and after. Default empty.
+ * @type string $name__like Retrieve terms with criteria by which a term is LIKE
+ * `$name__like`. Default empty.
+ * @type string $description__like Retrieve terms where the description is LIKE
+ * `$description__like`. Default empty.
+ * @type bool $pad_counts Whether to pad the quantity of a term's children in the
+ * quantity of each term's "count" object variable.
+ * Default false.
+ * @type string $get Whether to return terms regardless of ancestry or whether the
+ * terms are empty. Accepts 'all' or '' (disabled).
+ * Default ''.
+ * @type int $child_of Term ID to retrieve child terms of. If multiple taxonomies
+ * are passed, `$child_of` is ignored. Default 0.
+ * @type int $parent Parent term ID to retrieve direct-child terms of.
+ * Default empty.
+ * @type bool $childless True to limit results to terms that have no children.
+ * This parameter has no effect on non-hierarchical taxonomies.
+ * Default false.
+ * @type string $cache_domain Unique cache key to be produced when this query is stored in
+ * an object cache. Default 'core'.
+ * @type bool $update_term_meta_cache Whether to prime meta caches for matched terms. Default true.
+ * @type string|string[] $meta_key Meta key or keys to filter by.
+ * @type string|string[] $meta_value Meta value or values to filter by.
+ * @type string $meta_compare MySQL operator used for comparing the meta value.
+ * See WP_Meta_Query::__construct for accepted values and default value.
+ * @type string $meta_compare_key MySQL operator used for comparing the meta key.
+ * See WP_Meta_Query::__construct for accepted values and default value.
+ * @type string $meta_type MySQL data type that the meta_value column will be CAST to for comparisons.
+ * See WP_Meta_Query::__construct for accepted values and default value.
+ * @type string $meta_type_key MySQL data type that the meta_key column will be CAST to for comparisons.
+ * See WP_Meta_Query::__construct for accepted values and default value.
+ * @type array $meta_query An associative array of WP_Meta_Query arguments.
+ * See WP_Meta_Query::__construct for accepted values.
</ins><span class="cx" style="display: block; padding: 0 10px"> * }
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function __construct( $query = '' ) {
</span></span></pre></div>
<a id="trunksrcwpincludesclasswpuserqueryphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/class-wp-user-query.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-user-query.php 2021-11-19 22:54:34 UTC (rev 52225)
+++ trunk/src/wp-includes/class-wp-user-query.php 2021-11-20 00:06:06 UTC (rev 52226)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -136,6 +136,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * querying for all users with using -1.
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.7.0 Added 'nicename', 'nicename__in', 'nicename__not_in', 'login', 'login__in',
</span><span class="cx" style="display: block; padding: 0 10px"> * and 'login__not_in' parameters.
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since 5.1.0 Introduced the 'meta_compare_key' parameter.
+ * @since 5.3.0 Introduced the 'meta_type_key' parameter.
</ins><span class="cx" style="display: block; padding: 0 10px"> * @since 5.9.0 Added 'capability', 'capability__in', and 'capability__not_in' parameters.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @global wpdb $wpdb WordPress database abstraction object.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -144,85 +146,108 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string|array $query {
</span><span class="cx" style="display: block; padding: 0 10px"> * Optional. Array or string of Query parameters.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @type int $blog_id The site ID. Default is the current site.
- * @type string|array $role An array or a comma-separated list of role names that users must match
- * to be included in results. Note that this is an inclusive list: users
- * must match *each* role. Default empty.
- * @type string[] $role__in An array of role names. Matched users must have at least one of these
- * roles. Default empty array.
- * @type string[] $role__not_in An array of role names to exclude. Users matching one or more of these
- * roles will not be included in results. Default empty array.
- * @type string $capability An array or a comma-separated list of capability names that users must match
- * to be included in results. Note that this is an inclusive list: users
- * must match *each* capability.
- * Does NOT work for capabilities not in the database or filtered via {@see 'map_meta_cap'}.
- * Default empty.
- * @type string[] $capability__in An array of capability names. Matched users must have at least one of these
- * capabilities.
- * Does NOT work for capabilities not in the database or filtered via {@see 'map_meta_cap'}.
- * Default empty array.
- * @type string[] $capability__not_in An array of capability names to exclude. Users matching one or more of these
- * capabilities will not be included in results.
- * Does NOT work for capabilities not in the database or filtered via {@see 'map_meta_cap'}.
- * Default empty array.
- * @type string $meta_key User meta key. Default empty.
- * @type string $meta_value User meta value. Default empty.
- * @type string $meta_compare Comparison operator to test the `$meta_value`. Accepts '=', '!=',
- * '>', '>=', '<', '<=', 'LIKE', 'NOT LIKE', 'IN', 'NOT IN',
- * 'BETWEEN', 'NOT BETWEEN', 'EXISTS', 'NOT EXISTS', 'REGEXP',
- * 'NOT REGEXP', or 'RLIKE'. Default '='.
- * @type int[] $include An array of user IDs to include. Default empty array.
- * @type int[] $exclude An array of user IDs to exclude. Default empty array.
- * @type string $search Search keyword. Searches for possible string matches on columns.
- * When `$search_columns` is left empty, it tries to determine which
- * column to search in based on search string. Default empty.
- * @type string[] $search_columns Array of column names to be searched. Accepts 'ID', 'user_login',
- * 'user_email', 'user_url', 'user_nicename', 'display_name'.
- * Default empty array.
- * @type string|array $orderby Field(s) to sort the retrieved users by. May be a single value,
- * an array of values, or a multi-dimensional array with fields as
- * keys and orders ('ASC' or 'DESC') as values. Accepted values are
- * 'ID', 'display_name' (or 'name'), 'include', 'user_login'
- * (or 'login'), 'login__in', 'user_nicename' (or 'nicename'),
- * 'nicename__in', 'user_email (or 'email'), 'user_url' (or 'url'),
- * 'user_registered' (or 'registered'), 'post_count', 'meta_value',
- * 'meta_value_num', the value of `$meta_key`, or an array key of
- * `$meta_query`. To use 'meta_value' or 'meta_value_num', `$meta_key`
- * must be also be defined. Default 'user_login'.
- * @type string $order Designates ascending or descending order of users. Order values
- * passed as part of an `$orderby` array take precedence over this
- * parameter. Accepts 'ASC', 'DESC'. Default 'ASC'.
- * @type int $offset Number of users to offset in retrieved results. Can be used in
- * conjunction with pagination. Default 0.
- * @type int $number Number of users to limit the query for. Can be used in
- * conjunction with pagination. Value -1 (all) is supported, but
- * should be used with caution on larger sites.
- * Default -1 (all users).
- * @type int $paged When used with number, defines the page of results to return.
- * Default 1.
- * @type bool $count_total Whether to count the total number of users found. If pagination
- * is not needed, setting this to false can improve performance.
- * Default true.
- * @type string|array $fields Which fields to return. Single or all fields (string), or array
- * of fields. Accepts 'ID', 'display_name', 'user_login',
- * 'user_nicename', 'user_email', 'user_url', 'user_registered'.
- * Use 'all' for all fields and 'all_with_meta' to include
- * meta fields. Default 'all'.
- * @type string $who Type of users to query. Accepts 'authors'.
- * Default empty (all users).
- * @type bool|array $has_published_posts Pass an array of post types to filter results to users who have
- * published posts in those post types. `true` is an alias for all
- * public post types.
- * @type string $nicename The user nicename. Default empty.
- * @type string[] $nicename__in An array of nicenames to include. Users matching one of these
- * nicenames will be included in results. Default empty array.
- * @type string[] $nicename__not_in An array of nicenames to exclude. Users matching one of these
- * nicenames will not be included in results. Default empty array.
- * @type string $login The user login. Default empty.
- * @type string[] $login__in An array of logins to include. Users matching one of these
- * logins will be included in results. Default empty array.
- * @type string[] $login__not_in An array of logins to exclude. Users matching one of these
- * logins will not be included in results. Default empty array.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @type int $blog_id The site ID. Default is the current site.
+ * @type string|array $role An array or a comma-separated list of role names that users must match
+ * to be included in results. Note that this is an inclusive list: users
+ * must match *each* role. Default empty.
+ * @type string[] $role__in An array of role names. Matched users must have at least one of these
+ * roles. Default empty array.
+ * @type string[] $role__not_in An array of role names to exclude. Users matching one or more of these
+ * roles will not be included in results. Default empty array.
+ * @type string|string[] $meta_key Meta key or keys to filter by.
+ * @type string|string[] $meta_value Meta value or values to filter by.
+ * @type string $meta_compare MySQL operator used for comparing the meta value.
+ * See WP_Meta_Query::__construct for accepted values and default value.
+ * @type string $meta_compare_key MySQL operator used for comparing the meta key.
+ * See WP_Meta_Query::__construct for accepted values and default value.
+ * @type string $meta_type MySQL data type that the meta_value column will be CAST to for comparisons.
+ * See WP_Meta_Query::__construct for accepted values and default value.
+ * @type string $meta_type_key MySQL data type that the meta_key column will be CAST to for comparisons.
+ * See WP_Meta_Query::__construct for accepted values and default value.
+ * @type array $meta_query An associative array of WP_Meta_Query arguments.
+ * See WP_Meta_Query::__construct for accepted values.
+ * @type string $capability An array or a comma-separated list of capability names that users must match
+ * to be included in results. Note that this is an inclusive list: users
+ * must match *each* capability.
+ * Does NOT work for capabilities not in the database or filtered via {@see 'map_meta_cap'}.
+ * Default empty.
+ * @type string[] $capability__in An array of capability names. Matched users must have at least one of these
+ * capabilities.
+ * Does NOT work for capabilities not in the database or filtered via {@see 'map_meta_cap'}.
+ * Default empty array.
+ * @type string[] $capability__not_in An array of capability names to exclude. Users matching one or more of these
+ * capabilities will not be included in results.
+ * Does NOT work for capabilities not in the database or filtered via {@see 'map_meta_cap'}.
+ * Default empty array.
+ * @type int[] $include An array of user IDs to include. Default empty array.
+ * @type int[] $exclude An array of user IDs to exclude. Default empty array.
+ * @type string $search Search keyword. Searches for possible string matches on columns.
+ * When `$search_columns` is left empty, it tries to determine which
+ * column to search in based on search string. Default empty.
+ * @type string[] $search_columns Array of column names to be searched. Accepts 'ID', 'user_login',
+ * 'user_email', 'user_url', 'user_nicename', 'display_name'.
+ * Default empty array.
+ * @type string|array $orderby Field(s) to sort the retrieved users by. May be a single value,
+ * an array of values, or a multi-dimensional array with fields as
+ * keys and orders ('ASC' or 'DESC') as values. Accepted values are:
+ * - 'ID'
+ * - 'display_name' (or 'name')
+ * - 'include'
+ * - 'user_login' (or 'login')
+ * - 'login__in'
+ * - 'user_nicename' (or 'nicename'),
+ * - 'nicename__in'
+ * - 'user_email (or 'email')
+ * - 'user_url' (or 'url'),
+ * - 'user_registered' (or 'registered')
+ * - 'post_count'
+ * - 'meta_value',
+ * - 'meta_value_num'
+ * - The value of `$meta_key`
+ * - An array key of `$meta_query`
+ * To use 'meta_value' or 'meta_value_num', `$meta_key`
+ * must be also be defined. Default 'user_login'.
+ * @type string $order Designates ascending or descending order of users. Order values
+ * passed as part of an `$orderby` array take precedence over this
+ * parameter. Accepts 'ASC', 'DESC'. Default 'ASC'.
+ * @type int $offset Number of users to offset in retrieved results. Can be used in
+ * conjunction with pagination. Default 0.
+ * @type int $number Number of users to limit the query for. Can be used in
+ * conjunction with pagination. Value -1 (all) is supported, but
+ * should be used with caution on larger sites.
+ * Default -1 (all users).
+ * @type int $paged When used with number, defines the page of results to return.
+ * Default 1.
+ * @type bool $count_total Whether to count the total number of users found. If pagination
+ * is not needed, setting this to false can improve performance.
+ * Default true.
+ * @type string|array $fields Which fields to return. Single or all fields (string), or array
+ * of fields. Accepts:
+ * - 'ID'
+ * - 'display_name'
+ * - 'user_login'
+ * - 'user_nicename'
+ * - 'user_email'
+ * - 'user_url'
+ * - 'user_registered'
+ * - 'all' for all fields
+ * - 'all_with_meta' to include meta fields.
+ * Default 'all'.
+ * @type string $who Type of users to query. Accepts 'authors'.
+ * Default empty (all users).
+ * @type bool|array $has_published_posts Pass an array of post types to filter results to users who have
+ * published posts in those post types. `true` is an alias for all
+ * public post types.
+ * @type string $nicename The user nicename. Default empty.
+ * @type string[] $nicename__in An array of nicenames to include. Users matching one of these
+ * nicenames will be included in results. Default empty array.
+ * @type string[] $nicename__not_in An array of nicenames to exclude. Users matching one of these
+ * nicenames will not be included in results. Default empty array.
+ * @type string $login The user login. Default empty.
+ * @type string[] $login__in An array of logins to include. Users matching one of these
+ * logins will be included in results. Default empty array.
+ * @type string[] $login__not_in An array of logins to exclude. Users matching one of these
+ * logins will not be included in results. Default empty array.
</ins><span class="cx" style="display: block; padding: 0 10px"> * }
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function prepare_query( $query = array() ) {
</span></span></pre>
</div>
</div>
</body>
</html>