mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-03 04:04:35 +00:00
Use the edit_others_posts capability for controlling sticky checkbox display and usage. see #7457
git-svn-id: https://develop.svn.wordpress.org/trunk@8577 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -161,10 +161,12 @@ function edit_post() {
|
||||
|
||||
wp_set_post_lock( $post_ID, $GLOBALS['current_user']->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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user