From d52d0bf189f324a97cbe0951d5c189479a1cc97c Mon Sep 17 00:00:00 2001 From: kurudrive Date: Wed, 13 Nov 2024 21:35:21 +0900 Subject: [PATCH 1/2] [ Bug Fix ] Fixed a PHP error that occurs when the activation settings have never been saved. --- initialize.php | 11 ----------- readme.txt | 2 ++ 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/initialize.php b/initialize.php index 85454985..53eb2726 100644 --- a/initialize.php +++ b/initialize.php @@ -39,17 +39,6 @@ function veu_load_packages(){ require_once VEU_DIRECTORY_PATH . '/inc/common-block.php'; require VEU_DIRECTORY_PATH . '/inc/footer-copyright-change.php'; veu_package_include(); // package_manager.php - - // vkExUnit_common_options initialize - register_setting( - 'options', - 'vkExUnit_common_options', - array( - 'type' => 'array', - 'sanitize_callback' => null, - 'default' => veu_get_common_options_default(), - ) - ); } add_action( 'after_setup_theme', 'veu_load_packages' ); diff --git a/readme.txt b/readme.txt index 6a2b705f..39833ee0 100644 --- a/readme.txt +++ b/readme.txt @@ -81,6 +81,8 @@ e.g. == Changelog == +[ Bug Fix ] Fixed a PHP error that occurs when the activation settings have never been saved. + = 9.100.3 = [ Bug Fix ][ CSS Customize ] Fixed an issue where CSS customizations were not applied on single page. From 3a290916e2960b09e7c1fb084d94a5b6b15eca8d Mon Sep 17 00:00:00 2001 From: kurudrive Date: Wed, 13 Nov 2024 21:48:53 +0900 Subject: [PATCH 2/2] fix setting --- admin/admin.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/admin/admin.php b/admin/admin.php index 189ca3d9..6c6dfcd0 100644 --- a/admin/admin.php +++ b/admin/admin.php @@ -21,9 +21,15 @@ function veu_common_options_init() { register_setting( - 'vkExUnit_common_options_fields', // Immediately following form tag of edit page. + 'vkExUnit_common_options_fields', // Immediately following form tag of edit page. 'vkExUnit_common_options', // name attr - 'veu_common_options_validate' + array( + 'type' => 'array', + 'description' => 'vkExUnit common options', + 'sanitize_callback' => 'veu_common_options_validate', + 'show_in_rest' => false, + 'default' => veu_get_common_options_default(), + ) ); } add_action( 'admin_init', 'veu_common_options_init' );