bp_get_the_profile_field_ids()

Generate a comma-separated list of field IDs that are to be submitted on profile edit.

Description

Return

(string)

Source

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

447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
function bp_get_the_profile_field_ids() {
    global $profile_template;
 
    $field_ids = array();
    foreach ( $profile_template->groups as $group ) {
        if ( ! empty( $group->fields ) ) {
            $field_ids = array_merge( $field_ids, wp_list_pluck( $group->fields, 'id' ) );
        }
    }
 
    $field_ids = implode( ',', wp_parse_id_list( $field_ids ) );
 
    /**
     * Filters the comma-separated list of field IDs.
     *
     * @since BuddyPress 2.1.0
     *
     * @param string $field_ids Comma-separated field IDs.
     */
    return apply_filters( 'bp_get_the_profile_field_ids', $field_ids );
}

Changelog

Changelog
Version Description
BuddyPress 2.1.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.