Changeset 5796
- Timestamp:
- 02/16/2012 01:40:18 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-blogs/bp-blogs-functions.php
r5777 r5796 317 317 $key = $wpdb->get_blog_prefix( $blog_id ). 'capabilities'; 318 318 319 $roles = get_user_meta( $user_id, $key, true );319 $roles = bp_get_user_meta( $user_id, $key, true ); 320 320 321 321 if ( is_array( $roles ) ) -
trunk/bp-forums/bp-forums-bbpress-sa.php
r5729 r5796 102 102 $site_admins = get_site_option( 'site_admins', array('admin') ); 103 103 foreach ( (array) $site_admins as $site_admin ) 104 update_user_meta( bp_core_get_userid( $site_admin ), $bb_table_prefix . 'capabilities', array( 'keymaster' => true ) );104 bp_update_user_meta( bp_core_get_userid( $site_admin ), $bb_table_prefix . 'capabilities', array( 'keymaster' => true ) ); 105 105 106 106 // Create the first forum. … … 129 129 extract( $args, EXTR_SKIP ); 130 130 131 return update_user_meta( $id, $meta_key, $meta_value );131 return bp_update_user_meta( $id, $meta_key, $meta_value ); 132 132 } 133 133 } -
trunk/bp-forums/bp-forums-functions.php
r5729 r5796 611 611 return $allcaps; 612 612 613 $bb_cap = get_user_meta( bp_loggedin_user_id(), $bb_table_prefix . 'capabilities', true );613 $bb_cap = bp_get_user_meta( bp_loggedin_user_id(), $bb_table_prefix . 'capabilities', true ); 614 614 615 615 if ( empty( $bb_cap ) ) -
trunk/bp-members/bp-members-functions.php
r5782 r5796 1074 1074 // Add the user's fullname to Xprofile 1075 1075 if ( bp_is_active( 'xprofile' ) ) { 1076 $firstname = get_user_meta( $user_id, 'first_name', true );1077 $lastname = ' ' . get_user_meta( $user_id, 'last_name', true );1076 $firstname = bp_get_user_meta( $user_id, 'first_name', true ); 1077 $lastname = ' ' . bp_get_user_meta( $user_id, 'last_name', true ); 1078 1078 $name = $firstname . $lastname; 1079 1079 1080 1080 if ( empty( $name ) || ' ' == $name ) 1081 $name = get_user_meta( $user_id, 'nickname', true );1081 $name = bp_get_user_meta( $user_id, 'nickname', true ); 1082 1082 1083 1083 xprofile_set_field_data( 1, $user_id, $name ); -
trunk/bp-xprofile/bp-xprofile-classes.php
r5794 r5796 290 290 291 291 // Get the user's visibility level preferences 292 $visibility_levels = get_user_meta( $user_id, 'bp_xprofile_visibility_levels', true );292 $visibility_levels = bp_get_user_meta( $user_id, 'bp_xprofile_visibility_levels', true ); 293 293 294 294 foreach( (array)$fields as $key => $field ) { -
trunk/bp-xprofile/bp-xprofile-functions.php
r5793 r5796 271 271 272 272 // Stored in an array in usermeta 273 $current_visibility_levels = get_user_meta( $user_id, 'bp_xprofile_visibility_levels', true );273 $current_visibility_levels = bp_get_user_meta( $user_id, 'bp_xprofile_visibility_levels', true ); 274 274 275 275 if ( !$current_visibility_levels ) { … … 279 279 $current_visibility_levels[$field_id] = $visibility_level; 280 280 281 return update_user_meta( $user_id, 'bp_xprofile_visibility_levels', $current_visibility_levels );281 return bp_update_user_meta( $user_id, 'bp_xprofile_visibility_levels', $current_visibility_levels ); 282 282 } 283 283 … … 442 442 } 443 443 444 update_user_meta( $user_id, 'nickname', $fullname );445 update_user_meta( $user_id, 'first_name', $firstname );446 update_user_meta( $user_id, 'last_name', $lastname );444 bp_update_user_meta( $user_id, 'nickname', $fullname ); 445 bp_update_user_meta( $user_id, 'first_name', $firstname ); 446 bp_update_user_meta( $user_id, 'last_name', $lastname ); 447 447 448 448 $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->users} SET display_name = %s WHERE ID = %d", $fullname, $user_id ) ); … … 476 476 * @package BuddyPress XProfile 477 477 * @param $user_id The ID of the deleted user 478 * @uses get_user_meta() Get a user meta value based on meta key from wp_usermeta479 * @uses delete_user_meta() Delete user meta value based on meta key from wp_usermeta478 * @uses bp_get_user_meta() Get a user meta value based on meta key from wp_usermeta 479 * @uses bp_delete_user_meta() Delete user meta value based on meta key from wp_usermeta 480 480 * @uses delete_data_for_user() Removes all profile data from the xprofile tables for the user 481 481 */ … … 484 484 485 485 // delete any avatar files. 486 @unlink( get_user_meta( $user_id, 'bp_core_avatar_v1_path', true ) );487 @unlink( get_user_meta( $user_id, 'bp_core_avatar_v2_path', true ) );486 @unlink( bp_get_user_meta( $user_id, 'bp_core_avatar_v1_path', true ) ); 487 @unlink( bp_get_user_meta( $user_id, 'bp_core_avatar_v2_path', true ) ); 488 488 489 489 // unset the usermeta for avatars from the usermeta table. 490 delete_user_meta( $user_id, 'bp_core_avatar_v1' );491 delete_user_meta( $user_id, 'bp_core_avatar_v1_path' );492 delete_user_meta( $user_id, 'bp_core_avatar_v2' );493 delete_user_meta( $user_id, 'bp_core_avatar_v2_path' );490 bp_delete_user_meta( $user_id, 'bp_core_avatar_v1' ); 491 bp_delete_user_meta( $user_id, 'bp_core_avatar_v1_path' ); 492 bp_delete_user_meta( $user_id, 'bp_core_avatar_v2' ); 493 bp_delete_user_meta( $user_id, 'bp_core_avatar_v2_path' ); 494 494 } 495 495 add_action( 'wpmu_delete_user', 'xprofile_remove_data' ); … … 721 721 } 722 722 723 $user_visibility_levels = get_user_meta( $user_id, 'bp_xprofile_visibility_levels', true );723 $user_visibility_levels = bp_get_user_meta( $user_id, 'bp_xprofile_visibility_levels', true ); 724 724 725 725 $field_ids = array();
Note: See TracChangeset
for help on using the changeset viewer.