forked from Michel2/wp-jquery-datatable
Deleted the setting of unnecessary variables under wp_jdt_activate_plugin() and made all the if statements strict
This commit is contained in:
@@ -82,6 +82,7 @@ Is this plugin prepared for multisites? Yes.
|
|||||||
* Added security measurement to prevent the public to run the php-script directly.
|
* 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 registering of settings during installation to an array.
|
||||||
* Changed the unregistering of settings during uninstallation to an array.
|
* Changed the unregistering of settings during uninstallation to an array.
|
||||||
|
* Deleted the setting of unnecessary variables under wp_jdt_activate_plugin() and made all the if statements strict.
|
||||||
|
|
||||||
= 4.1.0 =
|
= 4.1.0 =
|
||||||
* Compatibility with WordPress version 6.7.1
|
* Compatibility with WordPress version 6.7.1
|
||||||
|
|||||||
+5
-13
@@ -30,23 +30,15 @@ function wp_jdt_activate_plugin()
|
|||||||
);
|
);
|
||||||
|
|
||||||
foreach ($fields as $field) {
|
foreach ($fields as $field) {
|
||||||
$data = get_option($field);
|
if (get_option($field) === false) {
|
||||||
if ($data == FALSE) {
|
|
||||||
update_option($field, 'true');
|
update_option($field, 'true');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$data = get_option('wp_jdt_paging_type');
|
if (get_option('wp_jdt_paging_type') === false) update_option('wp_jdt_paging_type', 'simple');
|
||||||
($data == FALSE) ? update_option('wp_jdt_paging_type', 'simple') : '';
|
if (get_option('wp_jdt_page_length') === false) update_option('wp_jdt_page_length', '10');
|
||||||
|
if (get_option('wp_jdt_order_row') === false) update_option('wp_jdt_order_row', '0');
|
||||||
$data = get_option('wp_jdt_page_length');
|
if (get_option('wp_jdt_order_row_sort') === false) update_option('wp_jdt_order_row_sort', 'desc');
|
||||||
($data == FALSE) ? update_option('wp_jdt_page_length', '10') : '';
|
|
||||||
|
|
||||||
$data = get_option('wp_jdt_order_row');
|
|
||||||
($data == FALSE) ? update_option('wp_jdt_order_row', '0') : '';
|
|
||||||
|
|
||||||
$data = get_option('wp_jdt_order_row_sort');
|
|
||||||
($data == FALSE) ? update_option('wp_jdt_order_row_sort', 'desc') : '';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
add_action('admin_menu', 'wp_jdt_create_menu');
|
add_action('admin_menu', 'wp_jdt_create_menu');
|
||||||
|
|||||||
Reference in New Issue
Block a user