Changeset 2618
- Timestamp:
- 02/07/2010 03:39:34 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-blogs.php
r2617 r2618 608 608 $blogs = BP_Blogs_Blog::get_all(); 609 609 $count = $blogs['total']; 610 wp_cache_set( 'bp_total_blogs', $count, 'bp' ); 610 611 } 611 612 return $count; … … 618 619 $user_id = ( $bp->displayed_user->id ) ? $bp->displayed_user->id : $bp->loggedin_user->id; 619 620 620 if ( !$count = wp_cache_get( 'bp_total_blogs_for_user_' . $user_id, 'bp' ) ) 621 if ( !$count = wp_cache_get( 'bp_total_blogs_for_user_' . $user_id, 'bp' ) ) { 621 622 $count = BP_Blogs_Blog::total_blog_count_for_user( $user_id ); 623 wp_cache_set( 'bp_total_blogs_for_user_' . $user_id, $count, 'bp' ); 624 } 622 625 623 626 return $count; -
trunk/bp-core.php
r2617 r2618 1045 1045 $ud = bp_core_get_core_userdata($uid); 1046 1046 $email = $ud->user_email; 1047 } 1048 1049 wp_cache_set( 'bp_user_email_' . $uid, $email, 'bp' ); 1047 wp_cache_set( 'bp_user_email_' . $uid, $email, 'bp' ); 1048 } 1050 1049 1051 1050 return apply_filters( 'bp_core_get_user_email', $email ); … … 1205 1204 $status_sql = bp_core_get_status_sql(); 1206 1205 $count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(ID) FROM " . CUSTOM_USER_TABLE . " WHERE {$status_sql}" ) ); 1206 wp_cache_set( 'bp_total_member_count', $count, 'bp' ); 1207 1207 } 1208 1208 -
trunk/bp-friends.php
r2617 r2618 485 485 $count = get_usermeta( $user_id, 'total_friend_count' ); 486 486 if ( empty( $count ) ) $count = 0; 487 wp_cache_set( 'bp_total_friend_count_' . $user_id, $count, 'bp' ); 487 488 } 488 489 -
trunk/bp-groups.php
r2617 r2618 1750 1750 1751 1751 function groups_get_total_group_count() { 1752 if ( !$count = wp_cache_get( 'bp_total_group_count', 'bp' ) ) 1752 if ( !$count = wp_cache_get( 'bp_total_group_count', 'bp' ) ) { 1753 1753 $count = BP_Groups_Group::get_total_group_count(); 1754 wp_cache_set( 'bp_total_group_count', $count, 'bp' ); 1755 } 1754 1756 1755 1757 return $count; … … 1798 1800 $user_id = ( $bp->displayed_user->id ) ? $bp->displayed_user->id : $bp->loggedin_user->id; 1799 1801 1800 if ( !$count = wp_cache_get( 'bp_total_groups_for_user_' . $user_id, 'bp' ) ) 1802 if ( !$count = wp_cache_get( 'bp_total_groups_for_user_' . $user_id, 'bp' ) ) { 1801 1803 $count = BP_Groups_Member::total_group_count( $user_id ); 1804 wp_cache_set( 'bp_total_groups_for_user_' . $user_id, $count, 'bp' ); 1805 } 1802 1806 1803 1807 return $count;
Note: See TracChangeset
for help on using the changeset viewer.