diff --git a/readme.txt b/readme.txt index 937fada..de7e077 100644 --- a/readme.txt +++ b/readme.txt @@ -86,6 +86,7 @@ Is this plugin prepared for multisites? Yes. * Changed the user role for the options page from 'administrator' to 'manage_options'. * Added a check for the options page to only load if the user has sufficient rights. * Changed the radio buttons on the options page to use the WordPress checked() function. +* Changed get_option() for the options page to make use a $default_value. = 4.1.0 = * Compatibility with WordPress version 6.7.1 diff --git a/wp-jquery-datatable.php b/wp-jquery-datatable.php index 8ee69f8..8e4e6b1 100644 --- a/wp-jquery-datatable.php +++ b/wp-jquery-datatable.php @@ -79,15 +79,15 @@ function wp_jdt_settings_page() return; } - $wp_jdt_info = get_option('wp_jdt_info'); - $wp_jdt_paging = get_option('wp_jdt_paging'); - $wp_jdt_page_length = get_option('wp_jdt_page_length'); - $wp_jdt_paging_type = get_option('wp_jdt_paging_type'); - $wp_jdt_b_length_change = get_option('wp_jdt_b_length_change'); - $wp_jdt_ordering = get_option('wp_jdt_ordering'); - $wp_jdt_order_row = get_option('wp_jdt_order_row'); - $wp_jdt_order_row_sort = get_option('wp_jdt_order_row_sort'); - $wp_jdt_searching = get_option('wp_jdt_searching'); + $wp_jdt_info = get_option('wp_jdt_info', 'true'); + $wp_jdt_paging = get_option('wp_jdt_paging', 'true'); + $wp_jdt_page_length = get_option('wp_jdt_page_length', '10'); + $wp_jdt_paging_type = get_option('wp_jdt_paging_type', 'simple'); + $wp_jdt_b_length_change = get_option('wp_jdt_b_length_change', 'true'); + $wp_jdt_ordering = get_option('wp_jdt_ordering', 'true'); + $wp_jdt_order_row = get_option('wp_jdt_order_row', '0'); + $wp_jdt_order_row_sort = get_option('wp_jdt_order_row_sort', 'asc'); + $wp_jdt_searching = get_option('wp_jdt_searching', 'true'); ?>

@@ -131,11 +131,7 @@ function wp_jdt_settings_page() - " min="1" step="1" name="wp_jdt_page_length"> + @@ -162,11 +158,7 @@ function wp_jdt_settings_page() - " min="0" step="1" name="wp_jdt_order_row">
+