Commit Graph

347 Commits

Author SHA1 Message Date
scribu f58b21e69d Optimize get_tax_sql(). See #12891
git-svn-id: http://svn.automattic.com/wordpress/trunk@16413 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-17 01:56:01 +00:00
scribu 8b107e23f4 Revert [16402] outright. Causes issues with themes. See #12891
git-svn-id: http://svn.automattic.com/wordpress/trunk@16404 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-16 16:36:20 +00:00
scribu 690cd434d1 Don't pollute the 'tax_query' query var. See #12891
git-svn-id: http://svn.automattic.com/wordpress/trunk@16402 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-16 16:22:09 +00:00
scribu e55bee786e Revert [16384]. See #15433
git-svn-id: http://svn.automattic.com/wordpress/trunk@16385 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-15 15:23:04 +00:00
scribu b20d93c69c Ignore 'name' qv if 'p' qv is set. Fixes #15433
git-svn-id: http://svn.automattic.com/wordpress/trunk@16384 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-15 13:33:16 +00:00
scribu cc72395bbb Set 'taxonomy' and 'term' query vars for back-compat. Fixes #12659
git-svn-id: http://svn.automattic.com/wordpress/trunk@16381 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-15 10:51:39 +00:00
scribu 7cb5240bd6 Re-parse tax query just before calling get_tax_sql(). Fixes #15161
git-svn-id: http://svn.automattic.com/wordpress/trunk@16380 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-15 10:11:25 +00:00
scribu 6b2aa2177f Update doc for WP_Query::post. Fixes #15105
git-svn-id: http://svn.automattic.com/wordpress/trunk@16360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-13 23:32:18 +00:00
scribu 40b2c5b6c5 Kill WP_Object_Query. See #15032
git-svn-id: http://svn.automattic.com/wordpress/trunk@16353 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-13 18:32:43 +00:00
scribu cd60463f36 Revert most of [16018]. See #15032
git-svn-id: http://svn.automattic.com/wordpress/trunk@16352 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-13 18:26:15 +00:00
ryan 3a4671f530 Prevent stomping of global. Props prettyboymp. fixes #13945
git-svn-id: http://svn.automattic.com/wordpress/trunk@16303 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-11 16:22:18 +00:00
scribu 8885e4f78e Add context to get_meta_sql(). See #15018
git-svn-id: http://svn.automattic.com/wordpress/trunk@16286 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-11 10:06:05 +00:00
nacin 8b6cb32160 Ensure we have a valid post type object when checking for has_archive. props filosofo, fixes #15364.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16276 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-10 16:42:59 +00:00
scribu 3cbc8ef308 Make get_tax_sql() a standalone function. See #15032
git-svn-id: http://svn.automattic.com/wordpress/trunk@16267 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-09 23:30:35 +00:00
scribu db1d9369eb Make get_meta_sql() a standalone function. See #15032
git-svn-id: http://svn.automattic.com/wordpress/trunk@16266 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-09 23:22:13 +00:00
scribu e9952075ee Allow mix of 'taxonomy' => 'foo', 'term' => 'bar' and 'foo2' => 'bar2'. Props filosofo. Fixes #15363
git-svn-id: http://svn.automattic.com/wordpress/trunk@16259 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-09 16:45:51 +00:00
scribu 3a7d16a308 Set 'operator' field. Fixes #15350. See #12891
git-svn-id: http://svn.automattic.com/wordpress/trunk@16258 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-09 12:27:03 +00:00
scribu 158a07459d Use wp_basename() in WP_Query too. See #11887
git-svn-id: http://svn.automattic.com/wordpress/trunk@16155 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-02 17:28:28 +00:00
scribu d2e8b78a42 Just pass meta type to get_meta_sql(). See #15032
git-svn-id: http://svn.automattic.com/wordpress/trunk@16143 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-01 20:34:54 +00:00
scribu 7f7d5e3c75 Remove check on unexistant $ids var in WP_Query::get_posts. Props Utkarsh. See #12891
git-svn-id: http://svn.automattic.com/wordpress/trunk@16116 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-31 11:28:49 +00:00
ryan b2e698ed3d get_queried_obecjt() and get_queried_object_id(). Props filosofo. fixes #14015
git-svn-id: http://svn.automattic.com/wordpress/trunk@16091 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-29 20:48:54 +00:00
scribu 88cdfd1d90 Make get_meta_sql() return associative array. See #15032
git-svn-id: http://svn.automattic.com/wordpress/trunk@16053 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-28 17:02:37 +00:00
scribu 9bb5485853 Move get() and set() methods from WP_Query to WP_Object_Query. See #15032
git-svn-id: http://svn.automattic.com/wordpress/trunk@16018 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-27 18:16:52 +00:00
scribu 57a7c073ef Introduce 'fields' query var to WP_Query. See #14777
git-svn-id: http://svn.automattic.com/wordpress/trunk@15982 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-26 19:01:55 +00:00
nacin caf177947d Remove dead arguments. see [15937], see #13818, props dd32.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15942 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-24 03:27:01 +00:00
nacin fe9c1f3770 Remove post_type params from is_archive(). use is_post_type_archive() for full context. see #13818.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15937 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-23 19:20:47 +00:00
nacin 86112c2f7e Move the CPT archive flag outside of the rewrite argument, into its own has_archive. has_archive controls more than just URL rewriting, it also handles whether ?post_type= is treated as a CPT archive. feeds remain in rewrite as ?feed= would work regardless. see #13818.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15936 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-23 18:29:22 +00:00
nacin b0443feba3 Remove some capability_type code in WP_Query. Only build faux caps if we're querying for multiple post types or if the post type object can't be found. see #14122.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15935 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-23 18:16:41 +00:00
scribu c613576e77 Introduce sanitize_title_for_query(). See #9591
git-svn-id: http://svn.automattic.com/wordpress/trunk@15929 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-23 12:55:55 +00:00
scribu 6fca3408b6 Introduce _qv_basename() and apply it to hierarchical taxonomies. See #9591.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15923 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-22 22:54:05 +00:00
scribu e3691d5188 Remove misplaced code in WP_Query::parse_tax_query(). See #12659
git-svn-id: http://svn.automattic.com/wordpress/trunk@15921 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-22 21:17:09 +00:00
scribu defc740cff Revert accidental changes to WP_Query made in [15887]. See #14163
git-svn-id: http://svn.automattic.com/wordpress/trunk@15888 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-21 14:06:52 +00:00
scribu 14fbf27b0d Allow filtering comments by user_id via URL. Props neoxx. Fixes #14163
git-svn-id: http://svn.automattic.com/wordpress/trunk@15887 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-21 14:03:25 +00:00
scribu 0319925e7f Fix tax=term1+term2 queries. See #12891
git-svn-id: http://svn.automattic.com/wordpress/trunk@15874 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-20 19:00:57 +00:00
scribu 21af801a5a Fix 'taxonomy' and 'term' query var logic. See #12891
git-svn-id: http://svn.automattic.com/wordpress/trunk@15860 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-20 12:07:23 +00:00
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