| @@ -605,10 +605,8 @@ | ||
| 605 | 605 | $field_group->peform_param_callback( 'before_group_row' ); |
| 606 | 606 | $closed_class = $field_group->options( 'closed' ) ? ' closed' : ''; |
| 607 | 607 | $confirm_deletion = $field_group->options( 'remove_confirm' ); |
| 608 | 608 | $confirm_deletion = ! empty( $confirm_deletion ) ? $confirm_deletion : ''; |
| 609 | - | |
| 610 | - $group_title = isset( $field_group->value[$field_group->index]['id'] ) ? $field_group->value[$field_group->index]['id'] : $field_group->replace_hash( $field_group->options( 'group_title' ) ); | |
| 611 | 609 | |
| 612 | 610 | echo ' |
| 613 | 611 | <div id="cmb-group-', $field_group->id(), '-', $field_group->index, '" class="postbox cmb-row cmb-repeatable-grouping', $closed_class, '" data-iterator="', $field_group->index, '">'; |
| 614 | 612 | |
| @@ -615,14 +613,11 @@ | ||
| 615 | 613 | if ( $field_group->args( 'repeatable' ) ) { |
| 616 | 614 | echo '<button type="button" data-selector="', $field_group->id(), '_repeat" data-confirm="', esc_attr( $confirm_deletion ), '" class="dashicons-before dashicons-no-alt cmb-remove-group-row" title="', esc_attr( $field_group->options( 'remove_button' ) ), '"></button>'; |
| 617 | 615 | } |
| 618 | 616 | |
| 619 | - $button = isset( $_GET['page'] ) && $_GET['page'] == 'wpgetapi_setup' ? '' : '<button class="test-endpoint-button button-primary">' . esc_html__( 'Test Endpoint', 'wpgetapi' ) . '</button>'; | |
| 620 | - $duplicate_button = isset( $_GET['page'] ) && $_GET['page'] == 'wpgetapi_setup' ? '' : '<button class="duplicate-endpoint-button button-primary">' . esc_html__( 'Duplicate', 'wpgetapi' ) . '</button>'; | |
| 621 | - | |
| 622 | 617 | echo ' |
| 623 | 618 | <div class="cmbhandle" title="' , esc_attr__( 'Click to toggle', 'cmb2' ), '"><br></div> |
| 624 | - <h3 class="cmb-group-title cmbhandle-title"><span>', $group_title, '</span>' . $button . $duplicate_button . '</h3> | |
| 619 | + <h3 class="cmb-group-title cmbhandle-title"><span>', $field_group->replace_hash( $field_group->options( 'group_title' ) ), '</span></h3> | |
| 625 | 620 | |
| 626 | 621 | <div class="inside cmb-td cmb-nested cmb-field-list">'; |
| 627 | 622 | // Loop and render repeatable group fields. |
| 628 | 623 | foreach ( array_values( $field_group->args( 'fields' ) ) as $field_args ) { |