capability_type = page and no custom caps should also kick on map_meta_cap. see #14122.

git-svn-id: http://svn.automattic.com/wordpress/trunk@16387 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2010-11-15 17:11:34 +00:00
parent 7ba2dbb820
commit c5aa88412a
1 changed files with 1 additions and 1 deletions

View File

@ -917,7 +917,7 @@ function register_post_type($post_type, $args = array()) {
$args->exclude_from_search = !$args->public;
// Back compat with quirky handling in version 3.0. #14122
if ( 'post' == $args->capability_type && null === $args->map_meta_cap && empty( $args->capabilities ) )
if ( empty( $args->capabilities ) && null === $args->map_meta_cap && in_array( $args->capability_type, array( 'post', 'page' ) ) )
$args->map_meta_cap = true;
if ( null === $args->map_meta_cap )