From 682b6a20b24726778019ab1c8c5b9019245a6c96 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Mon, 15 Nov 2010 17:11:34 +0000 Subject: [PATCH] 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 --- wp-includes/post.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/post.php b/wp-includes/post.php index bbdddd51c0..02c661d7e9 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -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 )