Cripple capability_type. Produced inconsistent, janky meta cap mapping; now only acts as a capability base. see #14122.

git-svn-id: http://svn.automattic.com/wordpress/trunk@16273 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin
2010-11-10 14:50:14 +00:00
parent f269b75d7b
commit 795ab6d0f3
2 changed files with 10 additions and 13 deletions

View File

@@ -842,7 +842,7 @@ function get_post_types( $args = array(), $output = 'names', $operator = 'and' )
* show_ui must be true.
* - menu_position - The position in the menu order the post type should appear. Defaults to the bottom.
* - menu_icon - The url to the icon to be used for this menu. Defaults to use the posts icon.
* - capability_type - The post type to use for checking read, edit, and delete capabilities. Defaults to 'post'.
* - capability_type - The string to use to build the read, edit, and delete capabilities. Defaults to 'post'.
* May be passed as an array to allow for alternative plurals when using this argument as a base to construct the
* capabilities, e.g. array('story', 'stories').
* - capabilities - Array of capabilities for this post type. By default the capability_type is used
@@ -917,9 +917,6 @@ function register_post_type($post_type, $args = array()) {
if ( null === $args->exclude_from_search )
$args->exclude_from_search = !$args->public;
if ( empty($args->capability_type) )
$args->capability_type = 'post';
$args->cap = get_post_type_capabilities( $args );
unset($args->capabilities);