Commit Graph

610 Commits

Author SHA1 Message Date
scribu
10532b9345 Don't stomp on posts_per_page in get_posts(). Props bobbyblade. Fixes #15150
git-svn-id: http://svn.automattic.com/wordpress/trunk@15852 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-19 17:08:32 +00:00
nacin
c840f4676e 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: http://svn.automattic.com/wordpress/trunk@15844 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-19 07:58:02 +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
nacin
76e493c281 Full @since's for 3.1.0.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15842 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-19 07:38:42 +00:00
nacin
7c39422697 Inline docs for _get_last_post_time helper.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15841 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-19 07:35:12 +00:00
scribu
efb8b6abcc Get rid of wp_cache_key(), as it's not really that useful. See [15838]
git-svn-id: http://svn.automattic.com/wordpress/trunk@15839 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-18 21:54:39 +00:00
scribu
ea1470d6af Fix custom post type feed when no regular posts present. Props aaroncampbell for initial patch. Fixes #14922
git-svn-id: http://svn.automattic.com/wordpress/trunk@15838 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-18 21:06:49 +00:00
dd32
7c046687ec Save _wp_old_slug for all published post_type's, brings old-slug redirection to Posts and CPT's. See #15140
git-svn-id: http://svn.automattic.com/wordpress/trunk@15831 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-18 11:24:29 +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
ryan
0a01e66745 Prevent post and term hierarchy loops. Props mdawaffe. fixes #14662
git-svn-id: http://svn.automattic.com/wordpress/trunk@15806 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-14 15:09:04 +00:00
nacin
142f9230f0 Use correct variable. see #13818.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15804 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-14 11:31:48 +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
ryan
d082fbbb4f Allow deleting a format. see #14746
git-svn-id: http://svn.automattic.com/wordpress/trunk@15779 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-12 19:43:54 +00:00
ryan
d753847050 has_post_format(). see #14746
git-svn-id: http://svn.automattic.com/wordpress/trunk@15778 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-12 19:25:58 +00:00
ryan
0982c3c0f9 Post formats, take one. see #14746
git-svn-id: http://svn.automattic.com/wordpress/trunk@15777 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-12 18:33:14 +00:00
ryan
76c787d4d2 Some more hierarchy loop detection.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15758 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-08 16:22:14 +00:00
nacin
5757866954 Sticky post support for post types, first pass. see #12702, props azizur.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15742 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-07 09:10:35 +00:00
dd32
6129438ba5 Cache terms under more scenario's in update_post_caches(). Fixes #15026
git-svn-id: http://svn.automattic.com/wordpress/trunk@15700 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-04 08:56:04 +00:00
nacin
d596b05eac wp_quickpress_form, first pass. props jorbin. see #14966.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15691 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-03 07:41:48 +00:00
nacin
4e666d5d44 Move some post and taxonomy functions from admin/includes to wp-includes in preparation for QuickPress template tag. Moves get_tags_to_edit, get_terms_to_edit, get_default_post_to_edit, media_buttons, _media_button, get_upload_iframe_src. Also introduce get_media_buttons as a wrapper for media_buttons. props jorbin, see #14966.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15688 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-03 02:58:59 +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
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
f2c9a08521 Don't hardcode the pagination base. Fixes #12507
git-svn-id: http://svn.automattic.com/wordpress/trunk@15582 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-09-07 01:18:42 +00:00
nacin
15bc341696 phpdoc, @since, whitespace. Also require an argument in wp_insert_post(). props duck_, see #14783.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15564 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-09-05 02:45:39 +00:00
nacin
650f97e684 Adjustments to [15549]. See #11624.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15563 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-09-04 15:51:04 +00:00
scribu
950901ca92 Don't use the global anymore. Fixes #11624
git-svn-id: http://svn.automattic.com/wordpress/trunk@15549 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-08-28 11:57:28 +00:00
scribu
bc0c1bb3f0 Always set no_found_rows = true in get_posts(). Fixes #14528
git-svn-id: http://svn.automattic.com/wordpress/trunk@15548 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-08-28 11:51:02 +00:00
markjaquith
e55cf70e35 Do not attempt to clear post cache for post ID 0... that will recursively destroy your server
git-svn-id: http://svn.automattic.com/wordpress/trunk@15503 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-08-18 06:50:53 +00:00
nacin
34e43c7bce Doc update for [15402]. fixes #14301.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15449 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-07-21 00:50:01 +00:00
ryan
8513fbef01 Sanity check properties in wp_get_single_post(). Props filosofo. fixes #13904 for 3.1
git-svn-id: http://svn.automattic.com/wordpress/trunk@15405 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-07-13 21:30:09 +00:00
nacin
5fb64228d8 Have wp_set_post_terms return wp_set_object_terms. fixes #14301.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15402 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-07-13 21:01:48 +00:00
dd32
a14d289755 Alot more tabs. Props jacobsantos & Viper007bond. See #14147
git-svn-id: http://svn.automattic.com/wordpress/trunk@15355 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-06-30 00:05:18 +00:00
ryan
088aff8699 Use get_post_types() to create list of hierarchical post types. fixes #14079 for 3.1
git-svn-id: http://svn.automattic.com/wordpress/trunk@15348 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-06-29 14:10:54 +00:00
ryan
d053a4f707 Avoid var name collision. see #13929
git-svn-id: http://svn.automattic.com/wordpress/trunk@15269 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-06-16 21:46:42 +00:00
ryan
bfd7a6b75b Retern variable to avoid notice in PHP 4.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15265 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-06-16 19:11:44 +00:00
ryan
c614b6d0a2 Deprecate is_term, is_taxonomy, is_post_type for *_exists(). Props nacin. fixes #13747
git-svn-id: http://svn.automattic.com/wordpress/trunk@15220 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-06-11 15:53:41 +00:00
nacin
af612805e8 Move 'helps' argument to the taxonomy labels object. Also move over help_nojs and help_cloud, both introduced in 3.0. This adds three new core labels for non-hierarchical taxonomies, for tweaking the meta box strings. fixes #13805.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15190 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-06-10 16:07:33 +00:00
ryan
930711454f Fix global post stomping in get_post(). Turn get_page() into an alias of get_post(). Props westi. fixes #13753
git-svn-id: http://svn.automattic.com/wordpress/trunk@15188 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-06-10 14:55:26 +00:00
ryan
a353af5a41 phpdoc fix. Props duck_
git-svn-id: http://svn.automattic.com/wordpress/trunk@15169 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-06-08 13:24:20 +00:00
nacin
332c2773e0 Use show_in_nav_menus for attachments. Also add it to register_taxonomy for consistency and have it default to public, not show_ui, like post types. see #13621.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15056 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-29 16:46:46 +00:00
nacin
844226a1d8 Some inline doc updates for get_post_type_capabilities and get_post_type_labels. props MichaelH, fixes #13573.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14991 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-27 12:44:08 +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
16f79e5377 Remove unused/duplicated/undocumented post type object label. see #13539
git-svn-id: http://svn.automattic.com/wordpress/trunk@14903 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-25 19:25:27 +00:00
nacin
479d1d3617 Fix typo. props rovo89, fixes #13494.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14902 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-25 18:59:20 +00:00
ryan
432d56981e Don't set default category when saving an auto-draft. fixes #13531
git-svn-id: http://svn.automattic.com/wordpress/trunk@14883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-25 14:43:39 +00:00
nacin
10562923ae Remove now-unused post_type_object->labels>edit, which was 'Edit' (with context). see #12968, see #11274.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14857 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-24 21:19:29 +00:00
dd32
378f68a0a0 Introduce a 'post_updated' action, Fires when a post is updated, Post ID, Current and Previous post objects are passed. Updatewp_check_for_changed_slugs() to use new hook. See #12473
git-svn-id: http://svn.automattic.com/wordpress/trunk@14814 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-23 07:49:21 +00:00
ryan
f0076eed1c Set show_ui to true for post and page. Exclude _builtin = true from areas where we need to special case builtin types. fixes #13403
git-svn-id: http://svn.automattic.com/wordpress/trunk@14713 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-17 16:39:36 +00:00
westi
01389755c7 Make get_attachment_metadata() loop safe.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14699 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-16 21:00:00 +00:00
nacin
5463205114 Remove default_comment_status_pages setting. Reverts [14451], [14448] for 3.0. see #12991.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14650 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-15 04:56:56 +00:00
ryan
4f88b4bf60 register_post_type phpdoc updates. Props michaelh. fixes #13398
git-svn-id: http://svn.automattic.com/wordpress/trunk@14648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-14 22:26:07 +00:00
nbachiyski
c1dea00b62 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: http://svn.automattic.com/wordpress/trunk@14619 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-14 02:13:49 +00:00
nbachiyski
4cf46b6d96 I18n for custom taxonomies. Fixes #13357
git-svn-id: http://svn.automattic.com/wordpress/trunk@14614 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-14 00:34:04 +00:00
ryan
067fc117cb Add show_in_nav_menus flag to post type registration. Props williamsba1. fixes #13144
git-svn-id: http://svn.automattic.com/wordpress/trunk@14602 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-13 17:29:45 +00:00
nacin
af91e5264a 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: http://svn.automattic.com/wordpress/trunk@14593 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-13 04:10:17 +00:00
nacin
e15c230ffc Unset capabilities property when we're done. see #13358.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14589 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-12 21:17:38 +00:00
nacin
1cb8b7d994 Fix typos. see #13358.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14587 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-12 20:57:47 +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
b2d3b7efa2 Use correct cap check. see #13358.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14584 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-12 19:39:30 +00:00
nbachiyski
46afe7c285 I18n for custom post type labels. Props demetris, dimadin. Fixes #12968
git-svn-id: http://svn.automattic.com/wordpress/trunk@14571 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-11 19:52:50 +00:00
ryan
c7f520240c Don't set/get tags or categories for post types that do not support them. fixes #13346
git-svn-id: http://svn.automattic.com/wordpress/trunk@14561 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-11 16:28:00 +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
2eab801eec Simplify is_post_type and is_post_type_hierarchical. Make them work like their taxonomy counterparts. see #12588.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14521 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-08 22:10:28 +00:00
westi
5ac646d37d Restore the strtotime(). See #9285.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14507 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-07 20:57:23 +00:00
nacin
1c05c2f6e2 Fix to is_post_type. props scribu, fixes #12588.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14498 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-07 04:57:23 +00:00
westi
390a40981f 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: http://svn.automattic.com/wordpress/trunk@14487 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-06 20:40: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
wpmuguru
96153a63ae add default comment status setting for pages, props messenlehner, see #12991
git-svn-id: http://svn.automattic.com/wordpress/trunk@14448 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-04 19:31:24 +00:00
wpmuguru
1beb7406da use reset vs offset 0, props scribu, see #13246
git-svn-id: http://svn.automattic.com/wordpress/trunk@14447 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-04 18:41:38 +00:00
wpmuguru
94e529cee3 add export property to post types, see #10317
git-svn-id: http://svn.automattic.com/wordpress/trunk@14441 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-04 16:23:25 +00:00
nacin
86c5154557 Clean up whitespace in status/PT/tax registration.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14432 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-04 06:13:28 +00:00
dd32
c843c7edf3 Remove accidental code. See #10122
git-svn-id: http://svn.automattic.com/wordpress/trunk@14431 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-04 05:48:08 +00:00
wpmuguru
abed02b32d use homeurl(), props PeteMall, see #9008
git-svn-id: http://svn.automattic.com/wordpress/trunk@14429 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-04 00:28:29 +00:00
dd32
2bbdd19973 Handle $_POST containing an empty term array, Fixes saving of deselecting all hierarchical terms. Fixes #10122
git-svn-id: http://svn.automattic.com/wordpress/trunk@14426 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-03 23:35:22 +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
nacin
aca357b327 Handle page hierarchy when showing the sample permalink. props duck_, fixes #12327.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14399 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-03 20:10:26 +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
nacin
d1a37c1f31 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: http://svn.automattic.com/wordpress/trunk@14295 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-29 07:33:56 +00:00
nacin
1143a84f7f Don't translate internal post stati. props nbachiyski, fixes #13024.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14262 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-27 22:36:46 +00:00
ryan
e879a9ab0e New menu UI. Props filosofo. see #12713
git-svn-id: http://svn.automattic.com/wordpress/trunk@14248 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-27 01:05:58 +00:00
ryan
418b0b7e69 Revert [14230]. Broke menu save. see #10122
git-svn-id: http://svn.automattic.com/wordpress/trunk@14247 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-27 00:44:38 +00:00
dd32
e79df91561 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: http://svn.automattic.com/wordpress/trunk@14230 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-25 07:42:51 +00:00
dd32
356a50d1f0 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: http://svn.automattic.com/wordpress/trunk@14219 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-24 14:42:30 +00:00
nacin
e47e3cc31c 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: http://svn.automattic.com/wordpress/trunk@14158 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-18 17:40:50 +00:00
nacin
98b9ace627 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: http://svn.automattic.com/wordpress/trunk@14155 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-18 15:54:45 +00:00
nacin
4ba94c72fc 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: http://svn.automattic.com/wordpress/trunk@14133 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-18 04:54:19 +00:00
dd32
eb74c91d9f 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: http://svn.automattic.com/wordpress/trunk@14122 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-17 10:30:46 +00:00
nacin
e6e03bd7df 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: http://svn.automattic.com/wordpress/trunk@14117 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-16 21:39:10 +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
ryan
5e923222fa Assume unattached attachments are published. fixes #12999
git-svn-id: http://svn.automattic.com/wordpress/trunk@14087 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-14 15:20:15 +00:00
ryan
31c4756a42 Register 'inherit' as a post status. Check the parent post status when commenting on attachments.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14086 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-14 14:07:48 +00:00
dd32
b555a9a076 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: http://svn.automattic.com/wordpress/trunk@14071 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-11 11:10:54 +00:00
dd32
0e7c1a0cb3 Update Future Scheduled posts publish status to Published upon updating the date to a past date. Props bumbu. Fixes #12751
git-svn-id: http://svn.automattic.com/wordpress/trunk@14062 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-10 14:00:30 +00:00
dd32
0b4ebffe70 Handle future-scheduled custom post_type's. Props waltervos. Fixes #12842
git-svn-id: http://svn.automattic.com/wordpress/trunk@14056 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-10 12:17:19 +00:00
nacin
5e36f9f821 Quick edit taxonomy label. props scribu, keighl, fixes #12796
git-svn-id: http://svn.automattic.com/wordpress/trunk@14054 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-10 11:54:33 +00:00
dd32
ab16d12c2c Introduce is_post_type_hierarchical(). Props ptahdunbar. See #12950
git-svn-id: http://svn.automattic.com/wordpress/trunk@14053 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-10 11:42:45 +00:00
nacin
48dc61d1a9 Spell out that _builtin and _edit_link are internal use only. Include some redundancy and repetition for emphasis.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14034 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-08 01:04:22 +00:00
markjaquith
f1fd3f2780 Add menu_position and menu_icon params to register_post_type(). props ptahdunbar. fixes #12541
git-svn-id: http://svn.automattic.com/wordpress/trunk@14014 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-06 04:32:08 +00:00
nacin
c059c511df Use the API to remove comments when deleting a post. Cleans up comment meta in the process. fixes #12766, props briancolinger
git-svn-id: http://svn.automattic.com/wordpress/trunk@13997 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-04 12:42:34 +00:00
nacin
791192d961 Add $force_delete to wp_delete_comment(). see #12766, see #11470.
git-svn-id: http://svn.automattic.com/wordpress/trunk@13995 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-04 12:20:19 +00:00
nacin
2e054e2805 Add docs to add_post_type_support(). fixes #12644, props sillybean.
git-svn-id: http://svn.automattic.com/wordpress/trunk@13985 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-04 04:14:17 +00:00
nacin
5f50e18c0b Add post type parameter to get_page_by_title(). props mikeschinkel, fixes #12743.
git-svn-id: http://svn.automattic.com/wordpress/trunk@13899 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-31 08:20:28 +00:00
nacin
3918b75cbe Change @since 2.9 to @since 2.9.0.
git-svn-id: http://svn.automattic.com/wordpress/trunk@13829 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-26 19:23:39 +00:00
nacin
a7feaed0e6 Change @since 3.0 to @since 3.0.0.
git-svn-id: http://svn.automattic.com/wordpress/trunk@13827 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-26 19:13:36 +00:00
nacin
ba6f1cba07 Various bug fixes and improvements to menu management. props ptahdunbar, see #11817.
git-svn-id: http://svn.automattic.com/wordpress/trunk@13802 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-22 19:56:16 +00:00
nacin
236a1f6ed4 Fix typo in inline docs for register_post_type(). fixes #12664 props sillybean.
git-svn-id: http://svn.automattic.com/wordpress/trunk@13793 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-22 03:11:15 +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
dd32
3fdd2bbdff Allow for a custom Endpoint Mask to be passed to add_endpoint(). Allows for endpoints to be targeted to specific rewrite rules. Allow custom post_types to specify their Endpoint mask. Allows for post_type's rewrite rules to inherit Post endpoints, or alternatively, allows for add_endpoint() to target specific post_types. Fixes #12605
git-svn-id: http://svn.automattic.com/wordpress/trunk@13773 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-20 02:05:32 +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
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
nacin
a237b80e0b Prevent page(\d+) slugs, and force a suffix. props miqrogroove. fixes #11917. see #8948
git-svn-id: http://svn.automattic.com/wordpress/trunk@13717 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-16 18:36:26 +00:00
ryan
81d6e1e8b3 Allow enabling/disabling title and editor per post type. Introdoce remove_post_type_support(). Add enable/disable for author override. Props scribu. fixes #12590
git-svn-id: http://svn.automattic.com/wordpress/trunk@13710 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-15 21:16:41 +00:00
ryan
63302cae08 Add custom hierarchical post type support to get_pages(). Props ptahdunbar. see #12600
git-svn-id: http://svn.automattic.com/wordpress/trunk@13695 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-13 20:01:02 +00:00
ryan
2d2cb240df Cache get_lastpostmodified() results. see #12575
git-svn-id: http://svn.automattic.com/wordpress/trunk@13653 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-10 21:32:03 +00:00
ryan
086ad7d933 Improve user listing performance. Props miqrogroove. see #11914
git-svn-id: http://svn.automattic.com/wordpress/trunk@13576 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-03 19:08:30 +00:00
nacin
bf207bc6e6 Reject numeric page slugs as they don't work, and force a suffix. Props miqrogroove see #11917
git-svn-id: http://svn.automattic.com/wordpress/trunk@13424 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-26 04:53:30 +00:00
nacin
8bcc5969dc Spelling and grammar fun. Fixes #11875 props cnorris23
git-svn-id: http://svn.automattic.com/wordpress/trunk@13382 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-24 20:13:23 +00:00
markjaquith
09e8d27130 Whitespace cleanup
git-svn-id: http://svn.automattic.com/wordpress/trunk@13316 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-22 23:12:48 +00:00
ryan
1f169578f9 Don't require a default category for attachment types other than 'post'. Props jfarthing84. see #9674
git-svn-id: http://svn.automattic.com/wordpress/trunk@13291 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-22 17:19:54 +00:00
dd32
0ec732b34a Introduce assign_cap for Taxonomies, Defaults to 'edit_posts'. Allows for Authors/Contributors to tag/categorise their posts. See #12035
git-svn-id: http://svn.automattic.com/wordpress/trunk@13289 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-22 08:36:32 +00:00
ryan
41bea20d51 Use nav_menu as the taxonomy name and nav_menu_item as the post type. Set object_id in postmeta. see #11817
git-svn-id: http://svn.automattic.com/wordpress/trunk@13284 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-21 18:24:41 +00:00
ryan
470eb8e6ce Remove custom post states. Register taxonomy against menu_item post type. see #11817
git-svn-id: http://svn.automattic.com/wordpress/trunk@13260 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-20 22:35:39 +00:00
wpmuguru
4d203a02c6 introduce custom menus, props jeffikus, See #11817
git-svn-id: http://svn.automattic.com/wordpress/trunk@13257 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-20 21:57:43 +00:00
dd32
679250491d Variable Cleanup, Unused variables, Typo'd variables, unused code blocks. Fixes #12299
git-svn-id: http://svn.automattic.com/wordpress/trunk@13242 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-20 02:01:46 +00:00
dd32
80d9329e5e Remove unused references to global $wpdb
git-svn-id: http://svn.automattic.com/wordpress/trunk@13240 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-20 00:50:29 +00:00
dd32
35cdac687c More Taxonomy cap checks. See #12035
git-svn-id: http://svn.automattic.com/wordpress/trunk@13217 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-19 10:26:44 +00:00
nacin
84da5911aa Assume WP_DEBUG is defined in wpdb. Remove unnecessary constant() calls. Ensure DB_COLLATE defined as empty string doesn't override default Multisite collation. fixes #12041, see #11644
git-svn-id: http://svn.automattic.com/wordpress/trunk@13209 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-19 01:03:58 +00:00
ryan
8e10d3dce0 Don't use array_fill_keys() as it is PHP5 only. see #9674
git-svn-id: http://svn.automattic.com/wordpress/trunk@13199 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-18 20:03:04 +00:00
ryan
71b350a317 Don't include internal post types in the total. see #9674
git-svn-id: http://svn.automattic.com/wordpress/trunk@13198 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-18 20:01:10 +00:00
azaozz
e41f7c83ce Clean attachment cache when reattaching, fixes #11647
git-svn-id: http://svn.automattic.com/wordpress/trunk@13192 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-18 07:43:35 +00:00
ryan
6baf424bf5 Don't require a default category for post types other than 'post'. see #9674
git-svn-id: http://svn.automattic.com/wordpress/trunk@13184 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-17 20:33:29 +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
dd32
8136de990c Introduce 'singular_label' for Post Types. Props scribu. See #12214
git-svn-id: http://svn.automattic.com/wordpress/trunk@13101 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-13 08:56:38 +00:00
nacin
52f2783331 Use correct var name. Props firebird75. Whitespace cleanup in wp_unique_post_slug(). Fixes #12078.
git-svn-id: http://svn.automattic.com/wordpress/trunk@13075 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-13 02:42:17 +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
98c0c1065b Remove leading slash so that it doesn't get doubled when front is added. see #9674
git-svn-id: http://svn.automattic.com/wordpress/trunk@13050 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-10 21:57:25 +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
ec07eb3768 Add description field for post types. Props ptahdunbar. see #9674
git-svn-id: http://svn.automattic.com/wordpress/trunk@13044 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-10 16:52:02 +00:00
westi
41ca2c5621 Ensure we don't mangle the array of post ancestors when sanitising a post for editing. Fixes #12168.
git-svn-id: http://svn.automattic.com/wordpress/trunk@13016 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-07 21:49:00 +00:00
ryan
d0f8826c0b Add more visibility args to post status registration. see #9674
git-svn-id: http://svn.automattic.com/wordpress/trunk@12994 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-06 17:46:00 +00:00
ryan
9de60f3644 Add a separate show_ui flag for post types. see #9674
git-svn-id: http://svn.automattic.com/wordpress/trunk@12993 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-06 17:27:30 +00:00
ryan
ec8ba1ccd2 Register the auto-draft post status. see #11889
git-svn-id: http://svn.automattic.com/wordpress/trunk@12992 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-06 17:09:34 +00:00
westi
9ecd5ff925 Add defaults for 'post_content' and 'post_title' in wp_insert_post(). See #11889.
git-svn-id: http://svn.automattic.com/wordpress/trunk@12990 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-06 14:49:54 +00:00
markjaquith
0f924eee99 Create post_status=auto-draft when creating a new post item. status changes to draft on first auto-save. now we always have a real post ID to work with. see #11889. fixes #11145. fixes #11990
git-svn-id: http://svn.automattic.com/wordpress/trunk@12987 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-06 10:07:57 +00:00
ryan
9f8149616d ms-functions pruning and cleanup. Props nacin. see #11644
git-svn-id: http://svn.automattic.com/wordpress/trunk@12948 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-04 18:57:32 +00:00
ryan
679a7b5b88 Add taxonomies arg to register_post_type() for registering built-in taxonomies for the post type. Props technosailor. see #9674
git-svn-id: http://svn.automattic.com/wordpress/trunk@12938 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-03 19:50:37 +00:00
ryan
d45311c9fb Allow registering a meta box callback for setting up meta boxes when creating the edit form for a custom post type. see #9674
git-svn-id: http://svn.automattic.com/wordpress/trunk@12937 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-03 18:54:42 +00:00
ryan
5922f7e2c4 Allow customizing capabilities for custom post types. Always check caps against those in the post type object instead of contructing them manually. see #9674
git-svn-id: http://svn.automattic.com/wordpress/trunk@12927 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-02 17:37:03 +00:00
ryan
ed24c3dd40 Permalinks for custom post types. Props prettyboymp. see #9674
git-svn-id: http://svn.automattic.com/wordpress/trunk@12923 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-01 23:12:26 +00:00