Cleaned up unused options.

git-svn-id: https://develop.svn.wordpress.org/trunk@1148 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Mullenweg
2004-04-24 21:21:19 +00:00
parent 0cdb9b30fd
commit 17fe19e626
9 changed files with 40 additions and 55 deletions
+10
View File
@@ -357,6 +357,16 @@ function add_option($name, $value='') {
return;
}
function delete_option($name) {
global $wpdb, $tableoptions, $tableoptiongroup_options;
// Get the ID, if no ID then return
$option_id = $wpdb->get_var("SELECT option_id FROM $tableoptions WHERE option_name = '$name'");
if (!$option_id) return false;
$wpdb->query("DELETE FROM $tableoptiongroup_options WHERE option_id = '$option_id'");
$wpdb->query("DELETE FROM $tableoptions WHERE option_name = '$name'");
return true;
}
function get_postdata($postid) {
global $post, $tableposts, $wpdb;