bp_print_add_repeater_set_button()
Output button to add repeater field set.
Description
Source
File: bp-xprofile/bp-xprofile-repeaters.php
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
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.