WordPress.org

Make WordPress Core

Ticket #30991: 30991.2.diff

File 30991.2.diff, 1010 bytes (added by Mte90, 4 years ago)

refreshed

  • src/wp-includes/post.php

    diff --git src/wp-includes/post.php src/wp-includes/post.php
    index 52fb11909c..0632b8906a 100644
    function get_post_type_capabilities( $args ) { 
    13451345                // Primitive capabilities used outside of map_meta_cap():
    13461346                'edit_posts'         => 'edit_' . $plural_base,
    13471347                'edit_others_posts'  => 'edit_others_' . $plural_base,
     1348    'delete_posts'       => 'delete_' . $plural_base,
    13481349                'publish_posts'      => 'publish_' . $plural_base,
    13491350                'read_private_posts' => 'read_private_' . $plural_base,
    13501351        );
    function get_post_type_capabilities( $args ) { 
    13531354        if ( $args->map_meta_cap ) {
    13541355                $default_capabilities_for_mapping = array(
    13551356                        'read'                   => 'read',
    1356                         'delete_posts'           => 'delete_' . $plural_base,
    13571357                        'delete_private_posts'   => 'delete_private_' . $plural_base,
    13581358                        'delete_published_posts' => 'delete_published_' . $plural_base,
    13591359                        'delete_others_posts'    => 'delete_others_' . $plural_base,