Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
06/24/2011 06:52:57 PM (14 years ago)
Author:
boonebgorges
Message:

Introduces bp_x_user_meta() wrapper functions. Refactors internal user_meta calls to use the new functions. Fixes #3299

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-groups/bp-groups-notifications.php

    r4372 r4558  
    1010    $user_ids = BP_Groups_Member::get_group_member_ids( $group->id );
    1111    foreach ( (array)$user_ids as $user_id ) {
    12         if ( 'no' == get_user_meta( $user_id, bp_get_user_meta_key( 'notification_groups_group_updated' ), true ) ) continue;
     12        if ( 'no' == bp_get_user_meta( $user_id, 'notification_groups_group_updated', true ) ) continue;
    1313
    1414        $ud = bp_core_get_core_userdata( $user_id );
     
    4848    bp_members_add_notification( $requesting_user_id, $admin_id, 'groups', 'new_membership_request', $group_id );
    4949
    50     if ( 'no' == get_user_meta( $admin_id, bp_get_user_meta_key( 'notification_groups_membership_request' ), true ) )
     50    if ( 'no' == bp_get_user_meta( $admin_id, 'notification_groups_membership_request', true ) )
    5151        return false;
    5252
     
    100100        bp_members_add_notification( $group_id, $requesting_user_id, 'groups', 'membership_request_rejected' );
    101101
    102     if ( 'no' == get_user_meta( $requesting_user_id, bp_get_user_meta_key( 'notification_membership_request_completed' ), true ) )
     102    if ( 'no' == bp_get_user_meta( $requesting_user_id, 'notification_membership_request_completed', true ) )
    103103        return false;
    104104
     
    161161    bp_members_add_notification( $group_id, $user_id, 'groups', $type );
    162162
    163     if ( 'no' == get_user_meta( $user_id, bp_get_user_meta_key( 'notification_groups_admin_promotion' ), true ) )
     163    if ( 'no' == bp_get_user_meta( $user_id, 'notification_groups_admin_promotion', true ) )
    164164        return false;
    165165
     
    211211        bp_members_add_notification( $group->id, $invited_user_id, 'groups', 'group_invite' );
    212212
    213         if ( 'no' == get_user_meta( $invited_user_id, bp_get_user_meta_key( 'notification_groups_invite' ), true ) )
     213        if ( 'no' == bp_get_user_meta( $invited_user_id, 'notification_groups_invite', true ) )
    214214            return false;
    215215
     
    272272
    273273        // Now email the user with the contents of the message (if they have enabled email notifications)
    274         if ( 'no' != get_user_meta( $user_id, bp_get_user_meta_key( 'notification_activity_new_mention' ), true ) ) {
     274        if ( 'no' != bp_get_user_meta( $user_id, 'notification_activity_new_mention', true ) ) {
    275275            $poster_name = bp_core_get_user_displayname( $poster_user_id );
    276276
Note: See TracChangeset for help on using the changeset viewer.