-
Notifications
You must be signed in to change notification settings - Fork 2
/
uninstall.php
32 lines (27 loc) · 1.22 KB
/
uninstall.php
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
<?php
/**
* Uninstallation of Open WordPress SEO plugin
*/
require_once(__DIR__.'/modules/open-wp-seo-compression.php');
if (!defined('WP_UNINSTALL_PLUGIN')) die();
$posts = get_posts('numberposts=-1&post_type=post&post_status=any');
foreach ($posts as $post) {
delete_post_meta($post->ID, 'open_wp_seo_title');
delete_post_meta($post->ID, 'open_wp_seo_description');
}
delete_option('open_wp_seo_frontpage_title');
delete_option('open_wp_seo_frontpage_description');
delete_option('open_wp_seo_sitemap_enabled');
delete_option('open_wp_seo_noindex_for_tags');
delete_option('open_wp_seo_noindex_for_categories');
delete_option('open_wp_seo_sitemap_include_lastmod');
delete_option('open_wp_seo_sitemap_prioritities');
delete_option('open_wp_seo_sitemap_include_categories');
delete_option('open_wp_seo_sitemap_include_tags');
delete_option('open_wp_seo_google_analytics_code');
delete_option('open_wp_seo_sitemap_create_time');
delete_option('open_wp_seo_sitemap_create_success');
delete_option('open_wp_seo_image_sitemap_create_time');
delete_option('open_wp_seo_image_sitemap_create_success');
$compression = new OpenWordPressSEOCompression();
$compression->remove_gzip_compression_from_htaccess();