Make WordPress Core

Changeset 11958


Ignore:
Timestamp:
09/22/2009 06:00:46 AM (15 years ago)
Author:
markjaquith
Message:

Eliminate the redundant and confusing comment threading depth of 1. Threading starts at 2 now. fixes #10829

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/upgrade.php

    r11884 r11958  
    347347        upgrade_280();
    348348
     349    if ( $wp_current_db_version < 11958 )
     350        upgrade_290();
     351
    349352    maybe_disable_automattic_widgets();
    350353
     
    982985    if ( $wp_current_db_version < 10360 )
    983986        populate_roles_280();
     987}
     988
     989/**
     990 * Execute changes made in WordPress 2.9.
     991 *
     992 * @since 2.9.0
     993 */
     994function upgrade_290() {
     995    global $wp_current_db_version;
     996
     997    if ( $wp_current_db_version < 11958 ) {
     998        // Previously, setting depth to 1 would redundantly disable threading, but now 2 is the minimum depth to avoid confusion
     999        if ( get_option( 'thread_comments_depth' ) == '1' ) {
     1000            update_option( 'thread_comments_depth', 2 );
     1001            update_option( 'thread_comments', 0 );
     1002        }
     1003    }
    9841004}
    9851005
  • trunk/wp-admin/options-discussion.php

    r11761 r11958  
    6767
    6868$thread_comments_depth = '</label><select name="thread_comments_depth" id="thread_comments_depth">';
    69 for ( $i = 1; $i <= $maxdeep; $i++ ) {
     69for ( $i = 2; $i <= $maxdeep; $i++ ) {
    7070    $thread_comments_depth .= "<option value='" . esc_attr($i) . "'";
    7171    if ( get_option('thread_comments_depth') == $i ) $thread_comments_depth .= " selected='selected'";
  • trunk/wp-includes/version.php

    r11943 r11958  
    1616 * @global int $wp_db_version
    1717 */
    18 $wp_db_version = 11943;
     18$wp_db_version = 11958;
    1919
    2020/**
Note: See TracChangeset for help on using the changeset viewer.