Skip to content

Commit

Permalink
Add labels for all inputs in options-discussion. Props SergeyBiryukov…
Browse files Browse the repository at this point in the history
…, lessbloat, Latz. fixes #21373

git-svn-id: http://core.svn.wordpress.org/trunk@21746 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
Ryan Boren committed Sep 4, 2012
1 parent 37f9c1c commit fbfa90a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions wp-admin/options-discussion.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,16 @@

<label for="close_comments_for_old_posts">
<input name="close_comments_for_old_posts" type="checkbox" id="close_comments_for_old_posts" value="1" <?php checked('1', get_option('close_comments_for_old_posts')); ?> />
<?php printf( __('Automatically close comments on articles older than %s days'), '</label><input name="close_comments_days_old" type="number" min="0" step="1" id="close_comments_days_old" value="' . esc_attr(get_option('close_comments_days_old')) . '" class="small-text" />'); ?>
<?php printf( __('Automatically close comments on articles older than %s days'), '</label><label for="close_comments_days_old"><input name="close_comments_days_old" type="number" min="0" step="1" id="close_comments_days_old" value="' . esc_attr(get_option('close_comments_days_old')) . '" class="small-text" />'); ?>
</label>
<br />
<label for="thread_comments">
<input name="thread_comments" type="checkbox" id="thread_comments" value="1" <?php checked('1', get_option('thread_comments')); ?> />
<?php

$maxdeep = (int) apply_filters( 'thread_comments_depth_max', 10 );

$thread_comments_depth = '</label><select name="thread_comments_depth" id="thread_comments_depth">';
$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 ) $thread_comments_depth .= " selected='selected'";
Expand All @@ -89,7 +90,8 @@

printf( __('Enable threaded (nested) comments %s levels deep'), $thread_comments_depth );

?><br />
?></label>
<br />
<label for="page_comments">
<input name="page_comments" type="checkbox" id="page_comments" value="1" <?php checked('1', get_option('page_comments')); ?> />
<?php
Expand Down

0 comments on commit fbfa90a

Please sign in to comment.