Commit Graph

545 Commits

Author SHA1 Message Date
scribu 43a3b3b65d Update some @since tags. Props demetris. Fixes #15438
git-svn-id: https://develop.svn.wordpress.org/trunk@16400 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-16 13:16:13 +00:00
Andrew Nacin 76a7d50069 Sanity cast. see #15192.
git-svn-id: https://develop.svn.wordpress.org/trunk@16389 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-15 18:06:57 +00:00
Andrew Nacin 0b7f397e9b set_post_thumbnail(). fixes #15192.
git-svn-id: https://develop.svn.wordpress.org/trunk@16388 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-15 17:59:25 +00:00
Andrew Nacin 682b6a20b2 capability_type = page and no custom caps should also kick on map_meta_cap. see #14122.
git-svn-id: https://develop.svn.wordpress.org/trunk@16387 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-15 17:11:34 +00:00
scribu 32b416f959 Improve hook readability via curly brackets. Props jjj for initial patch. Fixes #15422
git-svn-id: https://develop.svn.wordpress.org/trunk@16365 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-14 15:50:02 +00:00
Andrew Nacin 812c44072a Set map_meta_cap to true when capability_type = post and no custom caps are specified. see #14122.
git-svn-id: https://develop.svn.wordpress.org/trunk@16338 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-13 08:40:38 +00:00
Andrew Nacin 8d5463366a Use term cache in get_post_format() to save a boatload of queries. see #15396.
git-svn-id: https://develop.svn.wordpress.org/trunk@16319 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-12 09:49:34 +00:00
Andrew Nacin d8c91db1f4 Remove more create_function calls. props huichen, see #14424.
git-svn-id: https://develop.svn.wordpress.org/trunk@16313 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-11 22:50:36 +00:00
Ryan Boren af72ac38ff Pass post ID to get_enclosed filter. Props willnorris. fixes #14018
git-svn-id: https://develop.svn.wordpress.org/trunk@16275 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-10 16:40:49 +00:00
Andrew Nacin 66d261ba84 Cripple capability_type. Produced inconsistent, janky meta cap mapping; now only acts as a capability base. see #14122.
git-svn-id: https://develop.svn.wordpress.org/trunk@16273 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-10 14:50:14 +00:00
Andrew Nacin 5861cd15ae Properly set up menu_name. We're handling it differently because it defaults off other labels. fixes #14832.
git-svn-id: https://develop.svn.wordpress.org/trunk@16268 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-10 00:42:43 +00:00
Andrew Nacin a8fca7761a Better better message.
git-svn-id: https://develop.svn.wordpress.org/trunk@16263 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-09 20:37:47 +00:00
Peter Westwood 3f01db9dd9 Better message.
git-svn-id: https://develop.svn.wordpress.org/trunk@16257 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-09 10:45:30 +00:00
Peter Westwood 29da3d7730 Mark the calling of wp_get_recent_posts() with just a count as deprecated - only use in core was from XMLRPC.
git-svn-id: https://develop.svn.wordpress.org/trunk@16255 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-09 10:14:38 +00:00
Andrew Nacin c165557b3e Introduce menu_name label for taxonomies and post types. Defaults to name. fixes #14832.
git-svn-id: https://develop.svn.wordpress.org/trunk@16251 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-09 02:09:00 +00:00
Ryan Boren d73a826715 Eliminate some queries in get_page_by_path() by consulting cache. Props Denis-de-Bernardy, wojtek.szkutnik. fixes #11373
git-svn-id: https://develop.svn.wordpress.org/trunk@16206 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-05 15:26:15 +00:00
Mark Jaquith 85957ff289 Allow get_post_format() to assume current post if none passed in. see #14746
git-svn-id: https://develop.svn.wordpress.org/trunk@16202 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-05 09:40:36 +00:00
Mark Jaquith 32ac7d22a6 get_post_format_string() to get nice version of a post format slug. Try appending post format as a post-status label. Enclose in square brackets to help it stand out. Remove post format strings filter. If this is going to be standard, it should be standard. see #14746
git-svn-id: https://develop.svn.wordpress.org/trunk@16198 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-05 03:04:13 +00:00
Mark Jaquith c44eb74f66 Use post_type_supports() to check for whether a post type supports post formats. Only posts support it by default. props mikeschinkel. see #14746
git-svn-id: https://develop.svn.wordpress.org/trunk@16196 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-05 02:04:22 +00:00
Mark Jaquith 6648c30823 Translate and prettify post formats for display. Also, filterable by themes/plugins to add new ones. see #14746
git-svn-id: https://develop.svn.wordpress.org/trunk@16191 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-04 18:33:50 +00:00
scribu a3009772e7 make not_found puctuation translatable. See #14579
git-svn-id: https://develop.svn.wordpress.org/trunk@16121 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-31 23:21:56 +00:00
Andrew Nacin 310a9b04d2 Move code out of the conditional. props duck_, fixes #14415.
git-svn-id: https://develop.svn.wordpress.org/trunk@16104 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-30 18:21:23 +00:00
Andrew Nacin e2dfe4f5c2 Revert submit_button() for wp-includes, setup-config, install, login, signup. see [16061], see #15064, fixes #15247.
git-svn-id: https://develop.svn.wordpress.org/trunk@16066 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-29 00:31:27 +00:00
Mark Jaquith d65cdf4ba8 Expand submit_button() capabilities. Replace all (or almost all) manual HTML instances in WP. props sbressler. see #15064
git-svn-id: https://develop.svn.wordpress.org/trunk@16061 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-28 21:56:43 +00:00
Ryan Boren 2184a5d0f6 get_current_blog_id(). Props aaroncampbell. fixes #15233
git-svn-id: https://develop.svn.wordpress.org/trunk@16050 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-28 15:46:11 +00:00
Ryan Boren c9d26cd5b3 Refactor wp_get_recent_posts to use get_posts(). Props blepoxp. fixes #14389
git-svn-id: https://develop.svn.wordpress.org/trunk@15973 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-26 13:50:38 +00:00
Andrew Nacin 90b2bbe16e Allow page rewrites to be disabled. see #13818.
git-svn-id: https://develop.svn.wordpress.org/trunk@15970 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-26 07:12:06 +00:00
Andrew Nacin 6eb9fbbd39 Remove post_type params from is_archive(). use is_post_type_archive() for full context. see #13818.
git-svn-id: https://develop.svn.wordpress.org/trunk@15937 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-23 19:20:47 +00:00
Andrew Nacin 6d7366d5fc 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: https://develop.svn.wordpress.org/trunk@15936 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-23 18:29:22 +00:00
Andrew Nacin 7a0720ec5e Allow capability_type to be an array, for odd plural situations such as story/storys/stories. After registration it reverts to a singular string. Lots of documentation for meta capabilities and post types, also some cleanups for register_post_type documentation. see #14122.
git-svn-id: https://develop.svn.wordpress.org/trunk@15934 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-23 18:03:26 +00:00
Andrew Nacin 146a8cf16c Revisions and attachments should also generate meta capabilities as part of their cap object. see #14122.
git-svn-id: https://develop.svn.wordpress.org/trunk@15909 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-22 00:25:14 +00:00
Andrew Nacin 7e48ac3e78 Pruning shears.
git-svn-id: https://develop.svn.wordpress.org/trunk@15904 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-21 19:55:28 +00:00
Andrew Nacin 96052a12a5 Only dumb down delete_others_posts if it deserves to exist. fixes a notice. see #14122.
git-svn-id: https://develop.svn.wordpress.org/trunk@15897 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-21 16:28:35 +00:00
Andrew Nacin c5b02e9685 Clean up get_post_type_capabilities. Don't bother with new capabilities for edit_others_posts and delete_others_posts if the post type does not support authors.
git-svn-id: https://develop.svn.wordpress.org/trunk@15892 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-21 15:05:10 +00:00
Andrew Nacin 71ebaa6170 Rough first pass on map_meta_cap for custom post types. see #14122.
git-svn-id: https://develop.svn.wordpress.org/trunk@15890 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-21 14:40:04 +00:00
scribu c5520dab32 Don't stomp on posts_per_page in get_posts(). Props bobbyblade. Fixes #15150
git-svn-id: https://develop.svn.wordpress.org/trunk@15852 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-19 17:08:32 +00:00
Andrew Nacin 22ba9295bf Introduce show_in_menu for register_post_type. Allows post types to be a submenu. Accepts boolean and also a parent base. With help from duck_. fixes #14145.
git-svn-id: https://develop.svn.wordpress.org/trunk@15844 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-19 07:58:02 +00:00
Andrew Nacin fb4e38b0e7 Pinking shears.
git-svn-id: https://develop.svn.wordpress.org/trunk@15843 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-19 07:48:22 +00:00
Andrew Nacin fc71934f11 Full @since's for 3.1.0.
git-svn-id: https://develop.svn.wordpress.org/trunk@15842 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-19 07:38:42 +00:00
Andrew Nacin 44bf886cb9 Inline docs for _get_last_post_time helper.
git-svn-id: https://develop.svn.wordpress.org/trunk@15841 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-19 07:35:12 +00:00
scribu dfbe420d9c Get rid of wp_cache_key(), as it's not really that useful. See [15838]
git-svn-id: https://develop.svn.wordpress.org/trunk@15839 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-18 21:54:39 +00:00
scribu e62f41c374 Fix custom post type feed when no regular posts present. Props aaroncampbell for initial patch. Fixes #14922
git-svn-id: https://develop.svn.wordpress.org/trunk@15838 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-18 21:06:49 +00:00
Dion Hulse 846ef7d8c3 Save _wp_old_slug for all published post_type's, brings old-slug redirection to Posts and CPT's. See #15140
git-svn-id: https://develop.svn.wordpress.org/trunk@15831 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-18 11:24:29 +00:00
Andrew Nacin 38092bb128 Custom post type archives, second pass. see #13818.
git-svn-id: https://develop.svn.wordpress.org/trunk@15819 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-15 19:44:57 +00:00
Ryan Boren 8e1da911a2 Prevent post and term hierarchy loops. Props mdawaffe. fixes #14662
git-svn-id: https://develop.svn.wordpress.org/trunk@15806 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-14 15:09:04 +00:00
Andrew Nacin cb3396d39c Use correct variable. see #13818.
git-svn-id: https://develop.svn.wordpress.org/trunk@15804 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-14 11:31:48 +00:00
Andrew Nacin 86ab32a196 Custom post type archives. see #13818.
git-svn-id: https://develop.svn.wordpress.org/trunk@15803 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-14 10:39:47 +00:00
Ryan Boren 40dade4c0e Allow deleting a format. see #14746
git-svn-id: https://develop.svn.wordpress.org/trunk@15779 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-12 19:43:54 +00:00
Ryan Boren 0ccec0d6f1 has_post_format(). see #14746
git-svn-id: https://develop.svn.wordpress.org/trunk@15778 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-12 19:25:58 +00:00
Ryan Boren b1beb9c211 Post formats, take one. see #14746
git-svn-id: https://develop.svn.wordpress.org/trunk@15777 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-12 18:33:14 +00:00