Make WordPress Core


Ignore:
Timestamp:
09/21/2008 09:10:14 PM (18 years ago)
Author:
westi
Message:

post password admin template tag.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/template.php

    r8943 r8946  
    738738                                        <div class="title"><?php _e('Password'); ?></div>
    739739                                        <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(); ?>" />
    741741                                        <label title="<?php _e('Privacy'); ?>">
    742742                                        <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>
    … …  
    23872387}
    23882388
     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 */
     2398function the_post_password() {
     2399        global $post;
     2400        if ( isset( $post->post_password ) ) echo attribute_escape( $post->post_password );
     2401}
    23892402?>
Note: See TracChangeset for help on using the changeset viewer.