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

git-svn-id: http://svn.automattic.com/wordpress/trunk@16004 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin
2010-10-27 08:48:55 +00:00
parent 51b4b138af
commit a34d2bbe94
2 changed files with 7 additions and 6 deletions
+5 -5
View File
@@ -205,11 +205,11 @@ function edit_post( $post_data = null ) {
wp_set_post_lock( $post_ID, $GLOBALS['current_user']->ID );
if ( current_user_can( 'edit_others_posts' ) ) {
if ( !empty($post_data['sticky']) )
stick_post($post_ID);
if ( current_user_can( $ptype->cap->edit_others_posts ) ) {
if ( ! empty( $post_data['sticky'] ) )
stick_post( $post_ID );
else
unstick_post($post_ID);
unstick_post( $post_ID );
}
return $post_ID;
@@ -336,7 +336,7 @@ function bulk_edit_posts( $post_data = null ) {
$post_data['ID'] = $post_ID;
$updated[] = wp_update_post( $post_data );
if ( isset( $post_data['sticky'] ) && current_user_can( 'edit_others_posts' ) ) {
if ( isset( $post_data['sticky'] ) && current_user_can( $ptype->cap->edit_others_posts ) ) {
if ( 'sticky' == $post_data['sticky'] )
stick_post( $post_ID );
else