WordPress.org

Make WordPress Core

Ticket #19703: get_the_password_form.patch

File get_the_password_form.patch, 1.3 KB (added by cais, 6 years ago)
  • wp-includes/post-template.php

     
    12151215 */
    12161216function get_the_password_form() {
    12171217        global $post;
    1218         $label = 'pwbox-'.(empty($post->ID) ? rand() : $post->ID);
    1219         $output = '<form action="' . get_option('siteurl') . '/wp-pass.php" method="post">
    1220         <p>' . __("This post is password protected. To view it please enter your password below:") . '</p>
    1221         <p><label for="' . $label . '">' . __("Password:") . ' <input name="post_password" id="' . $label . '" type="password" size="20" /></label> <input type="submit" name="Submit" value="' . esc_attr__("Submit") . '" /></p>
     1218        $label = 'pwbox-' . ( empty( $post->ID ) ? rand() : $post->ID );
     1219        $output = '<form action="' . get_site_url() . '/wp-pass.php" method="post">
     1220        <p>' . __( "This post is password protected. To view it please enter your password below:" ) . '</p>
     1221        <p><label for="' . $label . '">' . __( "Password:" ) . ' <input name="post_password" id="' . $label . '" type="password" size="20" /></label> <input type="submit" name="Submit" value="' . esc_attr__( "Submit" ) . '" /></p>
    12221222        </form>
    12231223        ';
    1224         return apply_filters('the_password_form', $output);
     1224        return apply_filters( 'the_password_form', $output );
    12251225}
    12261226
    12271227/**