Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
12/27/2009 01:04:36 PM (16 years ago)
Author:
apeatling
Message:

Added support for marking an activity as a favorite.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity/bp-activity-classes.php

    r2168 r2212  
    433433    }
    434434
     435    function total_favorite_count( $user_id ) {
     436        global $bp;
     437
     438        if ( !$favorite_activity_entries = get_usermeta( $user_id, 'bp_favorite_activities' ) )
     439            return 0;
     440
     441        return count( maybe_unserialize( $favorite_activity_entries ) );
     442    }
     443
    435444    function check_exists_by_content( $content ) {
    436445        global $wpdb, $bp;
Note: See TracChangeset for help on using the changeset viewer.