196
177
* The amount of comment pages.
202
182
public $max_num_comment_pages = 0;
205
* Set if query is single post.
185
* Signifies whether the current query is for a single post.
211
190
public $is_single = false;
214
* Set if query is preview of blog.
193
* Signifies whether the current query is for a preview.
220
198
public $is_preview = false;
223
* Set if query returns a page.
201
* Signifies whether the current query is for a page.
229
206
public $is_page = false;
232
* Set if query is an archive list.
209
* Signifies whether the current query is for an archive.
238
214
public $is_archive = false;
241
* Set if query is part of a date.
217
* Signifies whether the current query is for a date archive.
247
222
public $is_date = false;
250
* Set if query contains a year.
225
* Signifies whether the current query is for a year archive.
256
230
public $is_year = false;
259
* Set if query contains a month.
233
* Signifies whether the current query is for a month archive.
265
238
public $is_month = false;
268
* Set if query contains a day.
241
* Signifies whether the current query is for a day archive.
274
246
public $is_day = false;
277
* Set if query contains time.
249
* Signifies whether the current query is for a specific time.
283
254
public $is_time = false;
286
* Set if query contains an author.
257
* Signifies whether the current query is for an author archive.
292
262
public $is_author = false;
295
* Set if query contains category.
265
* Signifies whether the current query is for a category archive.
301
270
public $is_category = false;
304
* Set if query contains tag.
273
* Signifies whether the current query is for a tag archive.
310
278
public $is_tag = false;
313
* Set if query contains taxonomy.
281
* Signifies whether the current query is for a taxonomy archive.
319
286
public $is_tax = false;
322
* Set if query was part of a search result.
289
* Signifies whether the current query is for a search.
328
294
public $is_search = false;
331
* Set if query is feed display.
297
* Signifies whether the current query is for a feed.
337
302
public $is_feed = false;
340
* Set if query is comment feed display.
305
* Signifies whether the current query is for a comment feed.
346
310
public $is_comment_feed = false;
349
* Set if query is trackback.
313
* Signifies whether the current query is for trackback endpoint call.
355
318
public $is_trackback = false;
358
* Set if query is blog homepage.
321
* Signifies whether the current query is for the site homepage.
364
326
public $is_home = false;
367
* Set if query couldn't found anything.
329
* Signifies whether the current query couldn't find anything.
373
334
public $is_404 = false;
376
* Set if query is embed.
337
* Signifies whether the current query is for an embed.
382
342
public $is_embed = false;
385
* Set if query is paged
345
* Signifies whether the current query is for a paged result and not for the first page.
391
350
public $is_paged = false;
394
* Set if query is part of administration page.
353
* Signifies whether the current query is for an administrative interface page.
400
358
public $is_admin = false;
403
* Set if query is an attachment.
361
* Signifies whether the current query is for an attachment page.
409
366
public $is_attachment = false;
412
* Set if is single, is a page, or is an attachment.
369
* Signifies whether the current query is for an existing single post of any post type
370
* (post, attachment, page, custom post types).
418
375
public $is_singular = false;
421
* Set if query is for robots.
378
* Signifies whether the current query is for the robots.txt file.
427
383
public $is_robots = false;
430
* Set if query contains posts.
386
* Signifies whether the current query is for the page_for_posts page.
432
388
* Basically, the homepage if the option isn't set for the static homepage.
438
393
public $is_posts_page = false;
441
* Set if query is for a post type archive.
396
* Signifies whether the current query is for a post type archive.
447
401
public $is_post_type_archive = false;
656
603
* @type array $category__in An array of category IDs (OR in, no children).
657
604
* @type array $category__not_in An array of category IDs (NOT in).
658
605
* @type string $category_name Use category slug (not name, this or any children).
606
* @type array|int $comment_count Filter results by comment count. Provide an integer to match
607
* comment count exactly. Provide an array with integer 'value'
608
* and 'compare' operator ('=', '!=', '>', '>=', '<', '<=' ) to
609
* compare against comment_count in a specific way.
659
610
* @type string $comment_status Comment status.
660
611
* @type int $comments_per_page The number of comments to return per page.
661
612
* Default 'comments_per_page' option.
2134
2085
$whichauthor .= " AND ({$wpdb->posts}.post_author = " . absint($q['author']) . ')';
2088
// Matching by comment count.
2089
if ( isset( $q['comment_count'] ) ) {
2090
// Numeric comment count is converted to array format.
2091
if ( is_numeric( $q['comment_count'] ) ) {
2092
$q['comment_count'] = array(
2093
'value' => intval( $q['comment_count'] ),
2097
if ( isset( $q['comment_count']['value'] ) ) {
2098
$q['comment_count'] = array_merge( array(
2100
), $q['comment_count'] );
2102
// Fallback for invalid compare operators is '='.
2103
$compare_operators = array( '=', '!=', '>', '>=', '<', '<=' );
2104
if ( ! in_array( $q['comment_count']['compare'], $compare_operators, true ) ) {
2105
$q['comment_count']['compare'] = '=';
2108
$where .= $wpdb->prepare( " AND {$wpdb->posts}.comment_count {$q['comment_count']['compare']} %d", $q['comment_count']['value'] );
2137
2112
// MIME-Type stuff for attachment browsing
2139
2114
if ( isset( $q['post_mime_type'] ) && '' != $q['post_mime_type'] ) {