updated plugin Easy Digital Downloads version 3.1.1.3

This commit is contained in:
2023-03-29 18:20:17 +00:00
committed by Gitium
parent 2573ae37c7
commit e42ba0e05a
20 changed files with 234 additions and 155 deletions

View File

@ -30,8 +30,15 @@ class Settings {
foreach ( $section_settings as $setting_key => $setting ) {
$value = $this->get_setting_value( $tab_key, $section_key, $setting_key );
// If the value is null, it's a skipped setting.
if ( ! is_null( $value ) ) {
$setting_id = isset( $setting['id'] ) ? $setting['id'] : sanitize_title( $setting['name'] );
if ( is_null( $value ) ) {
continue;
}
$setting_id = isset( $setting['id'] ) ? $setting['id'] : sanitize_title( $setting['name'] );
if ( is_array( $value ) ) {
foreach ( $value as $v ) {
$data[ "{$setting_id}_{$v}" ] = 1;
}
} else {
$data[ $setting_id ] = $value;
}
}