bp_xprofile_get_user_profile_progress_data( array $settings )

Function returns user progress data by checking if data already exists in transient first. IF NO then follow checking the progress logic.

Description

Clear transient when 1) Widget form settings update. 2) When Logged user profile updated. 3) When new profile fields added/updated/deleted.

Parameters

$settings

(Required) - set of fieldset selected to show in progress & profile or cover photo selected to show in progress.

Return

(array) $user_progress - user progress to render profile completion

Source

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

2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
function bp_xprofile_get_user_profile_progress_data( $settings ) {
 
    $user_progress         = array();
    $user_progress_options = bp_xprofile_get_selected_options_user_progress( $settings );
 
    // Do not proceed if no fields found based on settings.
    if ( isset( $user_progress_options['total_fields'] ) && $user_progress_options['total_fields'] <= 0 ) {
        return $user_progress;
    }
 
    // Format User Progress array to pass on to the template.
    $user_progress = bp_xprofile_get_user_progress_formatted( $user_progress_options );
 
    return $user_progress;
}

Changelog

Changelog
Version Description
BuddyBoss 1.5.3 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.