From ce1404129ef8205da0de6b0aeb3140feff4e2753 Mon Sep 17 00:00:00 2001 From: markjaquith Date: Wed, 6 Aug 2008 21:31:40 +0000 Subject: [PATCH] Use the edit_others_posts capability for controlling sticky checkbox display and usage. see #7457 git-svn-id: http://svn.automattic.com/wordpress/trunk@8577 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/edit-form-advanced.php | 4 +++- wp-admin/includes/post.php | 10 ++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php index 9cce288feb..35d9611141 100644 --- a/wp-admin/edit-form-advanced.php +++ b/wp-admin/edit-form-advanced.php @@ -118,7 +118,9 @@ if ( current_user_can('publish_posts') OR ( $post->post_status == 'publish' AND

-

+ +

+ ID ); - if ( !empty($_POST['sticky']) ) - stick_post($post_ID); - else - unstick_post($post_ID); + if ( current_user_can( 'edit_others_posts' ) ) { + if ( !empty($_POST['sticky']) ) + stick_post($post_ID); + else + unstick_post($post_ID); + } return $post_ID; }