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:
parent
ea4a66713f
commit
682b6a20b2
|
@ -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 )
|
||||
|
|
Loading…
Reference in New Issue