wp/wp-admin/options-discussion.php
changeset 19 3d72ae0968f4
parent 16 a86126ab1dd4
child 21 48c4eec2b7e6
--- a/wp/wp-admin/options-discussion.php	Wed Sep 21 18:19:35 2022 +0200
+++ b/wp/wp-admin/options-discussion.php	Tue Sep 27 16:37:53 2022 +0200
@@ -12,6 +12,7 @@
 	wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) );
 }
 
+// Used in the HTML title tag.
 $title       = __( 'Discussion Settings' );
 $parent_file = 'options-general.php';
 
@@ -21,7 +22,7 @@
 	array(
 		'id'      => 'overview',
 		'title'   => __( 'Overview' ),
-		'content' => '<p>' . __( 'This screen provides many options for controlling the management and display of comments and links to your posts/pages. So many, in fact, they won&#8217;t all fit here! :) Use the documentation links to get information on what each discussion setting does.' ) . '</p>' .
+		'content' => '<p>' . __( 'This screen provides many options for controlling the management and display of comments and links to your posts/pages. So many, in fact, they will not all fit here! :) Use the documentation links to get information on what each discussion setting does.' ) . '</p>' .
 			'<p>' . __( 'You must click the Save Changes button at the bottom of the screen for new settings to take effect.' ) . '</p>',
 	)
 );
@@ -57,7 +58,7 @@
 <input name="default_comment_status" type="checkbox" id="default_comment_status" value="open" <?php checked( 'open', get_option( 'default_comment_status' ) ); ?> />
 <?php _e( 'Allow people to submit comments on new posts' ); ?></label>
 <br />
-<p class="description"><?php echo '(' . __( 'These settings may be overridden for individual posts.' ) . ')'; ?></p>
+<p class="description"><?php _e( 'Individual posts may override these settings. Changes here will only be applied to new posts.' ); ?></p>
 </fieldset></td>
 </tr>
 <tr>
@@ -108,7 +109,7 @@
 $thread_comments_depth = '</label> <label for="thread_comments_depth"><select name="thread_comments_depth" id="thread_comments_depth">';
 for ( $i = 2; $i <= $maxdeep; $i++ ) {
 	$thread_comments_depth .= "<option value='" . esc_attr( $i ) . "'";
-	if ( get_option( 'thread_comments_depth' ) == $i ) {
+	if ( (int) get_option( 'thread_comments_depth' ) === $i ) {
 		$thread_comments_depth .= " selected='selected'";
 	}
 	$thread_comments_depth .= ">$i</option>";
@@ -217,7 +218,7 @@
 
 <h2 class="title"><?php _e( 'Avatars' ); ?></h2>
 
-<p><?php _e( 'An avatar is an image that follows you from weblog to weblog appearing beside your name when you comment on avatar enabled sites. Here you can enable the display of avatars for people who comment on your site.' ); ?></p>
+<p><?php _e( 'An avatar is an image that can be associated with a user across multiple websites. In this area, you can choose to display avatars of users who interact with the site.' ); ?></p>
 
 <?php
 // The above would be a good place to link to the documentation on the Gravatar functions, for putting it in themes. Anything like that?
@@ -255,7 +256,7 @@
 	'X'  => __( 'X &#8212; Even more mature than above' ),
 );
 foreach ( $ratings as $key => $rating ) :
-	$selected = ( get_option( 'avatar_rating' ) == $key ) ? 'checked="checked"' : '';
+	$selected = ( get_option( 'avatar_rating' ) === $key ) ? 'checked="checked"' : '';
 	echo "\n\t<label><input type='radio' name='avatar_rating' value='" . esc_attr( $key ) . "' $selected/> $rating</label><br />";
 endforeach;
 ?>
@@ -298,7 +299,7 @@
 add_filter( 'pre_option_show_avatars', '__return_true', 100 );
 
 foreach ( $avatar_defaults as $default_key => $default_name ) {
-	$selected     = ( $default == $default_key ) ? 'checked="checked" ' : '';
+	$selected     = ( $default === $default_key ) ? 'checked="checked" ' : '';
 	$avatar_list .= "\n\t<label><input type='radio' name='avatar_default' id='avatar_{$default_key}' value='" . esc_attr( $default_key ) . "' {$selected}/> ";
 	$avatar_list .= get_avatar( $user_email, 32, $default_key, '', array( 'force_default' => true ) );
 	$avatar_list .= ' ' . $default_name . '</label>';