xprofile_update_display_names()
Update member display names.
Description
Source
File: bp-core/admin/bp-core-admin-tools.php
766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 | function xprofile_update_display_names() { $users = get_users( [ 'fields' => [ 'ID' , 'display_name' ] ] ); foreach ( $users as $user ) { $display_name = bp_custom_display_name_format( $user ->display_name, $user ->ID ); wp_update_user( $args = [ 'ID' => $user ->ID, 'display_name' => $display_name ] ); } $statement = __( 'Update WordPress user display names; %s' , 'buddyboss' ); return array ( 0, sprintf( $statement , __( 'Complete!' , 'buddyboss' ) ) ); } |
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.