Skip to content

Commit

Permalink
Merge pull request #1144 from vektor-inc/fix/activation-setting-optio…
Browse files Browse the repository at this point in the history
…n-error

[ Bug Fix ] Fixed a PHP error that occurs when the activation settings have never been saved.
  • Loading branch information
kurudrive authored Nov 13, 2024
2 parents 60c51a4 + 3a29091 commit fab81f5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
10 changes: 8 additions & 2 deletions admin/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
Expand Down
11 changes: 0 additions & 11 deletions initialize.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' );

Expand Down
2 changes: 2 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down

0 comments on commit fab81f5

Please sign in to comment.