Make WordPress Core

Ticket #24153: 24153.2.patch

File 24153.2.patch, 504 bytes (added by chriscct7, 10 years ago)

current_user_can( $ptype->cap->edit_others_posts ) && current_user_can( $ptype->cap->publish_posts ) implemented

  • wp-admin/includes/post.php

     
    383383
    384384        wp_set_post_lock( $post_ID );
    385385
    386         if ( current_user_can( $ptype->cap->edit_others_posts ) ) {
     386        if ( current_user_can( $ptype->cap->edit_others_posts ) && current_user_can( $ptype->cap->publish_posts ) ) {
    387387                if ( ! empty( $post_data['sticky'] ) )
    388388                        stick_post( $post_ID );
    389389                else