forked from Michel2/wp-jquery-datatable
Changed the registering of settings during installation to an array
This commit is contained in:
@@ -80,6 +80,7 @@ Is this plugin prepared for multisites? Yes.
|
|||||||
* Added VSCode settings.json for formatOnSave.
|
* Added VSCode settings.json for formatOnSave.
|
||||||
* Added .gitignore.
|
* Added .gitignore.
|
||||||
* 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.
|
||||||
|
|
||||||
= 4.1.0 =
|
= 4.1.0 =
|
||||||
* Compatibility with WordPress version 6.7.1
|
* Compatibility with WordPress version 6.7.1
|
||||||
|
|||||||
+15
-9
@@ -63,15 +63,21 @@ function wp_jdt_create_menu()
|
|||||||
function wp_jdt_settings()
|
function wp_jdt_settings()
|
||||||
{
|
{
|
||||||
//register our settings
|
//register our settings
|
||||||
register_setting('wp-jdt-settings-group', 'wp_jdt_info');
|
$settings = array(
|
||||||
register_setting('wp-jdt-settings-group', 'wp_jdt_paging');
|
'wp_jdt_info',
|
||||||
register_setting('wp-jdt-settings-group', 'wp_jdt_page_length');
|
'wp_jdt_paging',
|
||||||
register_setting('wp-jdt-settings-group', 'wp_jdt_paging_type');
|
'wp_jdt_page_length',
|
||||||
register_setting('wp-jdt-settings-group', 'wp_jdt_b_length_change');
|
'wp_jdt_paging_type',
|
||||||
register_setting('wp-jdt-settings-group', 'wp_jdt_ordering');
|
'wp_jdt_b_length_change',
|
||||||
register_setting('wp-jdt-settings-group', 'wp_jdt_order_row');
|
'wp_jdt_ordering',
|
||||||
register_setting('wp-jdt-settings-group', 'wp_jdt_order_row_sort');
|
'wp_jdt_order_row',
|
||||||
register_setting('wp-jdt-settings-group', 'wp_jdt_searching');
|
'wp_jdt_order_row_sort',
|
||||||
|
'wp_jdt_searching'
|
||||||
|
);
|
||||||
|
|
||||||
|
foreach ($settings as $setting) {
|
||||||
|
register_setting('wp-jdt-settings-group', $setting);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function wp_jdt_settings_page()
|
function wp_jdt_settings_page()
|
||||||
|
|||||||
Reference in New Issue
Block a user