WordPress.org

Make WordPress Core

Changeset 9206


Ignore:
Timestamp:
10/16/08 20:03:18 (6 years ago)
Author:
ryan
Message:

Threaded comments options cleanup. Props Viper007Bond. see #7635

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/options-discussion.php

    r9149 r9206  
    4444<label for="close_comments_for_old_posts"> 
    4545<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')); ?> /> 
    46 <?php _e('Close comments on articles older than') ?></label> <?php printf(__('%s days'), '<input name="close_comments_days_old" type="text" id="close_comments_days_old" value="' . attribute_escape(get_option('close_comments_days_old')) . '" size="3" />') ?> 
     46<?php printf( __('Close comments on articles older than %s days'), '</label><input name="close_comments_days_old" type="text" id="close_comments_days_old" value="' . attribute_escape(get_option('close_comments_days_old')) . '" size="3" />') ?> 
    4747<br /> 
    4848<label for="thread_comments"> 
    4949<input name="thread_comments" type="checkbox" id="thread_comments" value="1" <?php checked('1', get_option('thread_comments')); ?> /> 
    50 <?php _e('Group replies into threads') ?></label> <?php printf(__('%s levels deep'), '<input name="thread_comments_depth" type="text" id="thread_comments_depth" value="' . attribute_escape(get_option('thread_comments_depth')) . '" size="3" />') ?> 
    51 <br /> 
     50<?php  
     51 
     52$maxdeep = (int) apply_filters( 'thread_comments_depth_max', 10 ); 
     53 
     54$thread_comments_depth = '</label><select name="thread_comments_depth" id="thread_comments_depth">'; 
     55for ( $i = 1; $i <= $maxdeep; $i++ ) { 
     56    $thread_comments_depth .= "<option value='$i'"; 
     57    if ( get_option('thread_comments_depth') == $i ) $thread_comments_depth .= " selected='selected'"; 
     58    $thread_comments_depth .= ">$i</option>"; 
     59} 
     60$thread_comments_depth .= '</select>'; 
     61 
     62printf( __('Enable threaded (nested) comments %s levels deep'), $thread_comments_depth ); 
     63 
     64?><br /> 
    5265<label for="page_comments"> 
    5366<input name="page_comments" type="checkbox" id="page_comments" value="1" <?php checked('1', get_option('page_comments')); ?> /> 
    54 <?php _e('Break comments into pages with') ?></label> <?php printf(__('%s comments per page'), '<input name="comments_per_page" type="text" id="comments_per_page" value="' . attribute_escape(get_option('comments_per_page')) . '" size="3" />') ?> 
     67<?php printf( __('Break comments into pages with %s comments per page'), '</label><input name="comments_per_page" type="text" id="comments_per_page" value="' . attribute_escape(get_option('comments_per_page')) . '" size="3" />') ?> 
    5568<br /> 
    5669<small><em><?php echo '(' . __('These settings may be overridden for individual articles.') . ')'; ?></em></small> 
Note: See TracChangeset for help on using the changeset viewer.