Make WordPress Core

Ticket #37917: 37917.patch

File 37917.patch, 2.6 KB (added by ryan.kanner, 7 years ago)
  • src/wp-admin/includes/class-wp-posts-list-table.php

     
    14371437                                        <span class="title"><?php _e( 'Password' ); ?></span>
    14381438                                        <span class="input-text-wrap"><input type="text" name="post_password" class="inline-edit-password-input" value="" /></span>
    14391439                                </label>
    1440 
    1441                                 <em class="alignleft inline-edit-or">
    1442                                         <?php
    1443                                         /* translators: Between password field and private checkbox on post quick edit interface */
    1444                                         _e( '&ndash;OR&ndash;' );
    1445                                         ?>
    1446                                 </em>
    1447                                 <label class="alignleft inline-edit-private">
    1448                                         <input type="checkbox" name="keep_private" value="private" />
    1449                                         <span class="checkbox-title"><?php _e( 'Private' ); ?></span>
    1450                                 </label>
     1440                                <?php if ( current_user_can( $post_type_object->cap->edit_private_posts ) ): ?>
     1441                                        <em class="alignleft inline-edit-or">
     1442                                                <?php
     1443                                                /* translators: Between password field and private checkbox on post quick edit interface */
     1444                                                _e( '&ndash;OR&ndash;' );
     1445                                                ?>
     1446                                        </em>
     1447                                        <label class="alignleft inline-edit-private">
     1448                                                <input type="checkbox" name="keep_private" value="private" />
     1449                                                <span class="checkbox-title"><?php _e( 'Private' ); ?></span>
     1450                                        </label>
     1451                                <?php endif; ?>
    14511452                        </div>
    14521453
    14531454        <?php endif; ?>
  • src/wp-admin/includes/meta-boxes.php

     
    158158<?php endif; ?>
    159159<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 />
    160160<span id="password-span"><label for="post_password"><?php _e('Password:'); ?></label> <input type="text" name="post_password" id="post_password" value="<?php echo esc_attr($post->post_password); ?>"  maxlength="20" /><br /></span>
     161<?php if ( current_user_can( $post_type_object->cap->edit_private_posts ) ): ?>
    161162<input type="radio" name="visibility" id="visibility-radio-private" value="private" <?php checked( $visibility, 'private' ); ?> /> <label for="visibility-radio-private" class="selectit"><?php _e('Private'); ?></label><br />
     163<?php endif; ?>
    162164
    163165<p>
    164166 <a href="#visibility" class="save-post-visibility hide-if-no-js button"><?php _e('OK'); ?></a>