Index: wp-includes/comment-template.php
===================================================================
--- wp-includes/comment-template.php	(revision 14075)
+++ wp-includes/comment-template.php	(working copy)
@@ -943,51 +943,63 @@
  * @param string $none The string to display when comments have been turned off
  * @return null Returns null on single posts and pages.
  */
-function comments_popup_link( $zero = false, $one = false, $more = false, $css_class = '', $none = false ) {
+function comments_popup_link( $zero = false, $one = false, $more = false, $css_class = '', $none = false, $password = false ) {
 	global $id, $wpcommentspopupfile, $wpcommentsjavascript;
 
-    if ( false === $zero ) $zero = __( 'No Comments' );
-    if ( false === $one ) $one = __( '1 Comment' );
-    if ( false === $more ) $more = __( '% Comments' );
-    if ( false === $none ) $none = __( 'Comments Off' );
-
+	if ( false === $zero ) $zero = __( 'No Comments' );
+	if ( false === $one ) $one = __( '1 Comment' );
+	if ( false === $more ) $more = __( '% Comments' );
+	if ( false === $none ) $none = __( 'Comments Off' );
+	if ( false === $password ) $password = __( 'Enter your password to view comments.' );
+    
 	$number = get_comments_number( $id );
 
+	if ( !empty($css_class) || post_password_required() ) {
+		$class = ' class="';
+		
+		if ( !empty($css_class) )
+			$class .= esc_attr($css_class);
+		
+		if ( post_password_required() )
+			$class .= ' enter-password';
+			
+		$class .= '"';	
+	}		
+
 	if ( 0 == $number && !comments_open() && !pings_open() ) {
-		echo '<span' . ((!empty($css_class)) ? ' class="' . esc_attr( $css_class ) . '"' : '') . '>' . $none . '</span>';
+		echo '<span' . $class . '>' . $none . '</span>';
 		return;
 	}
 
 	if ( post_password_required() ) {
-		echo __('Enter your password to view comments.');
+		echo '<span' . $class . '>' . $password . '</span>';
 		return;
 	}
 
 	echo '<a href="';
-	if ( $wpcommentsjavascript ) {
-		if ( empty( $wpcommentspopupfile ) )
-			$home = home_url();
-		else
-			$home = get_option('siteurl');
-		echo $home . '/' . $wpcommentspopupfile . '?comments_popup=' . $id;
-		echo '" onclick="wpopen(this.href); return false"';
-	} else { // if comments_popup_script() is not in the template, display simple comment link
-		if ( 0 == $number )
-			echo get_permalink() . '#respond';
-		else
-			comments_link();
-		echo '"';
-	}
+		if ( $wpcommentsjavascript ) {
+			if ( empty( $wpcommentspopupfile ) )
+				$home = home_url();
+			else
+				$home = get_option('siteurl');
+			echo $home . '/' . $wpcommentspopupfile . '?comments_popup=' . $id;
+			echo '" onclick="wpopen(this.href); return false"';
+		} else { // if comments_popup_script() is not in the template, display simple comment link
+			if ( 0 == $number )
+				echo get_permalink() . '#respond';
+			else
+				comments_link();
+			echo '"';
+		}
 
-	if ( !empty( $css_class ) ) {
-		echo ' class="'.$css_class.'" ';
-	}
-	$title = the_title_attribute( array('echo' => 0 ) );
+		echo $class;
+		
+		$title = the_title_attribute( array('echo' => 0 ) );
 
-	echo apply_filters( 'comments_popup_link_attributes', '' );
+		echo apply_filters( 'comments_popup_link_attributes', '' );
 
-	echo ' title="' . esc_attr( sprintf( __('Comment on %s'), $title ) ) . '">';
-	comments_number( $zero, $one, $more );
+		echo ' title="' . esc_attr( sprintf( __('Comment on %s'), $title ) ) . '">';
+		comments_number( $zero, $one, $more );
 	echo '</a>';
 }
 
