Changeset 11817
- Timestamp:
- 01/25/2018 07:44:49 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-xprofile/bp-xprofile-functions.php
r11705 r11817 838 838 wp_update_user( array( 'ID' => $user_id, 'display_name' => $fullname ) ); 839 839 } 840 add_action( 'xprofile_updated_profile', 'xprofile_sync_wp_profile' );841 840 add_action( 'bp_core_signup_user', 'xprofile_sync_wp_profile' ); 842 841 add_action( 'bp_core_activated_user', 'xprofile_sync_wp_profile' ); … … 862 861 add_action( 'user_profile_update_errors', 'xprofile_sync_bp_profile', 10, 3 ); 863 862 863 /** 864 * Update the WP display, last, and first name fields when the xprofile display name field is updated. 865 * 866 * @since 3.0.0 867 * 868 * @param BP_XProfile_ProfileData $data Current instance of the profile data being saved. 869 */ 870 function xprofile_sync_wp_profile_on_single_field_set( $data ) { 871 872 if ( bp_xprofile_fullname_field_id() !== $data->field_id ) { 873 return; 874 } 875 876 xprofile_sync_wp_profile( $data->user_id ); 877 } 878 add_action( 'xprofile_data_after_save', 'xprofile_sync_wp_profile_on_single_field_set' ); 864 879 865 880 /**
Note: See TracChangeset
for help on using the changeset viewer.