Changeset 8810
- Timestamp:
- 08/12/2014 01:15:20 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-xprofile/bp-xprofile-functions.php
r8809 r8810 709 709 function xprofile_sync_wp_profile( $user_id = 0 ) { 710 710 711 $bp = buddypress(); 712 713 if ( !empty( $bp->site_options['bp-disable-profile-sync'] ) && (int) $bp->site_options['bp-disable-profile-sync'] ) 711 // Bail if profile syncing is disabled 712 if ( bp_disable_profile_sync() ) { 714 713 return true; 715 716 if ( empty( $user_id ) ) 714 } 715 716 if ( empty( $user_id ) ) { 717 717 $user_id = bp_loggedin_user_id(); 718 719 if ( empty( $user_id ) ) 720 return false; 718 } 719 720 if ( empty( $user_id ) ) { 721 return false; 722 } 721 723 722 724 $fullname = xprofile_get_field_data( bp_xprofile_fullname_field_id(), $user_id ); … … 751 753 */ 752 754 function xprofile_sync_bp_profile( &$errors, $update, &$user ) { 753 global $bp; 754 755 if ( ( !empty( $bp->site_options['bp-disable-profile-sync'] ) && (int) $bp->site_options['bp-disable-profile-sync'] ) || !$update || $errors->get_error_codes() )755 756 // Bail if profile syncing is disabled 757 if ( bp_disable_profile_sync() ) { 756 758 return; 759 } 757 760 758 761 xprofile_set_field_data( bp_xprofile_fullname_field_id(), $user->ID, $user->display_name );
Note: See TracChangeset
for help on using the changeset viewer.