forked from Michel2/wp-jquery-datatable
Changed the radio buttons on the options page to use the WordPress checked() function
This commit is contained in:
+16
-110
@@ -100,19 +100,8 @@ function wp_jdt_settings_page()
|
||||
<th scope='row'><?php _e('Show Information', 'wp-jquery-datatable'); ?></th>
|
||||
<td>
|
||||
<fieldset>
|
||||
<?php
|
||||
if ($wp_jdt_info != "false") {
|
||||
?>
|
||||
<label title="<?php _e('Yes'); ?>"><input type="radio" checked="checked" value="true" name="wp_jdt_info"> <span><?php _e('Yes'); ?></span></label><br>
|
||||
<label title="<?php _e('No'); ?>"><input type="radio" value="false" name="wp_jdt_info"> <span><?php _e('No'); ?></span></label><br>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<label title="<?php _e('Yes'); ?>"><input type="radio" value="true" name="wp_jdt_info"> <span><?php _e('Yes'); ?></span></label><br>
|
||||
<label title="<?php _e('No'); ?>"><input type="radio" checked="checked" value="false" name="wp_jdt_info"> <span><?php _e('No'); ?></span></label><br>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<label title="<?php _e('Yes'); ?>"><input type="radio" <?php checked($wp_jdt_info, 'true'); ?> value="true" name="wp_jdt_info"> <span><?php _e('Yes'); ?></span></label><br>
|
||||
<label title="<?php _e('No'); ?>"><input type="radio" <?php checked($wp_jdt_info, 'false'); ?> value="false" name="wp_jdt_info"> <span><?php _e('No'); ?></span></label><br>
|
||||
</fieldset>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -121,19 +110,8 @@ function wp_jdt_settings_page()
|
||||
<th scope='row'><?php _e('Pagination'); ?></th>
|
||||
<td>
|
||||
<fieldset>
|
||||
<?php
|
||||
if ($wp_jdt_paging != "false") {
|
||||
?>
|
||||
<label title="<?php _e('Yes'); ?>"><input type="radio" checked="checked" value="true" name="wp_jdt_paging"> <span><?php _e('Yes'); ?></span></label><br>
|
||||
<label title="<?php _e('No'); ?>"><input type="radio" value="false" name="wp_jdt_paging"> <span><?php _e('No'); ?></span></label><br>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<label title="<?php _e('Yes'); ?>"><input type="radio" value="true" name="wp_jdt_paging"> <span><?php _e('Yes'); ?></span></label><br>
|
||||
<label title="<?php _e('No'); ?>"><input type="radio" checked="checked" value="false" name="wp_jdt_paging"> <span><?php _e('No'); ?></span></label><br>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<label title="<?php _e('Yes'); ?>"><input type="radio" <?php checked($wp_jdt_paging, 'true'); ?> value="true" name="wp_jdt_paging"> <span><?php _e('Yes'); ?></span></label><br>
|
||||
<label title="<?php _e('No'); ?>"><input type="radio" <?php checked($wp_jdt_paging, 'false'); ?> value="false" name="wp_jdt_paging"> <span><?php _e('No'); ?></span></label><br>
|
||||
</fieldset>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -142,38 +120,10 @@ function wp_jdt_settings_page()
|
||||
<th scope='row'><?php _e('Pagination Type', 'wp-jquery-datatable'); ?></th>
|
||||
<td>
|
||||
<fieldset>
|
||||
<?php
|
||||
if ($wp_jdt_paging_type == "full_numbers") {
|
||||
?>
|
||||
<label title="<?php _e('Simple', 'wp-jquery-datatable'); ?>"><input type="radio" value="simple" name="wp_jdt_paging_type"> <span><?php _e('Simple', 'wp-jquery-datatable'); ?></span></label><br>
|
||||
<label title="<?php _e('Simple Numbers', 'wp-jquery-datatable'); ?>"><input type="radio" value="simple_numbers" name="wp_jdt_paging_type"> <span><?php _e('Simple Numbers', 'wp-jquery-datatable'); ?></span></label><br>
|
||||
<label title="<?php _e('Full', 'wp-jquery-datatable'); ?>"><input type="radio" value="full" name="wp_jdt_paging_type"> <span><?php _e('Full', 'wp-jquery-datatable'); ?></span></label><br>
|
||||
<label title="<?php _e('Full Numbers', 'wp-jquery-datatable'); ?>"><input type="radio" checked="checked" value="full_numbers" name="wp_jdt_paging_type"> <span><?php _e('Full Numbers', 'wp-jquery-datatable'); ?></span></label><br>
|
||||
<?php
|
||||
} else if ($wp_jdt_paging_type == "full") {
|
||||
?>
|
||||
<label title="<?php _e('Simple', 'wp-jquery-datatable'); ?>"><input type="radio" value="simple" name="wp_jdt_paging_type"> <span><?php _e('Simple', 'wp-jquery-datatable'); ?></span></label><br>
|
||||
<label title="<?php _e('Simple Numbers', 'wp-jquery-datatable'); ?>"><input type="radio" value="simple_numbers" name="wp_jdt_paging_type"> <span><?php _e('Simple Numbers', 'wp-jquery-datatable'); ?></span></label><br>
|
||||
<label title="<?php _e('Full', 'wp-jquery-datatable'); ?>"><input type="radio" checked="checked" value="full" name="wp_jdt_paging_type"> <span><?php _e('Full', 'wp-jquery-datatable'); ?></span></label><br>
|
||||
<label title="<?php _e('Full Numbers', 'wp-jquery-datatable'); ?>"><input type="radio" value="full_numbers" name="wp_jdt_paging_type"> <span><?php _e('Full Numbers', 'wp-jquery-datatable'); ?></span></label><br>
|
||||
<?php
|
||||
} else if ($wp_jdt_paging_type == "simple_numbers") {
|
||||
?>
|
||||
<label title="<?php _e('Simple', 'wp-jquery-datatable'); ?>"><input type="radio" value="simple" name="wp_jdt_paging_type"> <span><?php _e('Simple', 'wp-jquery-datatable'); ?></span></label><br>
|
||||
<label title="<?php _e('Simple Numbers', 'wp-jquery-datatable'); ?>"><input type="radio" checked="checked" value="simple_numbers" name="wp_jdt_paging_type"> <span><?php _e('Simple Numbers', 'wp-jquery-datatable'); ?></span></label><br>
|
||||
<label title="<?php _e('Full', 'wp-jquery-datatable'); ?>"><input type="radio" value="full" name="wp_jdt_paging_type"> <span><?php _e('Full', 'wp-jquery-datatable'); ?></span></label><br>
|
||||
<label title="<?php _e('Full Numbers', 'wp-jquery-datatable'); ?>"><input type="radio" value="full_numbers" name="wp_jdt_paging_type"> <span><?php _e('Full Numbers', 'wp-jquery-datatable'); ?></span></label><br>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<label title="<?php _e('Simple', 'wp-jquery-datatable'); ?>"><input type="radio" checked="checked" value="simple" name="wp_jdt_paging_type"> <span><?php _e('Simple', 'wp-jquery-datatable'); ?></span></label><br>
|
||||
<label title="<?php _e('Simple Numbers', 'wp-jquery-datatable'); ?>"><input type="radio" value="simple_numbers" name="wp_jdt_paging_type"> <span><?php _e('Simple Numbers', 'wp-jquery-datatable'); ?></span></label><br>
|
||||
<label title="<?php _e('Full', 'wp-jquery-datatable'); ?>"><input type="radio" value="full" name="wp_jdt_paging_type"> <span><?php _e('Full', 'wp-jquery-datatable'); ?></span></label><br>
|
||||
<label title="<?php _e('Full Numbers', 'wp-jquery-datatable'); ?>"><input type="radio" value="full_numbers" name="wp_jdt_paging_type"> <span><?php _e('Full Numbers', 'wp-jquery-datatable'); ?></span></label><br>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<label title="<?php _e('Simple', 'wp-jquery-datatable'); ?>"><input type="radio" <?php checked($wp_jdt_paging_type, 'simple'); ?> value="simple" name="wp_jdt_paging_type"> <span><?php _e('Simple', 'wp-jquery-datatable'); ?></span></label><br>
|
||||
<label title="<?php _e('Simple Numbers', 'wp-jquery-datatable'); ?>"><input type="radio" <?php checked($wp_jdt_paging_type, 'simple_numbers'); ?> value="simple_numbers" name="wp_jdt_paging_type"> <span><?php _e('Simple Numbers', 'wp-jquery-datatable'); ?></span></label><br>
|
||||
<label title="<?php _e('Full', 'wp-jquery-datatable'); ?>"><input type="radio" <?php checked($wp_jdt_paging_type, 'full'); ?> value="full" name="wp_jdt_paging_type"> <span><?php _e('Full', 'wp-jquery-datatable'); ?></span></label><br>
|
||||
<label title="<?php _e('Full Numbers', 'wp-jquery-datatable'); ?>"><input type="radio" <?php checked($wp_jdt_paging_type, 'full_numbers'); ?> value="full_numbers" name="wp_jdt_paging_type"> <span><?php _e('Full Numbers', 'wp-jquery-datatable'); ?></span></label><br>
|
||||
</fieldset>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -193,19 +143,8 @@ function wp_jdt_settings_page()
|
||||
<th scope='row'><?php _e('Show Per Page DropDown', 'wp-jquery-datatable'); ?></th>
|
||||
<td>
|
||||
<fieldset>
|
||||
<?php
|
||||
if ($wp_jdt_b_length_change != "false") {
|
||||
?>
|
||||
<label title="<?php _e('Yes'); ?>"><input type="radio" checked="checked" value="true" name="wp_jdt_b_length_change"> <span><?php _e('Yes'); ?></span></label><br>
|
||||
<label title="<?php _e('No'); ?>"><input type="radio" value="false" name="wp_jdt_b_length_change"> <span><?php _e('No'); ?></span></label><br>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<label title="<?php _e('Yes'); ?>"><input type="radio" value="true" name="wp_jdt_b_length_change"> <span><?php _e('Yes'); ?></span></label><br>
|
||||
<label title="<?php _e('No'); ?>"><input type="radio" checked="checked" value="false" name="wp_jdt_b_length_change"> <span><?php _e('No'); ?></span></label><br>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<label title="<?php _e('Yes'); ?>"><input type="radio" <?php checked($wp_jdt_b_length_change, 'true'); ?> value="true" name="wp_jdt_b_length_change"> <span><?php _e('Yes'); ?></span></label><br>
|
||||
<label title="<?php _e('No'); ?>"><input type="radio" <?php checked($wp_jdt_b_length_change, 'false'); ?> value="false" name="wp_jdt_b_length_change"> <span><?php _e('No'); ?></span></label><br>
|
||||
</fieldset>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -214,19 +153,8 @@ function wp_jdt_settings_page()
|
||||
<th scope='row'><?php _e('Ordering', 'wp-jquery-datatable'); ?></th>
|
||||
<td>
|
||||
<fieldset>
|
||||
<?php
|
||||
if ($wp_jdt_ordering != "false") {
|
||||
?>
|
||||
<label title="<?php _e('Yes'); ?>"><input type="radio" checked="checked" value="true" name="wp_jdt_ordering"> <span><?php _e('Yes'); ?></span></label><br>
|
||||
<label title="<?php _e('No'); ?>"><input type="radio" value="false" name="wp_jdt_ordering"> <span><?php _e('No'); ?></span></label><br>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<label title="<?php _e('Yes'); ?>"><input type="radio" value="true" name="wp_jdt_ordering"> <span><?php _e('Yes'); ?></span></label><br>
|
||||
<label title="<?php _e('No'); ?>"><input type="radio" checked="checked" value="false" name="wp_jdt_ordering"> <span><?php _e('No'); ?></span></label><br>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<label title="<?php _e('Yes'); ?>"><input type="radio" <?php checked($wp_jdt_ordering, 'true'); ?> value="true" name="wp_jdt_ordering"> <span><?php _e('Yes'); ?></span></label><br>
|
||||
<label title="<?php _e('No'); ?>"><input type="radio" <?php checked($wp_jdt_ordering, 'false'); ?> value="false" name="wp_jdt_ordering"> <span><?php _e('No'); ?></span></label><br>
|
||||
</fieldset>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -241,19 +169,8 @@ function wp_jdt_settings_page()
|
||||
} ?>" min="0" step="1" name="wp_jdt_order_row"><br>
|
||||
<br>
|
||||
<fieldset>
|
||||
<?php
|
||||
if ($wp_jdt_order_row_sort != "desc") {
|
||||
?>
|
||||
<label title="<?php _e('Ascending'); ?>"><input type="radio" checked="checked" value="asc" name="wp_jdt_order_row_sort"> <span><?php _e('Ascending'); ?></span></label><br>
|
||||
<label title="<?php _e('Descending'); ?>"><input type="radio" value="desc" name="wp_jdt_order_row_sort"> <span><?php _e('Descending'); ?></span></label><br>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<label title="<?php _e('Ascending'); ?>"><input type="radio" value="asc" name="wp_jdt_order_row_sort"> <span><?php _e('Ascending'); ?></span></label><br>
|
||||
<label title="<?php _e('Descending'); ?>"><input type="radio" checked="checked" value="desc" name="wp_jdt_order_row_sort"> <span><?php _e('Descending'); ?></span></label><br>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<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('Descending'); ?>"><input type="radio" <?php checked($wp_jdt_order_row_sort, 'desc'); ?> value="desc" name="wp_jdt_order_row_sort"> <span><?php _e('Descending'); ?></span></label><br>
|
||||
</fieldset>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -262,19 +179,8 @@ function wp_jdt_settings_page()
|
||||
<th scope='row'><?php _e('Searching', 'wp-jquery-datatable'); ?></th>
|
||||
<td>
|
||||
<fieldset>
|
||||
<?php
|
||||
if ($wp_jdt_searching != "false") {
|
||||
?>
|
||||
<label title="<?php _e('Yes'); ?>"><input type="radio" checked="checked" value="true" name="wp_jdt_searching"> <span><?php _e('Yes'); ?></span></label><br>
|
||||
<label title="<?php _e('No'); ?>"><input type="radio" value="false" name="wp_jdt_searching"> <span><?php _e('No'); ?></span></label><br>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<label title="<?php _e('Yes'); ?>"><input type="radio" value="true" name="wp_jdt_searching"> <span><?php _e('Yes'); ?></span></label><br>
|
||||
<label title="<?php _e('No'); ?>"><input type="radio" checked="checked" value="false" name="wp_jdt_searching"> <span><?php _e('No'); ?></span></label><br>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<label title="<?php _e('Yes'); ?>"><input type="radio" <?php checked($wp_jdt_searching, 'true'); ?> value="true" name="wp_jdt_searching"> <span><?php _e('Yes'); ?></span></label><br>
|
||||
<label title="<?php _e('No'); ?>"><input type="radio" <?php checked($wp_jdt_searching, 'false'); ?> value="false" name="wp_jdt_searching"> <span><?php _e('No'); ?></span></label><br>
|
||||
</fieldset>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user