Cleaned up unused options.
git-svn-id: http://svn.automattic.com/wordpress/trunk@1148 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user