-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuninstall.php
More file actions
38 lines (33 loc) · 952 Bytes
/
uninstall.php
File metadata and controls
38 lines (33 loc) · 952 Bytes
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
<?php
/**
* Uninstall Quick Multilingual
*
* @package Quick_Multilingual
*/
// If uninstall not called from WordPress, then exit.
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
exit;
}
// Define the option names to be deleted
$options = array(
'so_qmp_primary_lang',
'so_qmp_secondary_lang',
'so_qmp_primary_hreflang',
'so_qmp_secondary_hreflang',
'so_qmp_language_folder_page',
'so_qmp_number_of_pages'
);
// Delete the individual options
foreach ( $options as $option ) {
delete_option( $option );
}
// Delete the page mapping options
for ( $i = 1; $i <= 4; $i++ ) {
delete_option( 'so_qmp_page_mapping_' . $i );
}
// If you want to remove all options with the 'so_qmp_' prefix, you can use this code instead:
// However, be cautious as it might remove options that you didn't intend to remove if other plugins use a similar prefix.
/*
global $wpdb;
$wpdb->query( "DELETE FROM {$wpdb->options} WHERE option_name LIKE 'so_qmp_%'" );
*/