Make WordPress Core

Changeset 17724


Ignore:
Timestamp:
04/27/2011 11:27:08 AM (14 years ago)
Author:
nacin
Message:

Only show the sticky posts checkbox when edit_others_posts. Doesn't work without it. props solarissmoke, linuxologos, fixes #16947.

File:
1 edited

Legend:

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

    r17322 r17724  
    139139
    140140<input type="radio" name="visibility" id="visibility-radio-public" value="public" <?php checked( $visibility, 'public' ); ?> /> <label for="visibility-radio-public" class="selectit"><?php _e('Public'); ?></label><br />
    141 <?php if ($post_type == 'post'): ?>
    142 <span id="sticky-span"><input id="sticky" name="sticky" type="checkbox" value="sticky" <?php checked(is_sticky($post->ID)); ?> tabindex="4" /> <label for="sticky" class="selectit"><?php _e('Stick this post to the front page') ?></label><br /></span>
     141<?php if ( $post_type == 'post' && current_user_can( 'edit_others_posts' ) ) : ?>
     142<span id="sticky-span"><input id="sticky" name="sticky" type="checkbox" value="sticky" <?php checked( is_sticky( $post->ID ) ); ?> tabindex="4" /> <label for="sticky" class="selectit"><?php _e( 'Stick this post to the front page' ); ?></label><br /></span>
    143143<?php endif; ?>
    144144<input type="radio" name="visibility" id="visibility-radio-password" value="password" <?php checked( $visibility, 'password' ); ?> /> <label for="visibility-radio-password" class="selectit"><?php _e('Password protected'); ?></label><br />
Note: See TracChangeset for help on using the changeset viewer.