| | 930 | * xprofile_sync_bp_profile |
| | 931 | * |
| | 932 | * Syncs the standard built in WordPress profile data to Xprofile. |
| | 933 | * |
| | 934 | * @package BuddyPress Core |
| | 935 | */ |
| | 936 | function xprofile_sync_bp_profile( &$errors, $update, &$user ) { |
| | 937 | global $bp; |
| | 938 | |
| | 939 | if ( (int)$bp->site_options['bp-disable-profile-sync'] || !$update || $errors->get_error_codes() ) |
| | 940 | return; |
| | 941 | |
| | 942 | xprofile_set_field_data( BP_XPROFILE_FULLNAME_FIELD_NAME, $user->ID, $user->display_name ); |
| | 943 | } |
| | 944 | add_action( 'user_profile_update_errors', 'xprofile_sync_bp_profile', 10, 3 ); |
| | 945 | |
| | 946 | /** |