Make WordPress Core


Ignore:
Timestamp:
09/05/2007 07:20:53 PM (18 years ago)
Author:
markjaquith
Message:

Deprecate option_can_override, option_type, option_width, option_height, option_description, option_admin_level from options table. Props Nazgul. fixes #4390

File:
1 edited

Legend:

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

    r6026 r6039  
    192192        upgrade_230();
    193193
     194    if ( $wp_current_db_version < 6039 )
     195        upgrade_230_options_table();
    194196
    195197    maybe_disable_automattic_widgets();
     
    677679        $wpdb->query("UPDATE $wpdb->term_taxonomy SET count = '$count' WHERE term_taxonomy_id = '$term'");
    678680    }
     681}
     682
     683function upgrade_230_options_table() {
     684    global $wpdb;
     685    $old_options_fields = array( 'option_can_override', 'option_type', 'option_width', 'option_height', 'option_description', 'option_admin_level' );
     686    $wpdb->hide_errors();
     687    foreach ( $old_options_fields as $old )
     688        $wpdb->query("ALTER TABLE $wpdb->options DROP $old");
     689    $wpdb->show_errors();
    679690}
    680691
Note: See TracChangeset for help on using the changeset viewer.