Skip to content

Commit

Permalink
Do not save file field.
Browse files Browse the repository at this point in the history
  • Loading branch information
kagg-design committed Aug 5, 2024
1 parent 757f59e commit 13accd8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/php/Settings/Abstracts/SettingsBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -1488,6 +1488,11 @@ public function pre_update_option_filter( $value, $old_value ) {
$old_value = is_array( $old_value ) ? $old_value : [];

foreach ( $this->form_fields() as $key => $form_field ) {
if ( 'file' === $form_field['type'] ) {
unset( $value[ $key ], $old_value[ $key ] );
continue;
}

if ( 'checkbox' !== $form_field['type'] || isset( $value[ $key ] ) ) {
continue;
}
Expand Down

0 comments on commit 13accd8

Please sign in to comment.