Fix private post toggle

git-svn-id: https://develop.svn.wordpress.org/trunk@7120 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-03-01 06:26:13 +00:00
parent abe2afd508
commit 9a7997c931
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; ?>