bp_print_add_repeater_set_button()

Output button to add repeater field set.

Description

Source

File: bp-xprofile/bp-xprofile-repeaters.php

702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
function bp_print_add_repeater_set_button () {
    if ( 'edit' !== bp_current_action() ) {
        return false;
    }
     
    $group_id = bp_get_current_profile_group_id();
    $is_repeater_enabled = 'on' == BP_XProfile_Group::get_group_meta( $group_id, 'is_repeater_enabled' ) ? true : false;
    if ( $is_repeater_enabled ) {
        echo "<button id='btn_add_repeater_set' class='button outline' data-nonce='". wp_create_nonce( 'bp_xprofile_add_repeater_set' ) ."' data-group='{$group_id}'>";
        echo '<span class="dashicons dashicons-plus-alt"></span>';
        printf(
            /* translators: %s = profile field group name */
            __( 'Add Another', 'buddyboss' ),
            bp_get_the_profile_group_name()
        );
        echo "</button>";
    }
}

Changelog

Changelog
Version Description
BuddyBoss 1.0.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.