Add default_email_category. Make default category and default email category provisionable via options writing. Credit: Kitten.

git-svn-id: https://develop.svn.wordpress.org/trunk@1370 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2004-05-31 15:43:45 +00:00
parent 7e646da0fc
commit 391e53ed84
2 changed files with 27 additions and 5 deletions
+9
View File
@@ -7,6 +7,7 @@ function upgrade_all() {
upgrade_100();
upgrade_101();
upgrade_110();
upgrade_130();
}
// General
@@ -834,4 +835,12 @@ function upgrade_110() {
$wpdb->query("ALTER TABLE `$wpdb->comments` CHANGE `comment_author_url` `comment_author_url` VARCHAR( 200 ) NOT NULL");
}
function upgrade_130() {
global $wpdb;
if(!$wpdb->get_var("SELECT option_id FROM $wpdb->options WHERE option_name = 'default_email_category'")) {
$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)");
}
}
?>