Skip to content

Commit

Permalink
Move the fetching of group label/desc to after calling "before_group"…
Browse files Browse the repository at this point in the history
… param
  • Loading branch information
jtsternberg committed Oct 23, 2017
1 parent 15b9e8a commit a90d51f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions includes/CMB2.php
Original file line number Diff line number Diff line change
Expand Up @@ -469,13 +469,14 @@ public function render_group_callback( $field_args, $field_group ) {
return;
}

$desc = $field_group->args( 'description' );
$label = $field_group->args( 'name' );
$group_val = (array) $field_group->value();
$field_group->index = 0;

$field_group->peform_param_callback( 'before_group' );

$desc = $field_group->args( 'description' );
$label = $field_group->args( 'name' );
$group_val = (array) $field_group->value();

echo '<div class="cmb-row cmb-repeat-group-wrap ', esc_attr( $field_group->row_classes() ), '" data-fieldtype="group"><div class="cmb-td"><div data-groupid="', esc_attr( $field_group->id() ), '" id="', esc_attr( $field_group->id() ), '_repeat" ', $this->group_wrap_attributes( $field_group ), '>';

if ( $desc || $label ) {
Expand Down

0 comments on commit a90d51f

Please sign in to comment.