Make Password protected and private mutually exclusive when using Quick Edit.

git-svn-id: http://svn.automattic.com/wordpress/trunk@10088 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith
2008-12-06 11:10:24 +00:00
parent d9778f61f3
commit fc5e8dfe58
6 changed files with 29 additions and 13 deletions

View File

@@ -146,12 +146,13 @@ switch ( $post->post_status ) {
<div class="misc-pub-section " id="visibility">
<?php _e('Visibility:'); ?> <b><span id="post-visibility-display"><?php
if ( !empty( $post->post_password ) ) {
$visibility = 'password';
$visibility_trans = __('Password protected');
} elseif ( 'private' == $post->post_status ) {
if ( 'private' == $post->post_status ) {
$post->post_password = '';
$visibility = 'private';
$visibility_trans = __('Private');
} elseif ( !empty( $post->post_password ) ) {
$visibility = 'password';
$visibility_trans = __('Password protected');
} elseif ( is_sticky( $post->ID ) ) {
$visibility = 'public';
$visibility_trans = __('Public, Sticky');