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
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
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.