Commit Graph

312 Commits

Author SHA1 Message Date
scribu
fe9c746809 Re-add the ability to filter by 'taxonomy' and 'term' query vars. Fixes #13582. See #12891
git-svn-id: http://svn.automattic.com/wordpress/trunk@15850 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-19 14:41:30 +00:00
dd32
0c1eb68663 Limit wp_old_slug_redirect() to redirecting to only posts of the same post_type kind. See #15140
git-svn-id: http://svn.automattic.com/wordpress/trunk@15848 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-19 10:27:34 +00:00
nacin
5e1184aa57 Pinking shears.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15843 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-19 07:48:22 +00:00
dd32
a034198225 Use $wpdb->prepare in wp_old_slug_redirect(). See #15140
git-svn-id: http://svn.automattic.com/wordpress/trunk@15832 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-18 11:44:19 +00:00
dd32
ddae2a0b15 Prevent notices on non-existent Term locations (such as /tag/404-non-existant-term/)
git-svn-id: http://svn.automattic.com/wordpress/trunk@15827 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-17 06:14:58 +00:00
dd32
81924ad20b Merge Category/Tag URL creation/rewriting into general Taxonomy system. Removes the legacy handling for these url's. See #12659
git-svn-id: http://svn.automattic.com/wordpress/trunk@15825 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-17 05:41:22 +00:00
dd32
baa0935d9a Move hierarchical_url to $args['rewrite']['hierarchical']
git-svn-id: http://svn.automattic.com/wordpress/trunk@15824 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-17 04:36:26 +00:00
nacin
7ef6752c9d Custom post type archives, second pass. see #13818.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15819 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-15 19:44:57 +00:00
nacin
eb8762d626 Custom post type archives. see #13818.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15803 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-14 10:39:47 +00:00
scribu
22643b9464 Sacrifice DRY for readability in WP_Query. Props nacin for initial patch. See #14997
git-svn-id: http://svn.automattic.com/wordpress/trunk@15795 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-13 16:37:01 +00:00
scribu
a9e671a75c Add posts_clauses_request filter too. Props hakre. See #14997
git-svn-id: http://svn.automattic.com/wordpress/trunk@15794 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-13 15:49:26 +00:00
scribu
47f98231a5 Restore previous filter order in WP_Query. See #14997
git-svn-id: http://svn.automattic.com/wordpress/trunk@15791 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-13 13:45:53 +00:00
scribu
9b325e28ea Introduce wp_query_clauses filter. Fixes #14997
git-svn-id: http://svn.automattic.com/wordpress/trunk@15775 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-11 15:04:44 +00:00
scribu
d1ba770236 don't re-urlencode taxonomy query vars. See #12891
git-svn-id: http://svn.automattic.com/wordpress/trunk@15773 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-11 12:18:42 +00:00
scribu
ba8217c8df Fix warning caused by empty meta query. See #14645
git-svn-id: http://svn.automattic.com/wordpress/trunk@15768 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-09 12:18:52 +00:00
scribu
e157f923ed Get rid of redundant $this->meta_query. See #14645
git-svn-id: http://svn.automattic.com/wordpress/trunk@15766 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-09 10:48:13 +00:00
scribu
50dc04d43b Get rid of redundant ->tax_query. See #12891
git-svn-id: http://svn.automattic.com/wordpress/trunk@15765 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-09 10:19:15 +00:00
scribu
b64336e0cd Remove debug cruft introduced by [15751]. See #12891
git-svn-id: http://svn.automattic.com/wordpress/trunk@15752 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-07 21:50:32 +00:00
scribu
f5276df854 Add 'tax_query' as public query var. See #12891
git-svn-id: http://svn.automattic.com/wordpress/trunk@15751 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-07 21:47:52 +00:00
scribu
2a99093ba9 Better way of settings tax related query flags. See #12891
git-svn-id: http://svn.automattic.com/wordpress/trunk@15733 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-06 11:13:37 +00:00
scribu
38888b588d Make hierarchical URLs work for any hierarchical taxonomy. See #12659
git-svn-id: http://svn.automattic.com/wordpress/trunk@15732 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-06 11:04:03 +00:00
scribu
a8367fa6f2 Generalize taxonomy queries:
* transform wp_tax_query() into WP_Object_Query::get_tax_sql()
	* create parse_tax_query() method in WP_Query
	* add doc-block for $tax_query and $meta_query
See #15032. See #12891.


git-svn-id: http://svn.automattic.com/wordpress/trunk@15731 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-06 10:40:30 +00:00
scribu
7630099b45 Revert part of [15713] to prevent notices. See #14645
git-svn-id: http://svn.automattic.com/wordpress/trunk@15729 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-05 22:42:47 +00:00
scribu
f558d12bf0 Introduce WP_Object_Query. See #15032
git-svn-id: http://svn.automattic.com/wordpress/trunk@15715 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-04 18:57:13 +00:00
scribu
1190c4094b Strip redundant 'meta_' from 'meta_query' keys. See #14645
git-svn-id: http://svn.automattic.com/wordpress/trunk@15714 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-04 18:26:26 +00:00
scribu
6107efe572 Recognize meta_query as a query var. Props aaroncampbell. Fixes #14645
git-svn-id: http://svn.automattic.com/wordpress/trunk@15713 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-04 17:51:17 +00:00
scribu
2bfd821b9b Allow search in archive pages. Fixes #14831
git-svn-id: http://svn.automattic.com/wordpress/trunk@15687 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-02 22:52:15 +00:00
scribu
688f990cd0 Split wp_filter_object_list() into wp_list_filter() and wp_list_pluck(). Fixes #15016
git-svn-id: http://svn.automattic.com/wordpress/trunk@15686 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-02 18:48:51 +00:00
scribu
70728369f9 Set 'cat' query var for backwards compatibility. Fixes #15007
git-svn-id: http://svn.automattic.com/wordpress/trunk@15685 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-02 18:03:06 +00:00
scribu
af5d4ba206 Do thorough resets in init() and init_query_flags(). Props coffee2code. Fixes #14976
git-svn-id: http://svn.automattic.com/wordpress/trunk@15672 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-09-27 23:48:03 +00:00
dd32
6dd01bf248 Do not generate invalid SQL for empty term archives. See #12891
git-svn-id: http://svn.automattic.com/wordpress/trunk@15652 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-09-24 12:09:44 +00:00
scribu
164be642a4 Consistently set $post_type to 'any' when a taxonomy query is involved. See [15649]. See #14589
git-svn-id: http://svn.automattic.com/wordpress/trunk@15650 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-09-23 23:19:47 +00:00
scribu
61cd7dffe0 Set $post_type to 'any' when taxonomies are involved (code resqued from r15613). See #12891
git-svn-id: http://svn.automattic.com/wordpress/trunk@15649 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-09-23 23:11:49 +00:00
ryan
6b351163ef Simplify sanitize_key() and use it in more places. see #14910
git-svn-id: http://svn.automattic.com/wordpress/trunk@15635 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-09-20 15:28:58 +00:00
nacin
75cdf1c0c4 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: http://svn.automattic.com/wordpress/trunk@15627 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-09-17 22:35:05 +00:00
scribu
168659371d Don't require category__in, tag__in etc. to be arrays necessarily. Fixes #14892
git-svn-id: http://svn.automattic.com/wordpress/trunk@15626 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-09-17 22:27:22 +00:00
scribu
17c867e74b Remove extraneous sanitization of category_name. Leave it to wp_tax_query(). See #12891
git-svn-id: http://svn.automattic.com/wordpress/trunk@15625 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-09-17 17:07:11 +00:00
scribu
367e4916ee Allow plugins to manipulate the meta query args. See #14645
git-svn-id: http://svn.automattic.com/wordpress/trunk@15624 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-09-17 16:08:35 +00:00
scribu
2030231f66 Clean up taxonomy queries in WP_Query. See #12891
git-svn-id: http://svn.automattic.com/wordpress/trunk@15613 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-09-13 16:44:14 +00:00
nacin
5a20c05d27 Phpdoc argument/@param cleanups. props duck_, see #14783.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15590 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-09-07 11:21:11 +00:00
markjaquith
4d44c562e4 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: http://svn.automattic.com/wordpress/trunk@15589 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-09-07 04:46:08 +00:00
scribu
80e2918946 Use _wp_meta_sql() in WP_Query. See #14572. See #14645
git-svn-id: http://svn.automattic.com/wordpress/trunk@15581 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-09-06 11:28:59 +00:00
scribu
349fbcaf30 update WP_Query docs. See #14600
git-svn-id: http://svn.automattic.com/wordpress/trunk@15547 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-08-28 11:09:18 +00:00
ryan
6ff179a805 is_* WP_Query methods. Props mdawaffe. fixes #14494
git-svn-id: http://svn.automattic.com/wordpress/trunk@15531 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-08-25 18:05:33 +00:00
scribu
f2614ac277 Safer hierarchical display check. Fixes #14600; See #14579
git-svn-id: http://svn.automattic.com/wordpress/trunk@15501 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-08-16 01:36:21 +00:00
nacin
65c1243ce3 More curses on PHP 5.0.5. see #13757, fixes #14160. for trunk.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15471 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-07-25 07:35:59 +00:00
nacin
6310ca6f21 Don't use deprecated functions. props filosofo, fixes #13854.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15229 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-06-11 17:49:35 +00:00
ryan
33886d651b Don't force post_status to publish for custom taxonomy queries. fixes #13755
git-svn-id: http://svn.automattic.com/wordpress/trunk@15173 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-06-08 14:08:33 +00:00
ryan
1a552dd029 Strip trailing whitespace
git-svn-id: http://svn.automattic.com/wordpress/trunk@14924 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-26 02:42:15 +00:00
nacin
542c648ac5 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: http://svn.automattic.com/wordpress/trunk@14887 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-25 15:36:23 +00:00