Changed the unregistering of settings during uninstallation to an array

This commit is contained in:
2026-07-21 17:13:20 +02:00
parent 3841f4e246
commit 36b4e606be
2 changed files with 16 additions and 9 deletions
+1
View File
@@ -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
View File
@@ -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);
}
}