Only dumb down delete_others_posts if it deserves to exist. fixes a notice. see #14122.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15897 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f5e23028ff
commit
a724633db8
|
@ -1019,7 +1019,8 @@ function get_post_type_capabilities( $args ) {
|
||||||
if ( ! post_type_supports( $args->name, 'author' ) ) {
|
if ( ! post_type_supports( $args->name, 'author' ) ) {
|
||||||
// While these may be checked in core, users/roles shouldn't need to be granted these.
|
// While these may be checked in core, users/roles shouldn't need to be granted these.
|
||||||
$default_capabilities['edit_others_posts'] = $default_capabilities['edit_posts'];
|
$default_capabilities['edit_others_posts'] = $default_capabilities['edit_posts'];
|
||||||
$default_capabilities['delete_others_posts'] = $default_capabilities['delete_posts'];
|
if ( $args->map_meta_cap )
|
||||||
|
$default_capabilities['delete_others_posts'] = $default_capabilities['delete_posts'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$capabilities = array_merge( $default_capabilities, $args->capabilities );
|
$capabilities = array_merge( $default_capabilities, $args->capabilities );
|
||||||
|
|
Loading…
Reference in New Issue