From 87428f97386ae44f3b8a8dbb59b22ef7e2f6a76f Mon Sep 17 00:00:00 2001 From: Mykyta Synelnikov Date: Thu, 15 Feb 2024 12:52:47 +0200 Subject: [PATCH] - changed settings; --- includes/admin/core/class-admin-settings.php | 61 +++++++++++--------- 1 file changed, 33 insertions(+), 28 deletions(-) diff --git a/includes/admin/core/class-admin-settings.php b/includes/admin/core/class-admin-settings.php index 258ec072..f2cd32aa 100644 --- a/includes/admin/core/class-admin-settings.php +++ b/includes/admin/core/class-admin-settings.php @@ -1575,19 +1575,6 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) { ), ), ), - 'redirect' => array( - 'title' => __( 'Redirect', 'ultimate-member' ), - 'description' => __( 'Allows to manage redirect settings.', 'ultimate-member' ), - 'fields' => array( - array( - 'id' => 'allow_url_redirect_confirm', - 'type' => 'checkbox', - 'label' => __( 'Allow external link redirect confirm', 'ultimate-member' ), - 'checkbox_label' => __( 'Enable JS.confirm for external links', 'ultimate-member' ), - 'description' => __( 'Using JS.confirm alert when you go to an external link.', 'ultimate-member' ), - ), - ), - ), ), ), ), @@ -2206,22 +2193,40 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) { ), 'developers' => array( 'title' => __( 'Developers', 'ultimate-member' ), - 'description' => __( 'This section allows you to manage settings that will be more developer-friendly. If you are not a developer, edit these settings at your own risk.', 'ultimate-member' ), - 'fields' => array( - array( - 'id' => 'allowed_choice_callbacks', - 'type' => 'textarea', - 'label' => __( 'Allowed Choice Callbacks (Enter one PHP function per line)', 'ultimate-member' ), - 'description' => __( 'This option lets you specify the choice callback functions to prevent anyone from using 3rd-party functions that may put your site at risk.', 'ultimate-member' ), + 'form_sections' => array( + 'developers' => array( + 'title' => __( 'Developers', 'ultimate-member' ), + 'description' => __( 'This section allows you to manage settings that will be more developer-friendly. If you are not a developer, edit these settings at your own risk.', 'ultimate-member' ), + 'fields' => array( + array( + 'id' => 'allowed_choice_callbacks', + 'type' => 'textarea', + 'label' => __( 'Allowed Choice Callbacks (Enter one PHP function per line)', 'ultimate-member' ), + 'description' => __( 'This option lets you specify the choice callback functions to prevent anyone from using 3rd-party functions that may put your site at risk.', 'ultimate-member' ), + ), + array( + 'id' => 'rest_api_version', + 'type' => 'select', + 'label' => __( 'Version', 'ultimate-member' ), + 'description' => __( 'This controls the REST API version, we recommend to use the last version.', 'ultimate-member' ), + 'options' => array( + '1.0' => __( '1.0 version', 'ultimate-member' ), + '2.0' => __( '2.0 version', 'ultimate-member' ), + ), + ), + ), ), - array( - 'id' => 'rest_api_version', - 'type' => 'select', - 'label' => __( 'Version', 'ultimate-member' ), - 'description' => __( 'This controls the REST API version, we recommend to use the last version.', 'ultimate-member' ), - 'options' => array( - '1.0' => __( '1.0 version', 'ultimate-member' ), - '2.0' => __( '2.0 version', 'ultimate-member' ), + 'redirect' => array( + 'title' => __( 'Redirect', 'ultimate-member' ), + 'description' => __( 'Allows to manage redirect settings.', 'ultimate-member' ), + 'fields' => array( + array( + 'id' => 'allow_url_redirect_confirm', + 'type' => 'checkbox', + 'label' => __( 'Allow external link redirect confirm', 'ultimate-member' ), + 'checkbox_label' => __( 'Enable JS.confirm for external links', 'ultimate-member' ), + 'description' => __( 'Using JS.confirm alert when you go to an external link.', 'ultimate-member' ), + ), ), ), ),