Added a check for the options page to only load if the user has sufficient rights

This commit is contained in:
2026-07-21 17:32:21 +02:00
parent 4bf2d4c049
commit 5193324625
2 changed files with 5 additions and 0 deletions
+1
View File
@@ -84,6 +84,7 @@ Is this plugin prepared for multisites? Yes.
* Changed the unregistering of settings during uninstallation to an array.
* Deleted the setting of unnecessary variables under wp_jdt_activate_plugin() and made all the if statements strict.
* 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.
= 4.1.0 =
* Compatibility with WordPress version 6.7.1
+4
View File
@@ -75,6 +75,10 @@ function wp_jdt_settings()
function wp_jdt_settings_page()
{
// Admin side page options
if (!current_user_can('manage_options')) {
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');