forked from Michel2/wp-jquery-datatable
Changed the unregistering of settings during uninstallation to an array
This commit is contained in:
1 parent
3841f4e246
commit
36b4e606be
2 files changed
+16
-9
No files matched your search
+15
-9
@@ -391,13 +391,19 @@ function wp_jdt_shortcode($atts, $content = "")
|
||||
register_uninstall_hook(__FILE__, 'wp_jdt_uninstall'); // uninstall plug-in
|
||||
function wp_jdt_uninstall()
|
||||
{
|
||||
delete_option('wp_jdt_info');
|
||||
delete_option('wp_jdt_paging');
|
||||
delete_option('wp_jdt_page_length');
|
||||
delete_option('wp_jdt_paging_type');
|
||||
delete_option('wp_jdt_b_length_change');
|
||||
delete_option('wp_jdt_ordering');
|
||||
delete_option('wp_jdt_order_row');
|
||||
delete_option('wp_jdt_order_row_sort');
|
||||
delete_option('wp_jdt_searching');
|
||||
$settings = array(
|
||||
'wp_jdt_info',
|
||||
'wp_jdt_paging',
|
||||
'wp_jdt_page_length',
|
||||
'wp_jdt_paging_type',
|
||||
'wp_jdt_b_length_change',
|
||||
'wp_jdt_ordering',
|
||||
'wp_jdt_order_row',
|
||||
'wp_jdt_order_row_sort',
|
||||
'wp_jdt_searching'
|
||||
);
|
||||
|
||||
foreach ($settings as $setting) {
|
||||
delete_option($setting);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user