mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
Cleaned up unused options.
git-svn-id: https://develop.svn.wordpress.org/trunk@1148 602fd350-edb4-49c9-b593-d223f7449a82
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