bp_xprofile_ajax_add_repeater_set()
Adds a repeater set.
Description
Source
File: bp-xprofile/bp-xprofile-repeaters.php
function bp_xprofile_ajax_add_repeater_set () { check_ajax_referer( 'bp_xprofile_add_repeater_set', '_wpnonce' ); $user_id = bp_displayed_user_id() ? bp_displayed_user_id() : bp_loggedin_user_id(); if ( !$user_id ) { die(); } $field_group_id = isset( $_REQUEST['group'] ) ? absint( $_REQUEST['group'] ) : false; if ( !$field_group_id ) { die(); } $count = bp_get_profile_field_set_count( $field_group_id, $user_id ); $count++; bp_set_profile_field_set_count( $field_group_id, $user_id, $count ); die( 'ok' ); }
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.