forked from Michel2/wp-jquery-datatable
Changed get_option() for the options page to make use a $default_value
This commit is contained in:
@@ -86,6 +86,7 @@ Is this plugin prepared for multisites? Yes.
|
|||||||
* Changed the user role for the options page from 'administrator' to 'manage_options'.
|
* 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.
|
* 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 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 =
|
= 4.1.0 =
|
||||||
* Compatibility with WordPress version 6.7.1
|
* Compatibility with WordPress version 6.7.1
|
||||||
|
|||||||
+11
-19
@@ -79,15 +79,15 @@ function wp_jdt_settings_page()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$wp_jdt_info = get_option('wp_jdt_info');
|
$wp_jdt_info = get_option('wp_jdt_info', 'true');
|
||||||
$wp_jdt_paging = get_option('wp_jdt_paging');
|
$wp_jdt_paging = get_option('wp_jdt_paging', 'true');
|
||||||
$wp_jdt_page_length = get_option('wp_jdt_page_length');
|
$wp_jdt_page_length = get_option('wp_jdt_page_length', '10');
|
||||||
$wp_jdt_paging_type = get_option('wp_jdt_paging_type');
|
$wp_jdt_paging_type = get_option('wp_jdt_paging_type', 'simple');
|
||||||
$wp_jdt_b_length_change = get_option('wp_jdt_b_length_change');
|
$wp_jdt_b_length_change = get_option('wp_jdt_b_length_change', 'true');
|
||||||
$wp_jdt_ordering = get_option('wp_jdt_ordering');
|
$wp_jdt_ordering = get_option('wp_jdt_ordering', 'true');
|
||||||
$wp_jdt_order_row = get_option('wp_jdt_order_row');
|
$wp_jdt_order_row = get_option('wp_jdt_order_row', '0');
|
||||||
$wp_jdt_order_row_sort = get_option('wp_jdt_order_row_sort');
|
$wp_jdt_order_row_sort = get_option('wp_jdt_order_row_sort', 'asc');
|
||||||
$wp_jdt_searching = get_option('wp_jdt_searching');
|
$wp_jdt_searching = get_option('wp_jdt_searching', 'true');
|
||||||
?>
|
?>
|
||||||
<div class='wrap'>
|
<div class='wrap'>
|
||||||
<h2><?php _e('WP jQuery DataTable Settings', 'wp-jquery-datatable'); ?></h2>
|
<h2><?php _e('WP jQuery DataTable Settings', 'wp-jquery-datatable'); ?></h2>
|
||||||
@@ -131,11 +131,7 @@ function wp_jdt_settings_page()
|
|||||||
<tr valign='top'>
|
<tr valign='top'>
|
||||||
<th scope='row'><?php _e('Rows Per Page', 'wp-jquery-datatable'); ?></th>
|
<th scope='row'><?php _e('Rows Per Page', 'wp-jquery-datatable'); ?></th>
|
||||||
<td>
|
<td>
|
||||||
<input type="number" class="small-text" value="<?php if ($wp_jdt_page_length != NULL) {
|
<input type="number" class="small-text" value="<?php echo $wp_jdt_page_length; ?>" min="1" step="1" name="wp_jdt_page_length">
|
||||||
echo $wp_jdt_page_length;
|
|
||||||
} else {
|
|
||||||
echo "10";
|
|
||||||
} ?>" min="1" step="1" name="wp_jdt_page_length">
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
@@ -162,11 +158,7 @@ function wp_jdt_settings_page()
|
|||||||
<tr valign='top'>
|
<tr valign='top'>
|
||||||
<th scope='row'><?php _e('Specific Column Order', 'wp-jquery-datatable'); ?></th>
|
<th scope='row'><?php _e('Specific Column Order', 'wp-jquery-datatable'); ?></th>
|
||||||
<td>
|
<td>
|
||||||
<input type="number" class="small-text" value="<?php if ($wp_jdt_order_row != NULL) {
|
<input type="number" class="small-text" value="<?php echo $wp_jdt_order_row; ?>" min="0" step="1" name="wp_jdt_order_row"><br>
|
||||||
echo $wp_jdt_order_row;
|
|
||||||
} else {
|
|
||||||
echo "0";
|
|
||||||
} ?>" min="0" step="1" name="wp_jdt_order_row"><br>
|
|
||||||
<br>
|
<br>
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<label title="<?php _e('Ascending'); ?>"><input type="radio" <?php checked($wp_jdt_order_row_sort, 'asc'); ?> value="asc" name="wp_jdt_order_row_sort"> <span><?php _e('Ascending'); ?></span></label><br>
|
<label title="<?php _e('Ascending'); ?>"><input type="radio" <?php checked($wp_jdt_order_row_sort, 'asc'); ?> value="asc" name="wp_jdt_order_row_sort"> <span><?php _e('Ascending'); ?></span></label><br>
|
||||||
|
|||||||
Reference in New Issue
Block a user