Ticket #4721: 4721.diff
File 4721.diff, 4.3 KB (added by , 17 years ago) |
---|
-
wp-content/themes/classic/comments-popup.php
34 34 $comments = get_approved_comments($id); 35 35 $commentstatus = get_post($id); 36 36 if (!empty($commentstatus->post_password) && $_COOKIE['wp-postpass_'. COOKIEHASH] != $commentstatus->post_password) { // and it doesn't match the cookie 37 echo(get_the_password_form( ));37 echo(get_the_password_form($post->ID)); 38 38 } else { ?> 39 39 40 40 <?php if ($comments) { ?> -
wp-content/themes/default/comments-popup.php
34 34 $comments = get_approved_comments($id); 35 35 $post = get_post($id); 36 36 if (!empty($post->post_password) && $_COOKIE['wp-postpass_'. COOKIEHASH] != $post->post_password) { // and it doesn't match the cookie 37 echo(get_the_password_form( ));37 echo(get_the_password_form($post->ID)); 38 38 } else { ?> 39 39 40 40 <?php if ($comments) { ?> -
wp-includes/feed-atom-comments.php
51 51 <updated><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_comment_time('Y-m-d H:i:s', true), false); ?></updated> 52 52 <published><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_comment_time('Y-m-d H:i:s', true), false); ?></published> 53 53 <?php if (!empty($comment_post->post_password) && $_COOKIE['wp-postpass'] != $comment_post->post_password) : ?> 54 <content type="html" xml:base="<?php comment_link(); ?>"><![CDATA[<?php echo get_the_password_form( ); ?>]]></content>54 <content type="html" xml:base="<?php comment_link(); ?>"><![CDATA[<?php echo get_the_password_form($comment_post->ID); ?>]]></content> 55 55 <?php else : // post pass ?> 56 56 <content type="html" xml:base="<?php comment_link(); ?>"><![CDATA[<?php comment_text(); ?>]]></content> 57 57 <?php endif; // post pass -
wp-includes/feed-rss2-comments.php
43 43 <guid><?php comment_link() ?></guid> 44 44 <?php if (!empty($comment_post->post_password) && $_COOKIE['wp-postpass'] != $comment_post->post_password) : ?> 45 45 <description><?php _e('Protected Comments: Please enter your password to view comments.'); ?></description> 46 <content:encoded><![CDATA[<?php echo get_the_password_form( ) ?>]]></content:encoded>46 <content:encoded><![CDATA[<?php echo get_the_password_form($comment_post->ID) ?>]]></content:encoded> 47 47 <?php else : // post pass ?> 48 48 <description><?php comment_text_rss() ?></description> 49 49 <content:encoded><![CDATA[<?php comment_text() ?>]]></content:encoded> -
wp-includes/post-template.php
69 69 70 70 if ( !empty($post->post_password) ) { // if there's a password 71 71 if ( stripslashes($_COOKIE['wp-postpass_'.COOKIEHASH]) != $post->post_password ) { // and it doesn't match the cookie 72 $output = get_the_password_form( );72 $output = get_the_password_form($id); 73 73 return $output; 74 74 } 75 75 } … … 463 463 // Misc 464 464 // 465 465 466 function get_the_password_form() { 466 function get_the_password_form($id = 0) { 467 $label = 'pwbox-'.(empty($id) ? rand() : $id); 467 468 $output = '<form action="' . get_option('siteurl') . '/wp-pass.php" method="post"> 468 469 <p>' . __("This post is password protected. To view it please enter your password below:") . '</p> 469 <p><label >' . __("Password:") . ' <input name="post_password" type="password" size="20" /></label> <input type="submit" name="Submit" value="' . __("Submit") . '" /></p>470 <p><label for="'.$label.'">' . __("Password:") . ' <input name="post_password" type="password" size="20" id="'.$label.'" /></label> <input type="submit" name="Submit" value="' . __("Submit") . '" /></p> 470 471 </form> 471 472 '; 472 473 return $output;