Skip to content
This repository
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 50 lines (44 sloc) 1.259 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
<?php

require_once('wordpress-https.php');

if ( !defined('WP_UNINSTALL_PLUGIN') ) {
die();
}

$options = array(
'wordpress-https_external_urls',
'wordpress-https_secure_external_urls',
'wordpress-https_unsecure_external_urls',
'wordpress-https_ssl_host',
'wordpress-https_ssl_host_diff',
'wordpress-https_ssl_port',
'wordpress-https_exclusive_https',
'wordpress-https_frontpage',
'wordpress-https_ssl_login',
'wordpress-https_ssl_admin',
'wordpress-https_ssl_proxy',
'wordpress-https_ssl_host_subdomain',
'wordpress-https_version',
'wordpress-https_debug',
'wordpress-https_admin_menu',
'wordpress-https_secure_filter',
'wordpress-https_ssl_host_mapping',
'wordpress-https_path_cache',
'wordpress-https_blog_cache',
);

global $wpdb;
if ( is_multisite() && is_network_admin() ) {
$blogs = $wpdb->get_col($wpdb->prepare("SELECT blog_id FROM " . $wpdb->blogs, NULL));
} else {
$blogs = array($wpdb->blogid);
}

// Delete WordPress HTTPS options
foreach ( $blogs as $blog_id ) {
foreach( $options as $option ) {
if ( is_multisite() ) {
delete_blog_option($blog_id, $option);
} else {
delete_option($option);
}
}
}

// Delete force_ssl custom_field from posts and pages
delete_metadata('post', null, 'force_ssl', null, true);
Something went wrong with that request. Please try again.