diff --git a/includes/CMB2.php b/includes/CMB2.php index a779c5e61..af45a024a 100644 --- a/includes/CMB2.php +++ b/includes/CMB2.php @@ -442,7 +442,6 @@ public function render_group( $args ) { $desc = $field_group->args( 'description' ); $label = $field_group->args( 'name' ); $group_val = (array) $field_group->value(); - $remove_disabled = count( $group_val ) <= 1 ? 'disabled="disabled" ' : ''; $field_group->index = 0; $field_group->peform_param_callback( 'before_group' ); @@ -463,11 +462,11 @@ public function render_group( $args ) { if ( ! empty( $group_val ) ) { foreach ( $group_val as $group_key => $field_id ) { - $this->render_group_row( $field_group, $remove_disabled ); + $this->render_group_row( $field_group ); $field_group->index++; } } else { - $this->render_group_row( $field_group, $remove_disabled ); + $this->render_group_row( $field_group ); } if ( $field_group->args( 'repeatable' ) ) { @@ -528,11 +527,10 @@ public function group_wrap_attributes( $field_group ) { * * @since 1.0.2 * @param CMB2_Field $field_group CMB2_Field group field object. - * @param string $remove_disabled Attribute string to disable the remove button. * * @return CMB2 */ - public function render_group_row( $field_group, $remove_disabled ) { + public function render_group_row( $field_group ) { $field_group->peform_param_callback( 'before_group_row' ); $closed_class = $field_group->options( 'closed' ) ? ' closed' : ''; @@ -541,7 +539,7 @@ public function render_group_row( $field_group, $remove_disabled ) {