Changeset 8946
- Timestamp:
- 09/21/2008 09:10:14 PM (17 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 3 edited
-
edit-form-advanced.php (modified) (1 diff)
-
edit-page-form.php (modified) (1 diff)
-
includes/template.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-form-advanced.php
r8944 r8946 370 370 </p> 371 371 <h4><?php _e( 'Post Password' ); ?></h4> 372 <p><label class="hidden" for="post_password"><?php _e('Password Protect This Post') ?></label><input name="post_password" type="text" size="25" id="post_password" value="<?php if ( isset( $post->post_password ) ) echo attribute_escape( $post->post_password); ?>" /></p>372 <p><label class="hidden" for="post_password"><?php _e('Password Protect This Post') ?></label><input name="post_password" type="text" size="25" id="post_password" value="<?php the_post_password(); ?>" /></p> 373 373 <p><?php _e('Setting a password will require people who visit your blog to enter the above password to view this post and its comments.'); ?></p> 374 374 <?php -
trunk/wp-admin/edit-page-form.php
r8893 r8946 217 217 <p><label for="post_status_private" class="selectit"><input id="post_status_private" name="post_status" type="checkbox" value="private" <?php checked($post->post_status, 'private'); ?> tabindex='4' /> <?php _e('Keep this page private') ?></label></p> 218 218 <h4><?php _e( 'Page Password' ); ?></h4> 219 <p><label class="hidden" for="post_password"><?php _e('Password Protect This Page') ?></label><input name="post_password" type="text" size="25" id="post_password" value="<?php echo ( isset( $post->post_password ) ? attribute_escape( $post->post_password ) : ''); ?>" /></p>219 <p><label class="hidden" for="post_password"><?php _e('Password Protect This Page') ?></label><input name="post_password" type="text" size="25" id="post_password" value="<?php the_post_password(); ?>" /></p> 220 220 <p><?php _e('Setting a password will require people who visit your blog to enter the above password to view this page and its comments.'); ?></p> 221 221 <?php -
trunk/wp-admin/includes/template.php
r8943 r8946 738 738 <div class="title"><?php _e('Password'); ?></div> 739 739 <div class="in"> 740 <input type="text" name="post_password" value="<?php echo $post->post_password?>" />740 <input type="text" name="post_password" value="<?php the_post_password(); ?>" /> 741 741 <label title="<?php _e('Privacy'); ?>"> 742 742 <input type="checkbox" name="keep_private" value="private" <?php checked($post->post_status, 'private'); ?> /> <?php echo $is_page ? __('Keep this page private') : __('Keep this post private'); ?></label> … … 2387 2387 } 2388 2388 2389 /** 2390 * Display the post password. 2391 * 2392 * The password is passed through {@link attribute_escape()} 2393 * to ensure that it is safe for placing in an html attribute. 2394 * 2395 * @uses attribute_escape 2396 * @since 2.7.0 2397 */ 2398 function the_post_password() { 2399 global $post; 2400 if ( isset( $post->post_password ) ) echo attribute_escape( $post->post_password ); 2401 } 2389 2402 ?>
Note: See TracChangeset
for help on using the changeset viewer.