Commit Graph

713 Commits

Author SHA1 Message Date
nacin
2571545ec0 @since s/3.2/3.2.0/
git-svn-id: http://svn.automattic.com/wordpress/trunk@18268 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-06-11 04:40:18 +00:00
ryan
a7d3ff7df0 Remove duplicate sentence search terms. Props scribu. fixes #17152
git-svn-id: http://svn.automattic.com/wordpress/trunk@18056 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-05-26 16:41:59 +00:00
nacin
70a4181fc7 Cache post thumbnails in the loop. props garyc40, scribu, greuben. fixes #15447.
git-svn-id: http://svn.automattic.com/wordpress/trunk@17883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-05-12 03:06:03 +00:00
nacin
1379f7a976 Use int for redirect code. props niallkennedy, fixes #17321.
git-svn-id: http://svn.automattic.com/wordpress/trunk@17810 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-05-05 17:33:19 +00:00
ryan
04487fc268 Constructor cleanup. Props ocean90. fixes #16768
git-svn-id: http://svn.automattic.com/wordpress/trunk@17771 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-04-29 20:05:12 +00:00
ryan
0667ceb3be Introduce WP_Meta_Query and relation support. Props scribu, greuben. fixes #17165 #17011
git-svn-id: http://svn.automattic.com/wordpress/trunk@17699 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-04-25 17:27:35 +00:00
dd32
1eaf6f8527 Allow WP_Query 'post_status' parameter to accept an array, as well as a singular value and comma separated list. Fixes #16824
git-svn-id: http://svn.automattic.com/wordpress/trunk@17689 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-04-23 10:36:22 +00:00
ryan
2053dcca12 Don't pollute orderby query var. Props scribu. fixes #16844
git-svn-id: http://svn.automattic.com/wordpress/trunk@17653 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-04-18 21:27:13 +00:00
ryan
f67a8e70ed There is not a NOT operator. Props scribu. fixes #17054 for trunk
git-svn-id: http://svn.automattic.com/wordpress/trunk@17610 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-04-06 16:08:23 +00:00
ryan
ebaa6ded07 Set is_* flags for AND taxonomy queries. fixes #17054 for trunk
git-svn-id: http://svn.automattic.com/wordpress/trunk@17606 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-04-05 18:48:53 +00:00
ryan
1853efd70a Parse the meta query again if query vars change. Set a global query_vars_changed flag instead of doing multiple hash creation calls. Props greuben. see #16742 for trunk
git-svn-id: http://svn.automattic.com/wordpress/trunk@17552 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-03-24 16:07:24 +00:00
ryan
26bdf10db9 Add back compat fields to queried category objects. Props scribu, duck_. fixes #16857 for trunk
git-svn-id: http://svn.automattic.com/wordpress/trunk@17528 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-03-22 20:27:45 +00:00
ryan
ebecb8ffdf Return false instead of WP_Error from get_term_by() if the term does not exist. Makes fetching a term by id consistent with slug and name. Props hakre. fixes #16464 #16717 for trunk
git-svn-id: http://svn.automattic.com/wordpress/trunk@17526 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-03-22 20:06:38 +00:00
ryan
183cd06cf3 Check for WP_Error return from get_term_by(). Props fabifott, kawauso, nacin. fixes #16717 for trunk
git-svn-id: http://svn.automattic.com/wordpress/trunk@17506 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-03-08 22:06:35 +00:00
ryan
73799784cc Don't perform taxonomy queries for single post requests. Props scribu. fixes #16793 for trunk
git-svn-id: http://svn.automattic.com/wordpress/trunk@17504 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-03-08 22:01:19 +00:00
ryan
9e37c6dc0a Don't double process the tag query var. Props scribu. fixes #16730 for trunk
git-svn-id: http://svn.automattic.com/wordpress/trunk@17500 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-03-03 16:11:02 +00:00
markjaquith
8c218d87f0 Reparse the taxonomy query if query vars change. fixes #16622 for trunk
git-svn-id: http://svn.automattic.com/wordpress/trunk@17489 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-03-02 04:10:21 +00:00
ryan
a2603e710e Use ->query instead of . Always kick off the parse_query action. fixes #16545 for trunk
git-svn-id: http://svn.automattic.com/wordpress/trunk@17455 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-02-16 16:25:52 +00:00
ryan
c6931fd951 Run parse_query() in get_posts() so that the query vars are always parsed for set(), get_posts() patterns. fixes #16545 for trunk
git-svn-id: http://svn.automattic.com/wordpress/trunk@17451 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-02-15 23:57:13 +00:00
ryan
f63ccddadb Pink the whites.
git-svn-id: http://svn.automattic.com/wordpress/trunk@17435 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-02-09 17:35:36 +00:00
markjaquith
8e98240a80 Get is_post_type_archive( 'my-post-type' ) working properly outside of the loop. props bit4. fixes #16347
git-svn-id: http://svn.automattic.com/wordpress/trunk@17358 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-01-24 21:15:50 +00:00
ryan
121c9615e1 Resurrect 'tag' query processing. see #16157
git-svn-id: http://svn.automattic.com/wordpress/trunk@17272 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-01-12 21:44:47 +00:00
ryan
1e7b49cece Set tag_id for tag queries. Add NOT support to wp_list_filter(). Props scribu. fixes #16170
git-svn-id: http://svn.automattic.com/wordpress/trunk@17251 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-01-11 18:56:59 +00:00
ryan
939d6de748 Don't parse cat query var twice. Don't include children for category__* queries. Props SergeyBiryukov. see #16152
git-svn-id: http://svn.automattic.com/wordpress/trunk@17246 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-01-09 20:49:11 +00:00
ryan
6a812fc677 Cast category and tag query args to array to allow passing a single ID or slug. Props SergeyBiryukov. fixes #14892
git-svn-id: http://svn.automattic.com/wordpress/trunk@17245 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-01-09 16:42:01 +00:00
ryan
f06af8506b category__and, tag__and, tag_slug__in, tag_slug__and support. fixes #16157
git-svn-id: http://svn.automattic.com/wordpress/trunk@17244 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-01-09 16:19:48 +00:00
ryan
6baed7c3ea Use correct var. Props westi. fixes #16145
git-svn-id: http://svn.automattic.com/wordpress/trunk@17243 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-01-08 17:21:49 +00:00
nacin
f508173dc0 get_meta_sql should be private. see #14645.
git-svn-id: http://svn.automattic.com/wordpress/trunk@17170 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-29 19:31:35 +00:00
ryan
b18df57937 Ignore an empty pagename when correcting is_* for page_on_front requests. Props donalmacarthur, SergeyBiryukov, filosofo. fixes #16002
git-svn-id: http://svn.automattic.com/wordpress/trunk@17162 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-28 22:34:15 +00:00
dd32
9f6d86636a Set taxonomy/term back-compat query vars for all views (not just taxonomy indexes). Fixes #15978
git-svn-id: http://svn.automattic.com/wordpress/trunk@17147 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-25 23:26:09 +00:00
nacin
1a5d8ccdd8 Clarify the _doing_it_wrong message for conditioanl tags. init prevents the fatal error, but the query still isn't run. Just drop the mention of a hook and we end up with better reasoning why this doesn't work to boot. see #14729.
git-svn-id: http://svn.automattic.com/wordpress/trunk@17083 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-20 16:21:42 +00:00
nacin
d6c6444ae8 Don't fatal error when conditional tags are called before init. fixes #14729.
git-svn-id: http://svn.automattic.com/wordpress/trunk@17068 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-19 21:17:52 +00:00
ryan
7e25e3b363 Add like_escape() to some queries. fixes #15764
git-svn-id: http://svn.automattic.com/wordpress/trunk@16999 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-16 14:22:41 +00:00
nacin
d151bf4d8a You are doing it wrong in query.php. see #15824, see #14729.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16947 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-15 12:21:27 +00:00
scribu
6114b7403c Always set groupby when a tax query is involved. See #15752
git-svn-id: http://svn.automattic.com/wordpress/trunk@16894 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-13 15:15:58 +00:00
scribu
0aaef4b1ad Always call WP_Tax_Query::get_sql(). Fixes #15797
git-svn-id: http://svn.automattic.com/wordpress/trunk@16893 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-13 15:11:02 +00:00
scribu
91812fa4a7 Set $wp_query->tax_query earlier. See #15752
git-svn-id: http://svn.automattic.com/wordpress/trunk@16886 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-12 16:38:51 +00:00
scribu
cd02eb7f3f Don't set query flags in parse_tax_query(). See #15487
git-svn-id: http://svn.automattic.com/wordpress/trunk@16880 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-11 15:20:52 +00:00
scribu
cc34c8aef4 Inline docs for WP_Tax_Query. See #15752
git-svn-id: http://svn.automattic.com/wordpress/trunk@16854 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-10 08:20:46 +00:00
scribu
ffb54b11c2 Fix notice in get_queried_object(). See #15752
git-svn-id: http://svn.automattic.com/wordpress/trunk@16853 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-10 07:51:04 +00:00
scribu
ce9b9a9e78 Always have a WP_Tax_Query instance, to prevent notices. See #15752
git-svn-id: http://svn.automattic.com/wordpress/trunk@16851 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-09 19:42:25 +00:00
scribu
e5690e7ebe Introduce WP_Tax_Query. Fix canonical redirects in the process. See #15752
git-svn-id: http://svn.automattic.com/wordpress/trunk@16849 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-09 19:29:21 +00:00
scribu
905f5bf810 Proper check for tax query, which will never be empty, due to 'relation'. See #15752
git-svn-id: http://svn.automattic.com/wordpress/trunk@16844 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-09 17:09:42 +00:00
scribu
e11b831338 Set tax query defaults earlier, for notice prevention and convenience. See #15752
git-svn-id: http://svn.automattic.com/wordpress/trunk@16843 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-09 17:05:40 +00:00
scribu
474c3f0672 Clarify is_single() inline doc. Fixes #14034
git-svn-id: http://svn.automattic.com/wordpress/trunk@16830 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-09 05:27:37 +00:00
markjaquith
298c858c5b Use is_page_type_hierarchical(). props nacin. see #15140
git-svn-id: http://svn.automattic.com/wordpress/trunk@16819 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-08 21:17:01 +00:00
markjaquith
218867ff3c Do not do slug logging/redirects for hierarchical post types. see #15140
git-svn-id: http://svn.automattic.com/wordpress/trunk@16818 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-08 21:10:38 +00:00
scribu
39d0718bff Set queried object on CPT archives. Fixes #15730
git-svn-id: http://svn.automattic.com/wordpress/trunk@16792 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-12-08 08:57:38 +00:00
markjaquith
f23d5de358 Cast to array, to avoid notices. props hakre. fixes #14997
git-svn-id: http://svn.automattic.com/wordpress/trunk@16576 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-24 20:34:22 +00:00
scribu
d941809a3c Remove debug cruft from [16543]. See #14590
git-svn-id: http://svn.automattic.com/wordpress/trunk@16544 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-23 00:49:23 +00:00
scribu
696bfb5fc6 Minor cleanup in queried object setting logic. See #14590
git-svn-id: http://svn.automattic.com/wordpress/trunk@16543 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-23 00:47:45 +00:00
nacin
53a2e0667e Cast term_id to int for queried_object_id. props wojtek.szkutnik, fixes #14590.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16542 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-23 00:32:19 +00:00
scribu
f93ca9618a Prevent notice when checking for hierarchical tax rewrite. Props demetris. See #12891
git-svn-id: http://svn.automattic.com/wordpress/trunk@16538 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-22 21:56:20 +00:00
scribu
06c1418787 Consider only IN tax queries when returning the queried object. See #12891
git-svn-id: http://svn.automattic.com/wordpress/trunk@16531 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-22 05:14:47 +00:00
scribu
0a1d745a54 Move s/ /+ out of WP_Query, so that 'category_name=Some Category' works again. See #12891
git-svn-id: http://svn.automattic.com/wordpress/trunk@16526 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-21 16:33:05 +00:00
scribu
cbd4ea48ca Don't do any taxonomy stuff if is_singular. See #15487
git-svn-id: http://svn.automattic.com/wordpress/trunk@16515 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-20 21:51:21 +00:00
ryan
66d34fa710 array_unique() category__in and category__not_in to eliminate dupes from multiple runs of parse_tax_query(). Fixes canonical redirects for cat, category__in, and category__not_in requests. see #12891 #15487
git-svn-id: http://svn.automattic.com/wordpress/trunk@16513 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-20 21:43:19 +00:00
scribu
36658f37ca Fix logic for when excluding a non-existant term. See #12891
git-svn-id: http://svn.automattic.com/wordpress/trunk@16512 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-20 21:28:50 +00:00
ryan
44733f9635 If the queried term does not exist make sure no posts are returned in the query rather than falling through to querying all posts. Fixes 404s when querying cats that do not exist. see #12891
git-svn-id: http://svn.automattic.com/wordpress/trunk@16511 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-20 21:10:20 +00:00
scribu
b21ec2cbd5 Remove debug cruft from [16505]. See #12891
git-svn-id: http://svn.automattic.com/wordpress/trunk@16506 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-20 13:48:24 +00:00
scribu
7f59d20fb5 Don't set post_type to 'any' for category and tag queries. See #12891
git-svn-id: http://svn.automattic.com/wordpress/trunk@16505 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-20 13:39:07 +00:00
markjaquith
d1d83710e7 Do not set is_category/is_tax/is_tax for is_singular requests. props mtekk. fixes #15487
git-svn-id: http://svn.automattic.com/wordpress/trunk@16495 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-19 19:25:53 +00:00
scribu
7879bcaee5 Force GROUP BY when there's a tax query. See #12891
git-svn-id: http://svn.automattic.com/wordpress/trunk@16482 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-19 09:17:59 +00:00
nacin
695644cc72 Allow is_feed() to drill down the feed being checked. props johnbillion for initial patch, fixes #15460.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16447 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-18 03:19:08 +00:00
ryan
847499e531 Pinking shears
git-svn-id: http://svn.automattic.com/wordpress/trunk@16438 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-17 18:47:34 +00:00
scribu
275888f2e6 Re-introduce ->tax_query as a read-only var. See #12891
git-svn-id: http://svn.automattic.com/wordpress/trunk@16414 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-17 02:04:08 +00:00
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
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
ryan
b5619ffd0c Fix pages setup in setup_postdata(). Props misterbisson. fixes #12651
git-svn-id: http://svn.automattic.com/wordpress/trunk@14750 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-19 18:39:48 +00:00
ryan
5a1f1bd685 Don't update_post_caches if a persistent object cache is installed. fixes #12611
git-svn-id: http://svn.automattic.com/wordpress/trunk@14665 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-15 15:00:53 +00:00
westi
08fc51b214 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: http://svn.automattic.com/wordpress/trunk@14607 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-13 20:39:54 +00:00
westi
175c994615 Add commentary about the posts_search filter. See #10667.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14603 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-13 17:34:43 +00:00
nacin
70f36f6c41 More typos. see #13358.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14588 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-12 21:03:33 +00:00
nacin
7734a07cb2 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: http://svn.automattic.com/wordpress/trunk@14585 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-12 20:45:18 +00:00
nacin
b0eb3033ba Remove apparent debug cruft committed in [14401]. fixes #13355
git-svn-id: http://svn.automattic.com/wordpress/trunk@14565 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-11 18:28:12 +00:00
ryan
66502fba1a 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: http://svn.automattic.com/wordpress/trunk@14528 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-10 00:58:39 +00:00
nacin
8d7445c3e8 Fix start of week and SQL WEEK handling. props mdawaffe, fixes #10397.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14499 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-07 05:01:29 +00:00
nacin
6c69044070 Prevent ambiguous table aliases in wp_post_mime_type_where. props stephdau, jfarthing84, fixes #12750.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14478 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-06 18:03:05 +00:00
nacin
40da0a5720 Remove duplicated query var. props lriggle, fixes #13280.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14477 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-06 17:49:54 +00:00
dd32
ce9fce6073 Handle $wp_query->query being a string in r14341. See #12391, #12047. Fixes #13241
git-svn-id: http://svn.automattic.com/wordpress/trunk@14445 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-04 18:08:03 +00:00
ryan
02c300164a White list instead of black list post types when searching. Props sivel. fixes #13183
git-svn-id: http://svn.automattic.com/wordpress/trunk@14419 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-03 22:22:34 +00:00
ryan
7b7243d94a Strip trailing whites.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14404 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-03 20:26:11 +00:00
dd32
8213b95a67 s/#/ \/\/ / - Remove #comment with // comment in WP_Query
git-svn-id: http://svn.automattic.com/wordpress/trunk@14402 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-03 20:20:46 +00:00
dd32
e840bb1167 WP_Query whitespace cleanup, some loop cleanup as well
git-svn-id: http://svn.automattic.com/wordpress/trunk@14401 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-03 20:19:13 +00:00
dd32
be926482ce Fix custom WP_Queries when using page_on_front. Props aaroncampbell. See #12391 (Which caused it), Fixes #12047
git-svn-id: http://svn.automattic.com/wordpress/trunk@14341 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-02 21:28:11 +00:00
nacin
7ef5f08d00 Update object term cache for custom post types. props scribu, fixes #12989.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14310 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-29 20:43:59 +00:00
ryan
702e3358ad 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: http://svn.automattic.com/wordpress/trunk@14245 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-26 22:12:28 +00:00
dd32
79dea16d7f 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: http://svn.automattic.com/wordpress/trunk@14217 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-24 06:04:05 +00:00
dd32
5d597976b4 Remove double-query for Author ID. Props simonwheatley. Fixes #12048
git-svn-id: http://svn.automattic.com/wordpress/trunk@14160 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-19 10:50:03 +00:00
nacin
f87c42f038 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: http://svn.automattic.com/wordpress/trunk@14135 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-18 05:11:05 +00:00
dd32
41c63bd520 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: http://svn.automattic.com/wordpress/trunk@14121 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-17 09:03:33 +00:00
nacin
14916e2449 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: http://svn.automattic.com/wordpress/trunk@14108 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-16 14:08:58 +00:00
dd32
221075d9f6 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: http://svn.automattic.com/wordpress/trunk@14072 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-11 13:51:24 +00:00
dd32
fedd1a12d4 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: http://svn.automattic.com/wordpress/trunk@14027 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-07 08:29:46 +00:00
dd32
644427dd63 Remove Debug cruft.. See #12704
git-svn-id: http://svn.automattic.com/wordpress/trunk@13839 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-27 06:03:58 +00:00
dd32
f6129316ef Support multiple post_type query params/post_type's to be specified in a query. See #12704
git-svn-id: http://svn.automattic.com/wordpress/trunk@13838 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-27 05:56:27 +00:00
nacin
40773a776b Remove trailing whites and double semicolons.
git-svn-id: http://svn.automattic.com/wordpress/trunk@13830 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-26 19:36:49 +00:00
dd32
e2a7385be8 When viewing a Parent term in a hierarchical taxonomy, display objects contained within children too. Props scribu. Fixes #12533
git-svn-id: http://svn.automattic.com/wordpress/trunk@13787 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-21 02:52:00 +00:00
dd32
b16190c496 Add hierarchical support for custom post_types in Rewrite Rules & Querying. See #12643
git-svn-id: http://svn.automattic.com/wordpress/trunk@13774 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-20 02:23:52 +00:00
nacin
30d6eb32c6 Remove redundant isset() and empty() checks.
git-svn-id: http://svn.automattic.com/wordpress/trunk@13770 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-19 21:29:21 +00:00
westi
b4b9f6075d Make use of apply_filters_ref_array() when running the query. Fixes #9886 props scribu.
git-svn-id: http://svn.automattic.com/wordpress/trunk@13758 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-18 21:55:25 +00:00
ryan
e25a65b36a Trim trailing whitespace
git-svn-id: http://svn.automattic.com/wordpress/trunk@13733 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-17 16:27:25 +00:00
markjaquith
58d47426cc More pedantry. "Setup" is not a verb. http://notaverb.com/setup
git-svn-id: http://svn.automattic.com/wordpress/trunk@13725 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-17 04:39:50 +00:00
dd32
c4d0bd8f0c Prevent PHP Notices on 404 pages
git-svn-id: http://svn.automattic.com/wordpress/trunk@13691 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-13 07:47:20 +00:00
ryan
fbd13a185a Add no_found_rows argument to WP_Query::get_posts() to allow forcibly defeating SQL_CALC_FOUND_ROWS. Use no_found_rows for the query in get_boundary_post(). fixes #12557
git-svn-id: http://svn.automattic.com/wordpress/trunk@13647 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-10 18:37:03 +00:00
dd32
84618548d7 Don't 404 for empty custom taxonomy terms. See #12533
git-svn-id: http://svn.automattic.com/wordpress/trunk@13615 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-07 00:42:50 +00:00
dd32
57c4fe34bd Add meta_value_num meta_key ordering for WP_Query. Allows Natural numeric ordering of results. Props stencil & scribu for cleanups. Fixes #10649
git-svn-id: http://svn.automattic.com/wordpress/trunk@13501 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-28 12:49:10 +00:00
dd32
89406adcee Revert part of r13486, is_tax() is false for tags||categories. See #11904
git-svn-id: http://svn.automattic.com/wordpress/trunk@13495 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-28 09:45:52 +00:00
dd32
70e4a7d880 Re-use /page/xx/ for Post Paging on Page_on_front. Few fixes related to paging on front page. Fixes #12391
git-svn-id: http://svn.automattic.com/wordpress/trunk@13494 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-28 09:40:42 +00:00
dd32
479926f048 When using Page on front, Do not jump back to Blog listing when per-page query vars are set. Fixes #12047
git-svn-id: http://svn.automattic.com/wordpress/trunk@13493 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-28 09:19:34 +00:00
dd32
db84578f24 Initialise Search related query vars. Props scribu. Fixes #11480
git-svn-id: http://svn.automattic.com/wordpress/trunk@13492 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-28 07:47:11 +00:00
dd32
dd78c07865 More powerful version is is_tax(). Props filosofo, scribu. Adds $term parameter. Fixes #11904
git-svn-id: http://svn.automattic.com/wordpress/trunk@13486 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-28 05:59:39 +00:00
ryan
981e0c66b3 Revert [13187] pending further debate. see #12267
git-svn-id: http://svn.automattic.com/wordpress/trunk@13318 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-23 01:13:37 +00:00
wpmuguru
79f04413f4 introduce post & comment classes, props skeltoac, See #12267
git-svn-id: http://svn.automattic.com/wordpress/trunk@13187 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-18 01:52:37 +00:00
ryan
f18f34ead8 Flag post statuses as public, private, protected, or internal. Add flags for showing the type in the admin all query and the admin status list. see #9674
git-svn-id: http://svn.automattic.com/wordpress/trunk@13172 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-16 21:13:44 +00:00
ryan
9316d29c1d Add trash to edit cap check.
git-svn-id: http://svn.automattic.com/wordpress/trunk@13118 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-13 19:05:10 +00:00
dd32
22e4b1200e Initialise Variables, Whitespace cleanup, Remove unused variables, Cast start_of_week option to int in sanitization.
git-svn-id: http://svn.automattic.com/wordpress/trunk@13089 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-13 06:08:15 +00:00
ryan
f147d89df7 Consult exclude_from_search when retrieving post_status = any. see #9674
git-svn-id: http://svn.automattic.com/wordpress/trunk@13052 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-10 22:36:50 +00:00
ryan
ca45669343 Retore p_status. see #9674
git-svn-id: http://svn.automattic.com/wordpress/trunk@13049 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-10 20:37:18 +00:00
ryan
ff8934e482 posts_search filter. Props skeltoac. see #10667
git-svn-id: http://svn.automattic.com/wordpress/trunk@13037 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-09 16:38:05 +00:00
ryan
4ddde1ab9d Look for single-.php templates. Add single- class to get_body_class(). Props ptahdunbar. see #12105
git-svn-id: http://svn.automattic.com/wordpress/trunk@13032 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-08 22:05:05 +00:00
ryan
ba4753fa8d Use canonical status list. see #9674
git-svn-id: http://svn.automattic.com/wordpress/trunk@12995 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-06 17:51:24 +00:00
ryan
6da55f7792 Trailing whitespace cleanup
git-svn-id: http://svn.automattic.com/wordpress/trunk@12733 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-01-15 22:11:12 +00:00
ryan
da89de4958 More custom post type support. Props scribu. see #9674
git-svn-id: http://svn.automattic.com/wordpress/trunk@12597 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-01-04 16:58:43 +00:00
westi
0aaf0d83af Make the meaning of is_home() more explicit.
git-svn-id: http://svn.automattic.com/wordpress/trunk@12516 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-23 15:44:57 +00:00
westi
bc8237d349 Add is_comment_feed() to expose ->is_comment_feed. Fixes #10827 props scribu.
git-svn-id: http://svn.automattic.com/wordpress/trunk@12487 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-22 14:04:14 +00:00
ryan
60c67e593c Remove no longer needed DB has_cap() checks. Props filosofo. fixes #11443
git-svn-id: http://svn.automattic.com/wordpress/trunk@12409 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-15 21:01:57 +00:00
azaozz
1c55a42fa0 Move is_admin() to wp-settings.php so it's available when query.php is not included.
git-svn-id: http://svn.automattic.com/wordpress/trunk@12393 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-14 00:38:05 +00:00
ryan
6622b4fa8e Return false from is_paged() if on the first page. Props Denis-de-Bernardy. fixes #11389
git-svn-id: http://svn.automattic.com/wordpress/trunk@12372 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-11 16:38:59 +00:00
ryan
60c6ba72c1 Fix is_tax(). Props scribu. fixes #10721
git-svn-id: http://svn.automattic.com/wordpress/trunk@12316 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-02 18:00:32 +00:00
azaozz
37bcca4492 Don't show deleted Pages in wp.getPages results, props ryan, props Denis-de-Bernardy,fixes #11243
git-svn-id: http://svn.automattic.com/wordpress/trunk@12303 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-01 08:14:42 +00:00
markjaquith
7b40dadd8d Add missing break. props nickohrn. fixes #11037
git-svn-id: http://svn.automattic.com/wordpress/trunk@12146 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-11-05 20:02:18 +00:00
ryan
795d034b4a Allow querying multiple post types. Props prettyboymp. fixes #10791
git-svn-id: http://svn.automattic.com/wordpress/trunk@12144 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-11-05 16:08:53 +00:00
ryan
c3041b4f56 Honor Post Type for Sticky Posts. Props chrisscott. fixes #11072
git-svn-id: http://svn.automattic.com/wordpress/trunk@12143 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-11-05 15:52:01 +00:00
markjaquith
dd4b5f01c0 Allow ordering by comment_count. fixes #11037
git-svn-id: http://svn.automattic.com/wordpress/trunk@12127 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-10-29 18:02:55 +00:00
ryan
ce94d9ca5c Improve sanitize_post() performance. Perform raw filtering only once. Add filter check to eliminate double filtering. Props johanee. fixes #10972 see #10801
git-svn-id: http://svn.automattic.com/wordpress/trunk@12062 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-10-19 21:28:44 +00:00
westi
04638ecd6f Remove duplicated create_function calls an use a private _search_terms_tidy function instead for tidying up the post/page searching when looking to attach orphans to a parent post or page.
git-svn-id: http://svn.automattic.com/wordpress/trunk@12052 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-10-18 11:50:59 +00:00
ryan
e3f1a830d3 Post type registration. Exclude post types added via plugin from searches by default. Introduce register_post_type() and get_post_types(). fixes #10885
git-svn-id: http://svn.automattic.com/wordpress/trunk@11998 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-10-06 14:43:05 +00:00
markjaquith
4ead128521 esc_sql() for wp-includes
git-svn-id: http://svn.automattic.com/wordpress/trunk@11978 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-09-27 05:33:56 +00:00
ryan
e1d48f65ce Set the cap appropriate to the post type. fixes #10807 see #10605
git-svn-id: http://svn.automattic.com/wordpress/trunk@11960 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-09-22 22:57:01 +00:00
ryan
8e3808bce2 Remove trailing whitespace
git-svn-id: http://svn.automattic.com/wordpress/trunk@11930 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-09-14 14:03:32 +00:00
azaozz
42471b4882 Fix displaying pages and attachments, props dd32, see #10605
git-svn-id: http://svn.automattic.com/wordpress/trunk@11822 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-08-15 10:57:56 +00:00
markjaquith
725a6787b2 Always respect custom post_type in queries. props dd32, filosofo. fixes #10605
git-svn-id: http://svn.automattic.com/wordpress/trunk@11817 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-08-15 03:28:03 +00:00
azaozz
39e4f05a15 Trash status updates for posts, pages, comments and attachments, props caesarsgrunt, see #4529
git-svn-id: http://svn.automattic.com/wordpress/trunk@11749 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-07-30 13:39:34 +00:00
ryan
ddad3fa4a5 absint paged
git-svn-id: http://svn.automattic.com/wordpress/trunk@11606 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-06-19 17:30:39 +00:00
ryan
4d9b6b2fe1 Use proper field for category intersection queries. fixes #9985
git-svn-id: http://svn.automattic.com/wordpress/trunk@11501 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-06-01 17:12:12 +00:00
ryan
fc523a990a Fix loop start, loop end workflow. Props Denis-de-Bernardy. fixes #9944
git-svn-id: http://svn.automattic.com/wordpress/trunk@11464 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-05-26 23:57:01 +00:00
ryan
bd2ed2c190 Restore LEFT JOIN for post_status_join. fixes #9851 see #9720
git-svn-id: http://svn.automattic.com/wordpress/trunk@11452 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-05-25 05:36:48 +00:00
ryan
2df887bd07 Trim tailing whitespace
git-svn-id: http://svn.automattic.com/wordpress/trunk@11450 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-05-24 23:47:49 +00:00
ryan
cbe5ebd66d Revert [11392]. It breaks custom taxonomies for attachments. see #8731
git-svn-id: http://svn.automattic.com/wordpress/trunk@11420 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-05-21 00:10:04 +00:00
ryan
3d208ee264 Add orderby=none. Props DD32. fixes #9819
git-svn-id: http://svn.automattic.com/wordpress/trunk@11415 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-05-20 21:26:00 +00:00
ryan
458a0cf306 Remove global regs that can poison query objects. fixes #9854
git-svn-id: http://svn.automattic.com/wordpress/trunk@11406 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-05-20 16:05:23 +00:00
ryan
40db336ea7 Reset post-related globals in wp_reset_query(). Props Denis-de-Bernardy. fixes #9256
git-svn-id: http://svn.automattic.com/wordpress/trunk@11400 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-05-19 16:16:15 +00:00
ryan
eb71bd2f9c Pass query object to loop_start and loop_end actions. Props Denis-de-Bernardy. fixes #9854
git-svn-id: http://svn.automattic.com/wordpress/trunk@11399 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-05-19 16:13:50 +00:00
ryan
1c1cbe2aa2 Lose broken post_status_join. Exclude revisions from post_type = any queries. Props gortsleigh. fixes #8731
git-svn-id: http://svn.automattic.com/wordpress/trunk@11392 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-05-19 15:25:43 +00:00
ryan
fc0f664353 Unset from GLOBALS. see #9854
git-svn-id: http://svn.automattic.com/wordpress/trunk@11386 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-05-18 18:00:47 +00:00
ryan
05c7b40a29 Break global post ref so we don't pollute queries. see #9854
git-svn-id: http://svn.automattic.com/wordpress/trunk@11382 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-05-18 15:56:39 +00:00
ryan
dd453bec12 Allow combining category and tag queries. Props turboguy. fixes #5433
git-svn-id: http://svn.automattic.com/wordpress/trunk@11348 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-05-15 23:47:28 +00:00
ryan
1354d0660a Don't localize dates where not appropriate. Props Denis-de-Bernardy, hakre. fixes #9730
git-svn-id: http://svn.automattic.com/wordpress/trunk@11323 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-05-14 02:00:32 +00:00
ryan
a478f215d3 JOIN instead of LEFT JOIN. Props Denis-de-Bernardy. fixes #9720
git-svn-id: http://svn.automattic.com/wordpress/trunk@11259 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-05-11 04:56:00 +00:00
westi
f0c4dc3058 Prevent notice check on invalid sticky settings. See #9393 props nbachiyski.
git-svn-id: http://svn.automattic.com/wordpress/trunk@11230 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-05-07 07:05:35 +00:00
ryan
c0f2a493ee Add the_post action. Props Denis-de-Bernardy. fixes #6284
git-svn-id: http://svn.automattic.com/wordpress/trunk@11213 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-05-06 01:42:43 +00:00
ryan
9ae6f72acd Comment query filters. Props filosofo. fixes #9635
git-svn-id: http://svn.automattic.com/wordpress/trunk@11211 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-05-05 22:41:26 +00:00
ryan
30ee53dd96 Fix registration of default taxonomies so that proper rewrite rules are written.
git-svn-id: http://svn.automattic.com/wordpress/trunk@11141 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-04-30 19:05:32 +00:00
ryan
a240e226fb Sanitize when querying against category name so that multiple-word subcategories match. props filosofo. fixes #8619
git-svn-id: http://svn.automattic.com/wordpress/trunk@11121 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-04-29 16:25:33 +00:00
ryan
c85db8e8d7 Don't show password protected posts in searches for non-logged in users. Props coffee2code. fixes #9559
git-svn-id: http://svn.automattic.com/wordpress/trunk@11106 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-04-28 00:05:43 +00:00
azaozz
a4207b955e Fix category__not_in and tag__not_in running empty, props coffee2code, fixes #9645
git-svn-id: http://svn.automattic.com/wordpress/trunk@11086 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-04-25 07:48:17 +00:00
ryan
1d7265b4b2 Revert [10956]. fixes #9643 see #8619
git-svn-id: http://svn.automattic.com/wordpress/trunk@11085 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-04-25 00:01:05 +00:00
ryan
a61bc0ec8a Trailing whitespace cleanup
git-svn-id: http://svn.automattic.com/wordpress/trunk@11013 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-04-20 18:18:39 +00:00
ryan
4956e5d453 Cache user lookups made by nicename. Add get_user_by(). fixes #4170
git-svn-id: http://svn.automattic.com/wordpress/trunk@10992 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-04-17 21:25:11 +00:00
markjaquith
c69b14d5b6 Sanitize when querying against category name so that multiple-word subcategories match. props filosofo. fixes #8619
git-svn-id: http://svn.automattic.com/wordpress/trunk@10956 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-04-16 21:47:42 +00:00
ryan
c15b0ba08b robots.txt is not home. Props johnbillion. fixes #9482
git-svn-id: http://svn.automattic.com/wordpress/trunk@10920 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-04-13 16:15:44 +00:00
azaozz
68e836af48 Set the taxonomy/term when using a custom ?tax_slug=term_slug query, props DD32, fixes #9453
git-svn-id: http://svn.automattic.com/wordpress/trunk@10866 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-04-04 10:48:22 +00:00
ryan
6af5462708 Remove category ordering. Props filosofo. fixes #9228
git-svn-id: http://svn.automattic.com/wordpress/trunk@10779 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-03-13 22:01:33 +00:00
ryan
fbd0169493 Remove meta_value from selected fields. Props filosofo. fixes #9177
git-svn-id: http://svn.automattic.com/wordpress/trunk@10600 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-02-19 19:19:20 +00:00
ryan
92f96f913b Use group by for meta key queries. Props filosofo. fixes #9167 for trunk
git-svn-id: http://svn.automattic.com/wordpress/trunk@10598 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-02-19 19:17:06 +00:00
ryan
85e1fa1d99 Obey post_type. Props filosofo. fixes #8872
git-svn-id: http://svn.automattic.com/wordpress/trunk@10503 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-02-04 20:32:27 +00:00
ryan
e89192b1a8 Strip trailing whitespace
git-svn-id: http://svn.automattic.com/wordpress/trunk@10150 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-12-09 18:03:31 +00:00
ryan
8785bc8a1e Return null if queried object not found. fixes #8244
git-svn-id: http://svn.automattic.com/wordpress/trunk@9859 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-11-24 06:14:40 +00:00
ryan
a161b936a9 Use is_numeric instead of is_integer. Props johnconners. fixes #8284
git-svn-id: http://svn.automattic.com/wordpress/trunk@9795 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-11-19 20:48:05 +00:00
markjaquith
502707fa29 Allow post_parent=0 queries to work. props stefano.verna. fixes #8085
git-svn-id: http://svn.automattic.com/wordpress/trunk@9774 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-11-19 05:02:24 +00:00
ryan
86702a2520 Notice fixes. Props DD32. see #7509
git-svn-id: http://svn.automattic.com/wordpress/trunk@9714 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-11-15 17:56:44 +00:00
ryan
545da15950 Notice fixes from DD32. see #7509
git-svn-id: http://svn.automattic.com/wordpress/trunk@9596 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-11-10 18:54:18 +00:00
azaozz
7c063b0b50 Preview fixes: different method of showing previews for published posts, now uses the proper templates. Fixes #8052
git-svn-id: http://svn.automattic.com/wordpress/trunk@9509 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-11-04 13:00:12 +00:00
azaozz
b5e210f644 Bring back [8788], was reverted with #7663
git-svn-id: http://svn.automattic.com/wordpress/trunk@9081 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-10-04 01:35:47 +00:00
ryan
3dc5beb9ce tag__not_in and category__not_in query fixes. see #7599
git-svn-id: http://svn.automattic.com/wordpress/trunk@9031 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-09-29 21:24:24 +00:00
ryan
c9cad6e514 Group by not needed for not_in and and taxonomy queries. Props Otto42. fixes #7761
git-svn-id: http://svn.automattic.com/wordpress/trunk@8968 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-09-24 08:03:42 +00:00
ryan
04ce449e3c First cut of comment paging. Add paging and threading settings. see #7769 #7635
git-svn-id: http://svn.automattic.com/wordpress/trunk@8961 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-09-23 21:11:27 +00:00
azaozz
55b94822e0 Allow posts to be ordered by meta_key, props AaronCampbell, fixes#7431
git-svn-id: http://svn.automattic.com/wordpress/trunk@8922 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-09-18 05:34:37 +00:00
ryan
6e3a5acd3b phpdoc for query.php. Props jacobsantos. fixes #7663
git-svn-id: http://svn.automattic.com/wordpress/trunk@8807 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-09-04 19:19:32 +00:00
azaozz
027328b8a6 is_archive() should be true for custom taxonomies too
git-svn-id: http://svn.automattic.com/wordpress/trunk@8788 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-09-01 04:10:57 +00:00
ryan
e1ebd0e10a Mike filter suppression. Props DD32. see #7326
git-svn-id: http://svn.automattic.com/wordpress/trunk@8773 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-08-29 18:33:04 +00:00
ryan
d927db8f2d Suppress query filters when called from get_posts(). see #7326 #7547
git-svn-id: http://svn.automattic.com/wordpress/trunk@8766 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-08-28 22:30:27 +00:00
westi
00583d64eb Performance improvements using strpos. Fixes #7611 and #7610 props johnbillion.
git-svn-id: http://svn.automattic.com/wordpress/trunk@8754 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-08-27 20:47:01 +00:00
ryan
ed5372a6ab wpdb::has_cap() from mdawaffe. fixes #7609
git-svn-id: http://svn.automattic.com/wordpress/trunk@8740 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-08-26 23:57:48 +00:00
ryan
e6640c911a Use a subquery in category__not_in query if the DB version supports it. Props pedrop. fixes #7599
git-svn-id: http://svn.automattic.com/wordpress/trunk@8738 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-08-26 19:18:58 +00:00
markjaquith
f4f6fb2019 Strip trailing spaces in URLs, redirect to canonical URL. fixes #7537
git-svn-id: http://svn.automattic.com/wordpress/trunk@8667 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-08-19 03:21:12 +00:00
ryan
113c014920 Notice fixes. Props DD32. see #7509
git-svn-id: http://svn.automattic.com/wordpress/trunk@8646 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-08-14 17:00:37 +00:00
ryan
15440186be Add sticky_class() template tag. see #7457
git-svn-id: http://svn.automattic.com/wordpress/trunk@8637 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-08-13 18:21:52 +00:00
ryan
35b18e5034 Trailing whitespace cleanup
git-svn-id: http://svn.automattic.com/wordpress/trunk@8600 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-08-09 05:36:14 +00:00
westi
b3cb14fb80 Lots of fixes for Notices when WP_DEBUG is set. See #6669 props santosj.
git-svn-id: http://svn.automattic.com/wordpress/trunk@8589 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-08-08 17:05:10 +00:00
markjaquith
74c46749cb Cast to array when using foreach(). Props santosj (and thanks for your perseverance!). fixes #2784
git-svn-id: http://svn.automattic.com/wordpress/trunk@8572 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-08-06 20:31:54 +00:00
ryan
5eae274300 Use get_term_by() instead of is_term() to query slug. see #6593
git-svn-id: http://svn.automattic.com/wordpress/trunk@8555 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-08-05 21:07:59 +00:00
ryan
7564143444 Sticky Posts, firct cut. see #7457
git-svn-id: http://svn.automattic.com/wordpress/trunk@8546 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-08-05 05:48:21 +00:00
azaozz
38aa571484 Allow comma-separated post_status values in WP_Query. Props markjaquith, fixes #7423 for 2.7
git-svn-id: http://svn.automattic.com/wordpress/trunk@8504 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-07-30 08:16:56 +00:00
markjaquith
bf9f2f1cc7 Don't call loop_end hook if we don't have any posts. props Denis-de-Bernardy and DD32. fixes #6769 for trunk
git-svn-id: http://svn.automattic.com/wordpress/trunk@8188 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-06-24 19:58:54 +00:00
ryan
f8cc400a40 Disambiguate column. Props voxpelli. fixes #7073
git-svn-id: http://svn.automattic.com/wordpress/trunk@8185 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-06-24 17:49:24 +00:00
matt
2d8fa9ee21 get_queried_object should not return an array of terms, and wp_title should check is_tax. Hat tip: andy
git-svn-id: http://svn.automattic.com/wordpress/trunk@7941 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-05-16 03:57:09 +00:00
ryan
7a0f94ffa3 Query cleanups. Use absint, concat where instead of overwrite, make post_parent independent, sanitize post__in and post__not_in. Props mdawaffe. see #6772
git-svn-id: http://svn.automattic.com/wordpress/trunk@7906 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-05-08 05:17:27 +00:00
ryan
c25a6fe381 Fix page 404 when page_for_posts is empty. see #6539
git-svn-id: http://svn.automattic.com/wordpress/trunk@7905 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-05-07 19:57:15 +00:00
ryan
d9fd98601e Use WP_query in get_posts(). Props filosofo. fixes #6772
git-svn-id: http://svn.automattic.com/wordpress/trunk@7880 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-05-03 20:08:32 +00:00
ryan
c92c2be2af Fix menu_order ordering. Props torfason. fixes #6731 for trunk
git-svn-id: http://svn.automattic.com/wordpress/trunk@7685 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-04-15 01:39:33 +00:00
ryan
c3e32dcd4e Revert [7605]. It breaks setting posts page. see #6539
git-svn-id: http://svn.automattic.com/wordpress/trunk@7622 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-04-08 01:05:45 +00:00
ryan
81d1b488a9 Explicit ID check so we don't fall through for empties. Props natecook. fixes #6539 for 2.6
git-svn-id: http://svn.automattic.com/wordpress/trunk@7605 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-04-06 23:23:05 +00:00
markjaquith
29a551d786 Sanitize "cat" query var and cast to int before looking for a category template
git-svn-id: http://svn.automattic.com/wordpress/trunk@7586 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-04-02 13:15:21 +00:00
ryan
bba593e250 Fix attachment links for permalink structures containing category tag. Props andy. fixes #4699
git-svn-id: http://svn.automattic.com/wordpress/trunk@7531 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-03-26 20:17:31 +00:00
ryan
e1b1845154 Taxonomy links and template tags from andy. see #6357
git-svn-id: http://svn.automattic.com/wordpress/trunk@7520 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-03-26 06:37:19 +00:00
ryan
8f35f1a817 Cleanup cat query var
git-svn-id: http://svn.automattic.com/wordpress/trunk@7511 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-03-25 17:47:02 +00:00
ryan
1276a8283c Fix some notices
git-svn-id: http://svn.automattic.com/wordpress/trunk@7503 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-03-24 20:30:33 +00:00
ryan
cce67416a3 Taxonomy queries and urls. Props andy. see #6357
git-svn-id: http://svn.automattic.com/wordpress/trunk@7491 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-03-23 17:02:11 +00:00
ryan
884be4169f Add option to check caps when querying a particular post status. fixes #6052
git-svn-id: http://svn.automattic.com/wordpress/trunk@7109 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-02-29 21:49:49 +00:00
ryan
0b43776d5f For page attachmentes, set both is_attachment and is_page to true so that templates cascade correctly.
git-svn-id: http://svn.automattic.com/wordpress/trunk@7070 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-02-27 21:30:59 +00:00
ryan
699b250926 Small code formatting tweak
git-svn-id: http://svn.automattic.com/wordpress/trunk@6986 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-02-22 20:48:28 +00:00
ryan
dce0978cee Notice fixes from nbachiyski. fixes #5961
git-svn-id: http://svn.automattic.com/wordpress/trunk@6983 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-02-22 17:43:56 +00:00
ryan
366cfe0d03 Media Library design updates from Andy. see #5911
git-svn-id: http://svn.automattic.com/wordpress/trunk@6910 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-02-19 06:13:20 +00:00
ryan
daf0d9a7e9 Allow is_single(), is_category(), and is_tag() to accept arrays. Props fitzrev. fixes #5593
git-svn-id: http://svn.automattic.com/wordpress/trunk@6823 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-02-13 19:02:08 +00:00
ryan
bf2f730177 Show full content, including content after the more tag, for feeds. fixes #2582
git-svn-id: http://svn.automattic.com/wordpress/trunk@6763 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-02-09 00:19:48 +00:00
ryan
9989d4c23e Allow rand post ordering. Props Otto42 and Nazgul. fixes #4617
git-svn-id: http://svn.automattic.com/wordpress/trunk@6760 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-02-08 19:50:10 +00:00
ryan
bddedf8c3e Rename is_front() to is_front_page() to avoid conflict with bbPress. see #3682
git-svn-id: http://svn.automattic.com/wordpress/trunk@6740 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-02-06 21:21:22 +00:00
ryan
d88983793b Trailing whitespace cleanup
git-svn-id: http://svn.automattic.com/wordpress/trunk@6726 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-02-05 06:47:27 +00:00
ryan
43852a57c3 is_front() from markjaquith and Nazgul. fixes #3682
git-svn-id: http://svn.automattic.com/wordpress/trunk@6704 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-02-02 00:13:34 +00:00
ryan
c52e264fde Don't advance post counter when resetting query. see #5439
git-svn-id: http://svn.automattic.com/wordpress/trunk@6688 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-01-29 23:58:41 +00:00
ryan
7f4b870b15 Make sure we have a post when doing post comment feed query. Props ruckus. see #5185
git-svn-id: http://svn.automattic.com/wordpress/trunk@6683 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-01-29 19:01:39 +00:00
westi
520d17d7f0 Switch from abs(intval()) to absint(). See #4762.
git-svn-id: http://svn.automattic.com/wordpress/trunk@6682 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-01-29 18:48:38 +00:00
ryan
3c0db5ec37 Restore global post when resetting the query. Props ionfish. fixes #5439
git-svn-id: http://svn.automattic.com/wordpress/trunk@6653 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-01-25 01:41:57 +00:00
ryan
7eb704b71b Pass remember arg. see #5405
git-svn-id: http://svn.automattic.com/wordpress/trunk@6644 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-01-23 18:20:59 +00:00
ryan
f635599744 Use is_admin. Props markjaquith. see #5487
git-svn-id: http://svn.automattic.com/wordpress/trunk@6509 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-12-28 01:04:17 +00:00
ryan
e587cbafcc Throw pages into search queries. Let's see how they handle. see #5149
git-svn-id: http://svn.automattic.com/wordpress/trunk@6467 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-12-22 08:19:10 +00:00
westi
21d9604409 Fix query variable naming errors.
git-svn-id: http://svn.automattic.com/wordpress/trunk@6435 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-12-20 20:59:53 +00:00
ryan
f4b80af89a Better is_admin() check from filosofo and pishmishy. fixes #5487
git-svn-id: http://svn.automattic.com/wordpress/trunk@6412 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-12-19 17:56:16 +00:00
ryan
1d9a4211dc Accept array of pages for is_page(). Props azaozz. fixes #5430
git-svn-id: http://svn.automattic.com/wordpress/trunk@6397 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-12-17 06:21:43 +00:00
ryan
2088cb4a1a Faster page_rows() from hailin. see #5303
git-svn-id: http://svn.automattic.com/wordpress/trunk@6380 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-12-14 06:20:42 +00:00
ryan
f0a47b7127 Query page attachments from page requests so that they can both use the same set of rewrite rules. see #3614
git-svn-id: http://svn.automattic.com/wordpress/trunk@6377 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-12-12 11:45:55 +00:00
ryan
028a159440 Remove unused vars. Props DD32. see #5418
git-svn-id: http://svn.automattic.com/wordpress/trunk@6364 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-12-06 19:49:33 +00:00
ryan
bbc8fa3b14 Do two sets of filters on posts query. First set is used by regular plugins, second by caching plugins.
git-svn-id: http://svn.automattic.com/wordpress/trunk@6341 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-11-18 19:36:30 +00:00
ryan
ab845b0000 Move posts_selection action to after post_limits filter.
git-svn-id: http://svn.automattic.com/wordpress/trunk@6338 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-11-17 00:04:19 +00:00
ryan
a2e0f3352f Disambiguate columns. Props lawrence123. fixes #5256
git-svn-id: http://svn.automattic.com/wordpress/trunk@6310 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-11-03 19:00:33 +00:00
ryan
befa8f0f11 Eliminate extra query.
git-svn-id: http://svn.automattic.com/wordpress/trunk@6245 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-10-13 18:53:28 +00:00
ryan
c674a475d7 Use inner joins instead of left joins for taxonomy. Inner is faster. fixes #5179
git-svn-id: http://svn.automattic.com/wordpress/trunk@6224 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-10-11 17:43:49 +00:00
ryan
7f61116c5b Add some spacing. fixes #5137 for trunk
git-svn-id: http://svn.automattic.com/wordpress/trunk@6189 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-10-05 16:27:48 +00:00
ryan
fe60a3ab06 New taxonomy intersection queries from xknown. fixes #5137
git-svn-id: http://svn.automattic.com/wordpress/trunk@6186 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-10-04 18:10:03 +00:00
ryan
9bfccd6286 Add checks for WP_Error. Props filosofo. see #4809
git-svn-id: http://svn.automattic.com/wordpress/trunk@6125 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-09-18 16:32:22 +00:00
ryan
368b18d383 Set tag_id to first tag in multi tag queries. Have single_cat_title() fallback to single_tag_title() if is_tag so that existing category templates will work with tags. fixes #4506
git-svn-id: http://svn.automattic.com/wordpress/trunk@6074 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-09-11 18:06:52 +00:00
ryan
1760555e8b Don't skip sanitization if 404. Add wp_title display filters.
git-svn-id: http://svn.automattic.com/wordpress/trunk@6035 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-09-05 03:11:04 +00:00
ryan
321c310717 Remove trailing whitespace
git-svn-id: http://svn.automattic.com/wordpress/trunk@6026 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-09-03 23:32:58 +00:00
ryan
87c4f3a17f Strip lines that contain only whitespace down to newlines.
git-svn-id: http://svn.automattic.com/wordpress/trunk@6025 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-09-03 23:19:20 +00:00
markjaquith
e468628526 Check for wp-admin case-insensitively in is_admin()
git-svn-id: http://svn.automattic.com/wordpress/trunk@6022 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-09-03 19:56:09 +00:00
ryan
58c7ce91e3 Tag unions and intersections. fixes #4895
git-svn-id: http://svn.automattic.com/wordpress/trunk@6021 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-09-03 18:14:05 +00:00
ryan
986715f5b6 tag_id not tag__id. see #4895
git-svn-id: http://svn.automattic.com/wordpress/trunk@6012 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-09-03 03:26:57 +00:00
ryan
f87baf5b1f tag__in, tag__not_in, and tag_and queries. fixes #4895
git-svn-id: http://svn.automattic.com/wordpress/trunk@6011 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-09-03 03:24:23 +00:00
ryan
86932908e3 Add missing global and remove unused var. Props JeremyVisser. fixes #4818
git-svn-id: http://svn.automattic.com/wordpress/trunk@5944 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-08-26 17:12:31 +00:00
ryan
ac46bc16c7 Don't allow private query vars in url_to_postid
git-svn-id: http://svn.automattic.com/wordpress/trunk@5925 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-08-23 16:09:37 +00:00
ryan
cbad9a2993 posts_results and posts_selection hooks. fixes #4799
git-svn-id: http://svn.automattic.com/wordpress/trunk@5916 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-08-22 18:03:26 +00:00
ryan
851ce58496 Some tag api additions from andy.
git-svn-id: http://svn.automattic.com/wordpress/trunk@5912 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-08-21 18:39:45 +00:00
ryan
567bc9d3f1 wp_reset_query() from mdawaffe. fixes #4741
git-svn-id: http://svn.automattic.com/wordpress/trunk@5907 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-08-20 22:55:43 +00:00
ryan
ff20fd6c17 Category union and intersection query vars. fixes #4750
git-svn-id: http://svn.automattic.com/wordpress/trunk@5873 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-08-15 22:08:51 +00:00
markjaquith
fa0dc110d9 Allow for hour/minute/second values in the QS that evaluate as false (like 0). Props Otto42 and agharbeia. fixes #4499
git-svn-id: http://svn.automattic.com/wordpress/trunk@5848 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-08-04 16:30:27 +00:00