Commit Graph

458 Commits

Author SHA1 Message Date
Nikolay Bachiyski 8a95987fad Keep label as a quick way to set up a taxonomy/post type, without diving into the labels array. Deprecate singular_label while there. Props nacin. Fixes #13357
git-svn-id: https://develop.svn.wordpress.org/trunk@14619 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-14 02:13:49 +00:00
Nikolay Bachiyski 599c19481e I18n for custom taxonomies. Fixes #13357
git-svn-id: https://develop.svn.wordpress.org/trunk@14614 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-14 00:34:04 +00:00
Ryan Boren 3c7ca79f6e Add show_in_nav_menus flag to post type registration. Props williamsba1. fixes #13144
git-svn-id: https://develop.svn.wordpress.org/trunk@14602 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-13 17:29:45 +00:00
Andrew Nacin 4f689c8309 Move taxonomy object properties for capabilities into a cap object. Capabilities can be specified via ['capabilities'] (an array keyed by the generic cap name) for register_taxonomy. fixes #13358.
git-svn-id: https://develop.svn.wordpress.org/trunk@14593 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-13 04:10:17 +00:00
Andrew Nacin 7c0dcdca6b Unset capabilities property when we're done. see #13358.
git-svn-id: https://develop.svn.wordpress.org/trunk@14589 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-12 21:17:38 +00:00
Andrew Nacin 4a19ba4f0f Fix typos. see #13358.
git-svn-id: https://develop.svn.wordpress.org/trunk@14587 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-12 20:57:47 +00:00
Andrew Nacin 323342deec Move post type object capabilities to a 'cap' object. Allow them to be initialized via the 'capabilities' key (an array) when registering support for the post type. Caps are now referred to by the name of the cap as if it was a post, i.e. ->cap->edit_post. see #13358.
git-svn-id: https://develop.svn.wordpress.org/trunk@14585 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-12 20:45:18 +00:00
Andrew Nacin 4b6c5c65c6 Use correct cap check. see #13358.
git-svn-id: https://develop.svn.wordpress.org/trunk@14584 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-12 19:39:30 +00:00
Nikolay Bachiyski ad3881470e I18n for custom post type labels. Props demetris, dimadin. Fixes #12968
git-svn-id: https://develop.svn.wordpress.org/trunk@14571 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-11 19:52:50 +00:00
Ryan Boren d5308265cd Don't set/get tags or categories for post types that do not support them. fixes #13346
git-svn-id: https://develop.svn.wordpress.org/trunk@14561 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-11 16:28:00 +00:00
Ryan Boren ee0b76261b Allow turning off object_term and postmeta cache updates. Turn off object_term updates in the wp_get_nav_menu_items() get_posts() query to avoid useless taxonomy query.
git-svn-id: https://develop.svn.wordpress.org/trunk@14528 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-10 00:58:39 +00:00
Andrew Nacin fd9b4855e6 Simplify is_post_type and is_post_type_hierarchical. Make them work like their taxonomy counterparts. see #12588.
git-svn-id: https://develop.svn.wordpress.org/trunk@14521 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-08 22:10:28 +00:00
Peter Westwood 5b4e507d7d Restore the strtotime(). See #9285.
git-svn-id: https://develop.svn.wordpress.org/trunk@14507 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-07 20:57:23 +00:00
Andrew Nacin ec9d233b8b Fix to is_post_type. props scribu, fixes #12588.
git-svn-id: https://develop.svn.wordpress.org/trunk@14498 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-07 04:57:23 +00:00
Peter Westwood dacd1c5623 Improve cross DST future post publishing behaviour to try and publish at the correct time if we have PHP5 timezone support available to help. Fixes #9285 props technosailor.
git-svn-id: https://develop.svn.wordpress.org/trunk@14487 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-06 20:40:29 +00:00
Andrew Nacin cba25aba7e Prevent ambiguous table aliases in wp_post_mime_type_where. props stephdau, jfarthing84, fixes #12750.
git-svn-id: https://develop.svn.wordpress.org/trunk@14478 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-06 18:03:05 +00:00
Ron Rennick bdb89ac091 add default comment status setting for pages, props messenlehner, see #12991
git-svn-id: https://develop.svn.wordpress.org/trunk@14448 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-04 19:31:24 +00:00
Ron Rennick 3dea05d10c use reset vs offset 0, props scribu, see #13246
git-svn-id: https://develop.svn.wordpress.org/trunk@14447 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-04 18:41:38 +00:00
Ron Rennick 5ac6893996 add export property to post types, see #10317
git-svn-id: https://develop.svn.wordpress.org/trunk@14441 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-04 16:23:25 +00:00
Andrew Nacin 23ce2f4151 Clean up whitespace in status/PT/tax registration.
git-svn-id: https://develop.svn.wordpress.org/trunk@14432 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-04 06:13:28 +00:00
Dion Hulse a8feef50fc Remove accidental code. See #10122
git-svn-id: https://develop.svn.wordpress.org/trunk@14431 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-04 05:48:08 +00:00
Ron Rennick c2b89e7330 use homeurl(), props PeteMall, see #9008
git-svn-id: https://develop.svn.wordpress.org/trunk@14429 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-04 00:28:29 +00:00
Dion Hulse 52cdae0385 Handle $_POST containing an empty term array, Fixes saving of deselecting all hierarchical terms. Fixes #10122
git-svn-id: https://develop.svn.wordpress.org/trunk@14426 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-03 23:35:22 +00:00
Ryan Boren d783952469 Strip trailing whites.
git-svn-id: https://develop.svn.wordpress.org/trunk@14404 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-03 20:26:11 +00:00
Andrew Nacin 2fa9643cf2 Handle page hierarchy when showing the sample permalink. props duck_, fixes #12327.
git-svn-id: https://develop.svn.wordpress.org/trunk@14399 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-03 20:10:26 +00:00
Andrew Nacin fbac23f1eb Update object term cache for custom post types. props scribu, fixes #12989.
git-svn-id: https://develop.svn.wordpress.org/trunk@14310 602fd350-edb4-49c9-b593-d223f7449a82
2010-04-29 20:43:59 +00:00
Andrew Nacin 5dbf47294f When posts/terms are deleted/trashed, update associated menu items. Deleted post = deleted menu item, trashed post = menu item becomes a draft. props filosofo, see #13174
git-svn-id: https://develop.svn.wordpress.org/trunk@14295 602fd350-edb4-49c9-b593-d223f7449a82
2010-04-29 07:33:56 +00:00
Andrew Nacin 68db25c00c Don't translate internal post stati. props nbachiyski, fixes #13024.
git-svn-id: https://develop.svn.wordpress.org/trunk@14262 602fd350-edb4-49c9-b593-d223f7449a82
2010-04-27 22:36:46 +00:00
Ryan Boren 77be931ef4 New menu UI. Props filosofo. see #12713
git-svn-id: https://develop.svn.wordpress.org/trunk@14248 602fd350-edb4-49c9-b593-d223f7449a82
2010-04-27 01:05:58 +00:00
Ryan Boren cb27ac1a30 Revert [14230]. Broke menu save. see #10122
git-svn-id: https://develop.svn.wordpress.org/trunk@14247 602fd350-edb4-49c9-b593-d223f7449a82
2010-04-27 00:44:38 +00:00
Dion Hulse e857394694 Allow edit posts page to save a empty set of terms for a custom hierarchical taxonomy. Props scribu for initial patch. See #10122
git-svn-id: https://develop.svn.wordpress.org/trunk@14230 602fd350-edb4-49c9-b593-d223f7449a82
2010-04-25 07:42:51 +00:00
Dion Hulse 87981059db Change custom post_type default Rewrite endpoint mask to EP_PERMALINK to ensure comment paging rules are added. Removes redundant/non-usable EP_NONE branch. Fixes #13086
git-svn-id: https://develop.svn.wordpress.org/trunk@14219 602fd350-edb4-49c9-b593-d223f7449a82
2010-04-24 14:42:30 +00:00
Andrew Nacin d7a1de87f0 Introduce is_post_type(). Can check if a post type is registered, or also if a post (current or specified) is of a certain post type. fixes #12588, props sirzooro, blepoxp, rmccue
git-svn-id: https://develop.svn.wordpress.org/trunk@14158 602fd350-edb4-49c9-b593-d223f7449a82
2010-04-18 17:40:50 +00:00
Andrew Nacin bf00891a05 Use is_post_type_hierarchical and is_taxonomy_hierarchical when we're fetching a post/tax object only to check the hierarchical flag. fixes #12950.
git-svn-id: https://develop.svn.wordpress.org/trunk@14155 602fd350-edb4-49c9-b593-d223f7449a82
2010-04-18 15:54:45 +00:00
Andrew Nacin 8771fc4af7 Allow include/exclude args to be arrays in get_posts() and get_pages(). Utilizes wp_parse_id_list(). props scribu, fixes #11076.
git-svn-id: https://develop.svn.wordpress.org/trunk@14133 602fd350-edb4-49c9-b593-d223f7449a82
2010-04-18 04:54:19 +00:00
Dion Hulse 1e0f313b60 Do not exclude inherit post_status from query results, Fixes Attachment listing in Gallery tab as well as displaying galleries on the front end (get_children() & friends). See #13031
git-svn-id: https://develop.svn.wordpress.org/trunk@14122 602fd350-edb4-49c9-b593-d223f7449a82
2010-04-17 10:30:46 +00:00
Andrew Nacin 8bc3075b1f Allow for removing all tags in quick edit. Check only if $tags_input isset (can be empty) before running wp_set_post_tags. props sivel, fixes #12318.
git-svn-id: https://develop.svn.wordpress.org/trunk@14117 602fd350-edb4-49c9-b593-d223f7449a82
2010-04-16 21:39:10 +00:00
Andrew Nacin 028f262ccf Introduce the wp_filter_object_list() helper, with an $operator arg. Fixes an intersection bug in get_post_types() and get_taxonomies(). Also switches $operator default from 'or' to 'and' for get_post_stati(). props scribu, fixes #12966.
git-svn-id: https://develop.svn.wordpress.org/trunk@14108 602fd350-edb4-49c9-b593-d223f7449a82
2010-04-16 14:08:58 +00:00
Ryan Boren b9bdd0bfb1 Assume unattached attachments are published. fixes #12999
git-svn-id: https://develop.svn.wordpress.org/trunk@14087 602fd350-edb4-49c9-b593-d223f7449a82
2010-04-14 15:20:15 +00:00
Ryan Boren 2e60fb8e0e Register 'inherit' as a post status. Check the parent post status when commenting on attachments.
git-svn-id: https://develop.svn.wordpress.org/trunk@14086 602fd350-edb4-49c9-b593-d223f7449a82
2010-04-14 14:07:48 +00:00
Dion Hulse 223677bd30 Update get_post_type() to perform on the current global post if none specified. Update PHPDoc to reflect changes. Props rmccue. Fixes #12827
git-svn-id: https://develop.svn.wordpress.org/trunk@14071 602fd350-edb4-49c9-b593-d223f7449a82
2010-04-11 11:10:54 +00:00
Dion Hulse 92e3e6d69f Update Future Scheduled posts publish status to Published upon updating the date to a past date. Props bumbu. Fixes #12751
git-svn-id: https://develop.svn.wordpress.org/trunk@14062 602fd350-edb4-49c9-b593-d223f7449a82
2010-04-10 14:00:30 +00:00
Dion Hulse 0197326e4c Handle future-scheduled custom post_type's. Props waltervos. Fixes #12842
git-svn-id: https://develop.svn.wordpress.org/trunk@14056 602fd350-edb4-49c9-b593-d223f7449a82
2010-04-10 12:17:19 +00:00
Andrew Nacin f6e054f892 Quick edit taxonomy label. props scribu, keighl, fixes #12796
git-svn-id: https://develop.svn.wordpress.org/trunk@14054 602fd350-edb4-49c9-b593-d223f7449a82
2010-04-10 11:54:33 +00:00
Dion Hulse 4d5709b11d Introduce is_post_type_hierarchical(). Props ptahdunbar. See #12950
git-svn-id: https://develop.svn.wordpress.org/trunk@14053 602fd350-edb4-49c9-b593-d223f7449a82
2010-04-10 11:42:45 +00:00
Andrew Nacin c30f9e100c Spell out that _builtin and _edit_link are internal use only. Include some redundancy and repetition for emphasis.
git-svn-id: https://develop.svn.wordpress.org/trunk@14034 602fd350-edb4-49c9-b593-d223f7449a82
2010-04-08 01:04:22 +00:00
Mark Jaquith 697e807eb0 Add menu_position and menu_icon params to register_post_type(). props ptahdunbar. fixes #12541
git-svn-id: https://develop.svn.wordpress.org/trunk@14014 602fd350-edb4-49c9-b593-d223f7449a82
2010-04-06 04:32:08 +00:00
Andrew Nacin 966b3a13e7 Use the API to remove comments when deleting a post. Cleans up comment meta in the process. fixes #12766, props briancolinger
git-svn-id: https://develop.svn.wordpress.org/trunk@13997 602fd350-edb4-49c9-b593-d223f7449a82
2010-04-04 12:42:34 +00:00
Andrew Nacin 122c6db06a Add $force_delete to wp_delete_comment(). see #12766, see #11470.
git-svn-id: https://develop.svn.wordpress.org/trunk@13995 602fd350-edb4-49c9-b593-d223f7449a82
2010-04-04 12:20:19 +00:00
Andrew Nacin 23858b35c2 Add docs to add_post_type_support(). fixes #12644, props sillybean.
git-svn-id: https://develop.svn.wordpress.org/trunk@13985 602fd350-edb4-49c9-b593-d223f7449a82
2010-04-04 04:14:17 +00:00