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
This commit is contained in:
Andrew Nacin 2010-11-15 17:11:34 +00:00
parent ea4a66713f
commit 682b6a20b2
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 )