forked from Michel2/wp-jquery-datatable
Changed the unregistering of settings during uninstallation to an array
This commit is contained in:
@@ -81,6 +81,7 @@ Is this plugin prepared for multisites? Yes.
|
||||
* Added .gitignore.
|
||||
* Added security measurement to prevent the public to run the php-script directly.
|
||||
* Changed the registering of settings during installation to an array.
|
||||
* Changed the unregistering of settings during uninstallation to an array.
|
||||
|
||||
= 4.1.0 =
|
||||
* Compatibility with WordPress version 6.7.1
|
||||
|
||||
+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