Changeset 8577

Show
Ignore:
Timestamp:
08/06/08 21:31:40 (4 months ago)
Author:
markjaquith
Message:

Use the edit_others_posts capability for controlling sticky checkbox display and usage. see #7457

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-admin/edit-form-advanced.php

    r8576 r8577  
    119119<?php if ( current_user_can( 'publish_posts' ) ) : ?> 
    120120<p id="private-checkbox"><label for="post_status_private" class="selectit"><input id="post_status_private" name="post_status" type="checkbox" value="private" <?php checked($post->post_status, 'private'); ?> tabindex="4" /> <?php _e('Keep this post private') ?></label></p> 
    121 <p id="sticky-checkbox"><label for="sticky" class="selectit"><input id="sticky" name="sticky" type="checkbox" value="sticky" <?php checked(is_sticky($post->ID), true); ?> tabindex="4" /> <?php _e('Stick this post to the front page') ?></label></p> 
     121    <?php if ( current_user_can( 'edit_others_posts' ) ) : ?> 
     122        <p id="sticky-checkbox"><label for="sticky" class="selectit"><input id="sticky" name="sticky" type="checkbox" value="sticky" <?php checked(is_sticky($post->ID), true); ?> tabindex="4" /> <?php _e('Stick this post to the front page') ?></label></p> 
     123    <?php endif; ?> 
    122124<?php endif; ?> 
    123125<?php 
  • trunk/wp-admin/includes/post.php

    r8546 r8577  
    162162    wp_set_post_lock( $post_ID, $GLOBALS['current_user']->ID ); 
    163163 
    164     if ( !empty($_POST['sticky']) ) 
    165         stick_post($post_ID); 
    166     else 
    167         unstick_post($post_ID); 
     164    if ( current_user_can( 'edit_others_posts' ) ) { 
     165        if ( !empty($_POST['sticky']) ) 
     166            stick_post($post_ID); 
     167        else 
     168            unstick_post($post_ID); 
     169    } 
    168170 
    169171    return $post_ID;