Commit Graph

286 Commits

Author SHA1 Message Date
scribu 3791a39615 Allow search in archive pages. Fixes #14831
git-svn-id: https://develop.svn.wordpress.org/trunk@15687 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-02 22:52:15 +00:00
scribu c063cc13bb Split wp_filter_object_list() into wp_list_filter() and wp_list_pluck(). Fixes #15016
git-svn-id: https://develop.svn.wordpress.org/trunk@15686 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-02 18:48:51 +00:00
scribu 455d7463c1 Set 'cat' query var for backwards compatibility. Fixes #15007
git-svn-id: https://develop.svn.wordpress.org/trunk@15685 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-02 18:03:06 +00:00
scribu 898ba9b2b2 Do thorough resets in init() and init_query_flags(). Props coffee2code. Fixes #14976
git-svn-id: https://develop.svn.wordpress.org/trunk@15672 602fd350-edb4-49c9-b593-d223f7449a82
2010-09-27 23:48:03 +00:00
Dion Hulse b5f0bf47ac Do not generate invalid SQL for empty term archives. See #12891
git-svn-id: https://develop.svn.wordpress.org/trunk@15652 602fd350-edb4-49c9-b593-d223f7449a82
2010-09-24 12:09:44 +00:00
scribu d004c99ea6 Consistently set $post_type to 'any' when a taxonomy query is involved. See [15649]. See #14589
git-svn-id: https://develop.svn.wordpress.org/trunk@15650 602fd350-edb4-49c9-b593-d223f7449a82
2010-09-23 23:19:47 +00:00
scribu 9e37c78da3 Set $post_type to 'any' when taxonomies are involved (code resqued from r15613). See #12891
git-svn-id: https://develop.svn.wordpress.org/trunk@15649 602fd350-edb4-49c9-b593-d223f7449a82
2010-09-23 23:11:49 +00:00
Ryan Boren df6d5550db Simplify sanitize_key() and use it in more places. see #14910
git-svn-id: https://develop.svn.wordpress.org/trunk@15635 602fd350-edb4-49c9-b593-d223f7449a82
2010-09-20 15:28:58 +00:00
Andrew Nacin 17e249f359 Fix logic inversion in r15626. see #14892. Also note that r15626 fixed a s/is_category/is_tag/ typo introduced in r6011, on line 1340.
git-svn-id: https://develop.svn.wordpress.org/trunk@15627 602fd350-edb4-49c9-b593-d223f7449a82
2010-09-17 22:35:05 +00:00
scribu 03a3e5c1d9 Don't require category__in, tag__in etc. to be arrays necessarily. Fixes #14892
git-svn-id: https://develop.svn.wordpress.org/trunk@15626 602fd350-edb4-49c9-b593-d223f7449a82
2010-09-17 22:27:22 +00:00
scribu c1ce7ddc38 Remove extraneous sanitization of category_name. Leave it to wp_tax_query(). See #12891
git-svn-id: https://develop.svn.wordpress.org/trunk@15625 602fd350-edb4-49c9-b593-d223f7449a82
2010-09-17 17:07:11 +00:00
scribu 89382ae313 Allow plugins to manipulate the meta query args. See #14645
git-svn-id: https://develop.svn.wordpress.org/trunk@15624 602fd350-edb4-49c9-b593-d223f7449a82
2010-09-17 16:08:35 +00:00
scribu 5c95616ce8 Clean up taxonomy queries in WP_Query. See #12891
git-svn-id: https://develop.svn.wordpress.org/trunk@15613 602fd350-edb4-49c9-b593-d223f7449a82
2010-09-13 16:44:14 +00:00
Andrew Nacin 9494e4ce7e Phpdoc argument/@param cleanups. props duck_, see #14783.
git-svn-id: https://develop.svn.wordpress.org/trunk@15590 602fd350-edb4-49c9-b593-d223f7449a82
2010-09-07 11:21:11 +00:00
Mark Jaquith 93680ad646 Rename caller_get_posts WP_Query flag to ignore_sticky_posts, because that is the only thing it does. fixes #14624. props scribu
git-svn-id: https://develop.svn.wordpress.org/trunk@15589 602fd350-edb4-49c9-b593-d223f7449a82
2010-09-07 04:46:08 +00:00
scribu 7ddd031d75 Use _wp_meta_sql() in WP_Query. See #14572. See #14645
git-svn-id: https://develop.svn.wordpress.org/trunk@15581 602fd350-edb4-49c9-b593-d223f7449a82
2010-09-06 11:28:59 +00:00
scribu ad904f3307 update WP_Query docs. See #14600
git-svn-id: https://develop.svn.wordpress.org/trunk@15547 602fd350-edb4-49c9-b593-d223f7449a82
2010-08-28 11:09:18 +00:00
Ryan Boren a4ce5b114b is_* WP_Query methods. Props mdawaffe. fixes #14494
git-svn-id: https://develop.svn.wordpress.org/trunk@15531 602fd350-edb4-49c9-b593-d223f7449a82
2010-08-25 18:05:33 +00:00
scribu 6d510588aa Safer hierarchical display check. Fixes #14600; See #14579
git-svn-id: https://develop.svn.wordpress.org/trunk@15501 602fd350-edb4-49c9-b593-d223f7449a82
2010-08-16 01:36:21 +00:00
Andrew Nacin 85394e795e More curses on PHP 5.0.5. see #13757, fixes #14160. for trunk.
git-svn-id: https://develop.svn.wordpress.org/trunk@15471 602fd350-edb4-49c9-b593-d223f7449a82
2010-07-25 07:35:59 +00:00
Andrew Nacin ec9f6d34cb Don't use deprecated functions. props filosofo, fixes #13854.
git-svn-id: https://develop.svn.wordpress.org/trunk@15229 602fd350-edb4-49c9-b593-d223f7449a82
2010-06-11 17:49:35 +00:00
Ryan Boren 1006d5b101 Don't force post_status to publish for custom taxonomy queries. fixes #13755
git-svn-id: https://develop.svn.wordpress.org/trunk@15173 602fd350-edb4-49c9-b593-d223f7449a82
2010-06-08 14:08:33 +00:00
Ryan Boren aec821c651 Strip trailing whitespace
git-svn-id: https://develop.svn.wordpress.org/trunk@14924 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-26 02:42:15 +00:00
Andrew Nacin 5bc3a62137 Give is_singular the ability to provide awareness/context for custom post types. props ryan, scribu. Usage: is_singular('book') or is_singular( array( 'newspapers', 'books' ) ). fixes #12588.
git-svn-id: https://develop.svn.wordpress.org/trunk@14887 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-25 15:36:23 +00:00
Ryan Boren 8203d22175 Fix pages setup in setup_postdata(). Props misterbisson. fixes #12651
git-svn-id: https://develop.svn.wordpress.org/trunk@14750 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-19 18:39:48 +00:00
Ryan Boren 14d8731a49 Don't update_post_caches if a persistent object cache is installed. fixes #12611
git-svn-id: https://develop.svn.wordpress.org/trunk@14665 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-15 15:00:53 +00:00
Peter Westwood 728b90a13b Introduce wp_reset_postdata(). Use it to reset the post global for the current query_posts() call after using a loop with a new WP_Query object. Fixes #12320 props scribu.
git-svn-id: https://develop.svn.wordpress.org/trunk@14607 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-13 20:39:54 +00:00
Peter Westwood f782838830 Add commentary about the posts_search filter. See #10667.
git-svn-id: https://develop.svn.wordpress.org/trunk@14603 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-13 17:34:43 +00:00
Andrew Nacin 490a0a99cd More typos. see #13358.
git-svn-id: https://develop.svn.wordpress.org/trunk@14588 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-12 21:03:33 +00:00
Andrew Nacin 323342deec Move post type object capabilities to a 'cap' object. Allow them to be initialized via the 'capabilities' key (an array) when registering support for the post type. Caps are now referred to by the name of the cap as if it was a post, i.e. ->cap->edit_post. see #13358.
git-svn-id: https://develop.svn.wordpress.org/trunk@14585 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-12 20:45:18 +00:00
Andrew Nacin d620c50f96 Remove apparent debug cruft committed in [14401]. fixes #13355
git-svn-id: https://develop.svn.wordpress.org/trunk@14565 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-11 18:28:12 +00:00
Ryan Boren ee0b76261b Allow turning off object_term and postmeta cache updates. Turn off object_term updates in the wp_get_nav_menu_items() get_posts() query to avoid useless taxonomy query.
git-svn-id: https://develop.svn.wordpress.org/trunk@14528 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-10 00:58:39 +00:00
Andrew Nacin c100b80c20 Fix start of week and SQL WEEK handling. props mdawaffe, fixes #10397.
git-svn-id: https://develop.svn.wordpress.org/trunk@14499 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-07 05:01:29 +00:00
Andrew Nacin cba25aba7e Prevent ambiguous table aliases in wp_post_mime_type_where. props stephdau, jfarthing84, fixes #12750.
git-svn-id: https://develop.svn.wordpress.org/trunk@14478 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-06 18:03:05 +00:00
Andrew Nacin 0b3e082d6e Remove duplicated query var. props lriggle, fixes #13280.
git-svn-id: https://develop.svn.wordpress.org/trunk@14477 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-06 17:49:54 +00:00
Dion Hulse 12196261a4 Handle $wp_query->query being a string in r14341. See #12391, #12047. Fixes #13241
git-svn-id: https://develop.svn.wordpress.org/trunk@14445 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-04 18:08:03 +00:00
Ryan Boren d2b4e092aa White list instead of black list post types when searching. Props sivel. fixes #13183
git-svn-id: https://develop.svn.wordpress.org/trunk@14419 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-03 22:22:34 +00:00
Ryan Boren d783952469 Strip trailing whites.
git-svn-id: https://develop.svn.wordpress.org/trunk@14404 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-03 20:26:11 +00:00
Dion Hulse d28dcf1ef6 s/#/ \/\/ / - Remove #comment with // comment in WP_Query
git-svn-id: https://develop.svn.wordpress.org/trunk@14402 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-03 20:20:46 +00:00
Dion Hulse aa7c1d8a41 WP_Query whitespace cleanup, some loop cleanup as well
git-svn-id: https://develop.svn.wordpress.org/trunk@14401 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-03 20:19:13 +00:00
Dion Hulse 65aac68cd6 Fix custom WP_Queries when using page_on_front. Props aaroncampbell. See #12391 (Which caused it), Fixes #12047
git-svn-id: https://develop.svn.wordpress.org/trunk@14341 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-02 21:28:11 +00:00
Andrew Nacin fbac23f1eb Update object term cache for custom post types. props scribu, fixes #12989.
git-svn-id: https://develop.svn.wordpress.org/trunk@14310 602fd350-edb4-49c9-b593-d223f7449a82
2010-04-29 20:43:59 +00:00
Ryan Boren 3e9cc3ebd9 The read_post cap cannot be checked for sticky posts because not logged in users don't have any caps. see #11197
git-svn-id: https://develop.svn.wordpress.org/trunk@14245 602fd350-edb4-49c9-b593-d223f7449a82
2010-04-26 22:12:28 +00:00
Dion Hulse 4c6df3a2e4 Ignore sticky posts which the current user cannot read, Ignore sticky posts which have been explicitly excluded with 'post__not_in'. Fixes #11197
git-svn-id: https://develop.svn.wordpress.org/trunk@14217 602fd350-edb4-49c9-b593-d223f7449a82
2010-04-24 06:04:05 +00:00
Dion Hulse 6f89c1a63a Remove double-query for Author ID. Props simonwheatley. Fixes #12048
git-svn-id: https://develop.svn.wordpress.org/trunk@14160 602fd350-edb4-49c9-b593-d223f7449a82
2010-04-19 10:50:03 +00:00
Andrew Nacin a8d984183f Fix sticky post handling. Use unset instead of array_splice to remove an item by key retrieved by array_search. props jeffstieler, fixes #11966.
git-svn-id: https://develop.svn.wordpress.org/trunk@14135 602fd350-edb4-49c9-b593-d223f7449a82
2010-04-18 05:11:05 +00:00
Dion Hulse 66e73d0f64 Respect the post_type param for Taxonomy Queries, Props Otto & Dougal Campbell. Restrict Attachment post_status joins to queries involving attachment results ("any" or "attachment"). See #13020
git-svn-id: https://develop.svn.wordpress.org/trunk@14121 602fd350-edb4-49c9-b593-d223f7449a82
2010-04-17 09:03:33 +00:00
Andrew Nacin 028f262ccf Introduce the wp_filter_object_list() helper, with an $operator arg. Fixes an intersection bug in get_post_types() and get_taxonomies(). Also switches $operator default from 'or' to 'and' for get_post_stati(). props scribu, fixes #12966.
git-svn-id: https://develop.svn.wordpress.org/trunk@14108 602fd350-edb4-49c9-b593-d223f7449a82
2010-04-16 14:08:58 +00:00
Dion Hulse d648c8b9dd Alternative implementation of custom post_type query_var handling. fills name & pagename for custom post_types to reduce amount of code duplication. See #12704
git-svn-id: https://develop.svn.wordpress.org/trunk@14072 602fd350-edb4-49c9-b593-d223f7449a82
2010-04-11 13:51:24 +00:00
Dion Hulse e28019c1ec Fix a case where $post_type = 'any' causes a large query to run without any specifications (post_name/limits/id/etc). See #12704
git-svn-id: https://develop.svn.wordpress.org/trunk@14027 602fd350-edb4-49c9-b593-d223f7449a82
2010-04-07 08:29:46 +00:00