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:
+5
-13
@@ -30,23 +30,15 @@ function wp_jdt_activate_plugin()
|
||||
);
|
||||
|
||||
foreach ($fields as $field) {
|
||||
$data = get_option($field);
|
||||
if ($data == FALSE) {
|
||||
if (get_option($field) === false) {
|
||||
update_option($field, 'true');
|
||||
}
|
||||
}
|
||||
|
||||
$data = get_option('wp_jdt_paging_type');
|
||||
($data == FALSE) ? update_option('wp_jdt_paging_type', 'simple') : '';
|
||||
|
||||
$data = get_option('wp_jdt_page_length');
|
||||
($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') : '';
|
||||
if (get_option('wp_jdt_paging_type') === 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');
|
||||
if (get_option('wp_jdt_order_row_sort') === false) update_option('wp_jdt_order_row_sort', 'desc');
|
||||
}
|
||||
|
||||
add_action('admin_menu', 'wp_jdt_create_menu');
|
||||
|
||||
Reference in New Issue
Block a user