BP_Document_Folder::append_user_fullnames( array $folders )
Append xProfile fullnames to an document array.
Description
Parameters
- $folders
-
(Required) Folders array.
Return
(array)
Source
File: bp-document/classes/class-bp-document-folder.php
protected static function append_user_fullnames( $folders ) { if ( bp_is_active( 'xprofile' ) && ! empty( $folders ) ) { $folder_user_ids = wp_list_pluck( $folders, 'user_id' ); if ( ! empty( $folder_user_ids ) ) { $fullnames = bp_core_get_user_displaynames( $folder_user_ids ); if ( ! empty( $fullnames ) ) { foreach ( (array) $folders as $i => $folder ) { if ( ! empty( $fullnames[ $folder->user_id ] ) ) { $folders[ $i ]->user_fullname = $fullnames[ $folder->user_id ]; } } } } } return $folders; }
Changelog
Version | Description |
---|---|
BuddyBoss 1.4.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.