Make WordPress Core


Ignore:
Timestamp:
10/27/2010 08:48:55 AM (13 years ago)
Author:
nacin
Message:

Don't check the raw edit_others_posts cap. see #12702.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/post.php

    r16003 r16004  
    206206    wp_set_post_lock( $post_ID, $GLOBALS['current_user']->ID );
    207207
    208     if ( current_user_can( 'edit_others_posts' ) ) {
    209         if ( !empty($post_data['sticky']) )
    210             stick_post($post_ID);
     208    if ( current_user_can( $ptype->cap->edit_others_posts ) ) {
     209        if ( ! empty( $post_data['sticky'] ) )
     210            stick_post( $post_ID );
    211211        else
    212             unstick_post($post_ID);
     212            unstick_post( $post_ID );
    213213    }
    214214
     
    337337        $updated[] = wp_update_post( $post_data );
    338338
    339         if ( isset( $post_data['sticky'] ) && current_user_can( 'edit_others_posts' ) ) {
     339        if ( isset( $post_data['sticky'] ) && current_user_can( $ptype->cap->edit_others_posts ) ) {
    340340            if ( 'sticky' == $post_data['sticky'] )
    341341                stick_post( $post_ID );
Note: See TracChangeset for help on using the changeset viewer.