Fix private post toggle

git-svn-id: http://svn.automattic.com/wordpress/trunk@7120 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-03-01 06:26:13 +00:00
parent 372ce0ed9b
commit 846991d804
2 changed files with 2 additions and 4 deletions

View File

@ -93,8 +93,7 @@ addLoadEvent(focusit);
<p>
<select name='post_status'>
<?php if ( current_user_can('publish_posts') ) : ?>
<?php $pub_value = ( 'private' == $post->post_status ) ? 'private' : 'publish'; ?>
<option<?php selected( $post->post_status, 'publish' ); selected( $post->post_status, 'private' );?> value='<?php echo $pub_value ?>'><?php _e('Published') ?></option>
<option<?php selected( $post->post_status, 'publish' ); selected( $post->post_status, 'private' );?> value='publish'><?php _e('Published') ?></option>
<?php else: ?>
<option<?php selected( $post->post_status, 'private' ); ?> value='private'><?php _e('Published') ?></option>
<?php endif; ?>

View File

@ -70,8 +70,7 @@ addLoadEvent(focusit);
<p>
<select name='post_status'>
<?php if ( current_user_can('publish_posts') ) : ?>
<?php $pub_value = ( 'private' == $post->post_status ) ? 'private' : 'publish'; ?>
<option<?php selected( $post->post_status, 'publish' ); selected( $post->post_status, 'private' );?> value='<?php echo $pub_value ?>'><?php _e('Published') ?></option>
<option<?php selected( $post->post_status, 'publish' ); selected( $post->post_status, 'private' );?> value='publish'><?php _e('Published') ?></option>
<?php else: ?>
<option<?php selected( $post->post_status, 'private' ); ?> value='private'><?php _e('Published') ?></option>
<?php endif; ?>