Changeset 28887
- Timestamp:
- 06/28/2014 11:02:05 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/query.php
r28864 r28887 1450 1450 * @access public 1451 1451 * 1452 * @param string|array $query Optional query. 1452 * @param string|array $query { 1453 * Optional. Array or string of Query parameters. 1454 * 1455 * @type int $attachment_id Attachment post ID. Used for 'attachment' post_type. 1456 * @type int|string $author Author ID, or comma-separated list of IDs. 1457 * @type string $author_name User 'user_nicename'. 1458 * @type array $author__in An array of author IDs to query from. 1459 * @type array $author__not_in An array of author IDs not to query from. 1460 * @type bool $cache_results Whether to cache post information. Default true. 1461 * @type int|string $cat Category ID or comma-separated list of IDs (this or any children). 1462 * @type array $category__and An array of category IDs (AND in). 1463 * @type array $category__in An array of category IDs (OR in, no children). 1464 * @type array $category__not_in An array of category IDs (NOT in). 1465 * @type string $category_name Use category slug (not name, this or any children). 1466 * @type int $comments_per_page The number of comments to return per page. 1467 * Default 'comments_per_page' option. 1468 * @type int|string $comments_popup Whether the query is within the comments popup. Default empty. 1469 * @type array $date_query An associative array of WP_Date_Query arguments. 1470 * {@see WP_Date_Query::__construct()} 1471 * @type int $day Day of the month. Default empty. Accepts numbers 1-31. 1472 * @type bool $exact Whether to search by exact keyword. Default false. 1473 * @type string|array $fields Which fields to return. Single field or all fields (string), 1474 * or array of fields. 'id=>parent' uses 'id' and 'post_parent'. 1475 * Default all fields. Accepts 'ids', 'id=>parent'. 1476 * @type int $hour Hour of the day. Default empty. Accepts numbers 0-23. 1477 * @type bool $ignore_sticky_posts Whether to ignore sticky posts or not. Setting this to false 1478 * excludes stickies from 'post__in'. Default 0|false. Accepts 1479 * 1|true, 0|false. 1480 * @type int $m Combination YearMonth. Default empty. Accepts any four-digit 1481 * year and month numbers 1-12. 1482 * @type string $meta_compare Comparison operator to test the 'meta_value'. 1483 * @type string $meta_key Custom field key. 1484 * @type array $meta_query An associative array of WP_Meta_Query arguments. 1485 * {@see WP_Meta_Query->queries} 1486 * @type string $meta_value Custom field value. 1487 * @type int $meta_value_num Custom field value number. 1488 * @type int $menu_order The menu order of the posts. 1489 * @type int $monthnum The two-digit month. Default empty. Accepts numbers 1-12. 1490 * @type string $name Post slug. 1491 * @type bool $nopaging Show all posts (true) or paginate (false). Default false. 1492 * @type bool $no_found_rows Whether to count the total rows found. Disabling can improve 1493 * performance. Default true. 1494 * @type int $offset The number of posts to offset before retrieval. 1495 * @type string $order Designates ascending or descending order of posts. Default 'DESC'. 1496 * Accepts 'ASC', 'DESC'. 1497 * @type string $orderby Sort retrieved posts by parameter. One or more options can be 1498 * passed. To use 'meta_value', or 'meta_value_num', 1499 * 'meta_key=keyname' must be also be defined. Default 'date'. 1500 * Accepts 'none', 'name', 'author', 'date', 'title', 'modified', 1501 * 'menu_order', 'parent', 'ID', 'rand', 'comment_count'. 1502 * @type int $p Post ID. 1503 * @type int $page Show the number of posts that would show up on page X of a 1504 * static front page. 1505 * @type int $paged The number of the current page. 1506 * @type int $page_id Page ID. 1507 * @type string $pagename Page slug. 1508 * @type string $perm Show posts if user has the appropriate capability. 1509 * @type array $post__in An array of post IDs to retrieve, sticky posts will be included 1510 * @type string $post_mime_type The mime type of the post. Used for 'attachment' post_type. 1511 * @type array $post__not_in An array of post IDs not to retrieve. Note: a string of comma- 1512 * @type int $post_parent Page ID to retrieve child pages for. Use 0 to only retrieve 1513 * top-level pages. 1514 * @type array $post_parent__in An array containing parent page IDs to query child pages from. 1515 * @type array $post_parent__not_in An array containing parent page IDs not to query child pages from. 1516 * separated IDs will NOT work. 1517 * @type string|array $post_type A post type slug (string) or array of post type slugs. 1518 * Default 'any' if using 'tax_query'. 1519 * @type string|array $post_status A post status (string) or array of post statuses. 1520 * @type int $posts_per_page The number of posts to query for. Use -1 to request all posts. 1521 * @type int $posts_per_archive_page The number of posts to query for by archive page. Overrides 1522 * 'posts_per_page' when is_archive(), or is_search() are true. 1523 * @type string $s Search keyword. 1524 * @type int $second Second of the minute. Default empty. Accepts numbers 0-60. 1525 * @type array $search_terms Array of search terms. 1526 * @type bool $sentence Whether to search by phrase. Default false. 1527 * @type bool $suppress_filters Whether to suppress filters. Default false. 1528 * @type string $tag Tag slug. Comma-separated (either), Plus-separated (all). 1529 * @type array $tag__and An array of tag ids (AND in). 1530 * @type array $tag__in An array of tag ids (OR in). 1531 * @type array $tag__not_in An array of tag ids (NOT in). 1532 * @type int $tag_id Tag id or comma-separated list of IDs. 1533 * @type array $tag_slug__and An array of tag slugs (AND in). 1534 * @type array $tag_slug__in An array of tag slugs (OR in). unless 'ignore_sticky_posts' is 1535 * true. Note: a string of comma-separated IDs will NOT work. 1536 * @type array $tax_query An associative array of WP_Tax_Query arguments. 1537 * {@see WP_Tax_Query->queries} 1538 * @type bool $update_post_meta_cache Whether to update the post meta cache. Default true. 1539 * @type bool $update_post_term_cache Whether to update the post term cache. Default true. 1540 * @type int $w The week number of the year. Default empty. Accepts numbers 0-53. 1541 * @type int $year The four-digit year. Default empty. Accepts any four-digit year. 1542 * } 1453 1543 */ 1454 1544 public function parse_query( $query = '' ) {
Note: See TracChangeset
for help on using the changeset viewer.