Skip to content

Commit

Permalink
fix: max clone with clone empty start
Browse files Browse the repository at this point in the history
  • Loading branch information
tanftw committed Jan 14, 2025
1 parent 0bdb17f commit 508562c
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions inc/field.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ protected static function begin_html( array $field ): string {
static::label_description( $field )
) : '';

$data_min_clone = is_numeric( $field['min_clone'] ) && $field['min_clone'] > 1 ? ' data-min-clone=' . $field['min_clone'] : '';
$data_max_clone = is_numeric( $field['max_clone'] ) && $field['max_clone'] > 1 ? ' data-max-clone=' . $field['max_clone'] : '';
$data_max_clone = is_numeric( $field['max_clone'] ) ? ' data-max-clone=' . $field['max_clone'] : '';
$data_min_clone = is_numeric( $field['min_clone'] ) ? ' data-min-clone=' . $field['min_clone'] : '';
$data_empty_start = $field['clone_empty_start'] ? ' data-clone-empty-start="1"' : ' data-clone-empty-start="0"';

$input_open = sprintf(
Expand Down Expand Up @@ -332,10 +332,6 @@ public static function normalize( $field ) {
] );
}

if ( 1 === $field['max_clone'] ) {
$field['clone'] = false;
}

return $field;
}

Expand Down

0 comments on commit 508562c

Please sign in to comment.