Make WordPress Core


Ignore:
Timestamp:
06/10/2004 08:42:25 AM (22 years ago)
Author:
saxmatt
Message:

Changes to options system and query improvements.

File:
1 edited

Legend:

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

    r1370 r1401  
    842842        $wpdb->query("INSERT INTO $wpdb->options (option_name, option_type, option_value, option_description, option_admin_level) VALUES('default_email_category', 1, '1', 'by default posts by email will have this category', 8)");
    843843    }
     844
     845    if(!$wpdb->get_var("SELECT option_id FROM $wpdb->options WHERE option_name = 'recently_edited'")) {
     846        $wpdb->query("INSERT INTO $wpdb->options (option_name, option_type, option_value, option_admin_level) VALUES ('recently_edited', 3, '', 8)");
     847    }
     848
     849    maybe_add_column($wpdb->options, 'autoload', "ALTER TABLE `$wpdb->options` ADD `autoload` ENUM( 'yes', 'no' ) NOT NULL ;");
     850
     851    // Set up a few options not to load by default
     852    $fatoptions = array( 'moderation_keys', 'recently_edited' );
     853    foreach ($fatoptions as $fatoption) :
     854        $wpdb->query("UPDATE $wpdb->options SET `autoload` = 'no' WHERE option_name = '$fatoption'");
     855    endforeach;
    844856}
    845857
Note: See TracChangeset for help on using the changeset viewer.