Skip to:
Content

BuddyPress.org

Ticket #2523: 2523.001.diff

File 2523.001.diff, 51.0 KB (added by cnorris23, 15 years ago)
  • bp-friends.php

     
    155155                        <tr>
    156156                                <td></td>
    157157                                <td><?php _e( 'A member sends you a friendship request', 'buddypress' ) ?></td>
    158                                 <td class="yes"><input type="radio" name="notifications[notification_friends_friendship_request]" value="yes" <?php if ( !get_usermeta( $current_user->id,'notification_friends_friendship_request') || 'yes' == get_usermeta( $current_user->id,'notification_friends_friendship_request') ) { ?>checked="checked" <?php } ?>/></td>
    159                                 <td class="no"><input type="radio" name="notifications[notification_friends_friendship_request]" value="no" <?php if ( get_usermeta( $current_user->id,'notification_friends_friendship_request') == 'no' ) { ?>checked="checked" <?php } ?>/></td>
     158                                <td class="yes"><input type="radio" name="notifications[notification_friends_friendship_request]" value="yes" <?php if ( !get_user_meta( $current_user->id, 'notification_friends_friendship_request', true ) || 'yes' == get_user_meta( $current_user->id, 'notification_friends_friendship_request', true ) ) { ?>checked="checked" <?php } ?>/></td>
     159                                <td class="no"><input type="radio" name="notifications[notification_friends_friendship_request]" value="no" <?php if ( get_user_meta( $current_user->id, 'notification_friends_friendship_request', true ) == 'no' ) { ?>checked="checked" <?php } ?>/></td>
    160160                        </tr>
    161161                        <tr>
    162162                                <td></td>
    163163                                <td><?php _e( 'A member accepts your friendship request', 'buddypress' ) ?></td>
    164                                 <td class="yes"><input type="radio" name="notifications[notification_friends_friendship_accepted]" value="yes" <?php if ( !get_usermeta( $current_user->id,'notification_friends_friendship_accepted') || 'yes' == get_usermeta( $current_user->id,'notification_friends_friendship_accepted') ) { ?>checked="checked" <?php } ?>/></td>
    165                                 <td class="no"><input type="radio" name="notifications[notification_friends_friendship_accepted]" value="no" <?php if ( 'no' == get_usermeta( $current_user->id,'notification_friends_friendship_accepted') ) { ?>checked="checked" <?php } ?>/></td>
     164                                <td class="yes"><input type="radio" name="notifications[notification_friends_friendship_accepted]" value="yes" <?php if ( !get_user_meta( $current_user->id, 'notification_friends_friendship_accepted', true ) || 'yes' == get_user_meta( $current_user->id, 'notification_friends_friendship_accepted', true ) ) { ?>checked="checked" <?php } ?>/></td>
     165                                <td class="no"><input type="radio" name="notifications[notification_friends_friendship_accepted]" value="no" <?php if ( 'no' == get_user_meta( $current_user->id, 'notification_friends_friendship_accepted', true ) ) { ?>checked="checked" <?php } ?>/></td>
    166166                        </tr>
    167167
    168168                        <?php do_action( 'friends_screen_notification_settings' ); ?>
     
    487487                $user_id = ( $bp->displayed_user->id ) ? $bp->displayed_user->id : $bp->loggedin_user->id;
    488488
    489489        if ( !$count = wp_cache_get( 'bp_total_friend_count_' . $user_id, 'bp' ) ) {
    490                 $count = get_usermeta( $user_id, 'total_friend_count' );
     490                $count = get_user_meta( $user_id, 'total_friend_count', true );
    491491                if ( empty( $count ) ) $count = 0;
    492492                wp_cache_set( 'bp_total_friend_count_' . $user_id, $count, 'bp' );
    493493        }
     
    590590
    591591function friends_update_friend_totals( $initiator_user_id, $friend_user_id, $status = 'add' ) {
    592592        if ( 'add' == $status ) {
    593                 update_usermeta( $initiator_user_id, 'total_friend_count', (int)get_usermeta( $initiator_user_id, 'total_friend_count' ) + 1 );
    594                 update_usermeta( $friend_user_id, 'total_friend_count', (int)get_usermeta( $friend_user_id, 'total_friend_count' ) + 1 );
     593                update_user_meta( $initiator_user_id, 'total_friend_count', (int)get_user_meta( $initiator_user_id, 'total_friend_count', true ) + 1 );
     594                update_user_meta( $friend_user_id, 'total_friend_count', (int)get_user_meta( $friend_user_id, 'total_friend_count', true ) + 1 );
    595595        } else {
    596                 update_usermeta( $initiator_user_id, 'total_friend_count', (int)get_usermeta( $initiator_user_id, 'total_friend_count' ) - 1 );
    597                 update_usermeta( $friend_user_id, 'total_friend_count', (int)get_usermeta( $friend_user_id, 'total_friend_count' ) - 1 );
     596                update_user_meta( $initiator_user_id, 'total_friend_count', (int)get_user_meta( $initiator_user_id, 'total_friend_count', true ) - 1 );
     597                update_user_meta( $friend_user_id, 'total_friend_count', (int)get_user_meta( $friend_user_id, 'total_friend_count', true ) - 1 );
    598598        }
    599599}
    600600
     
    602602        BP_Friends_Friendship::delete_all_for_user($user_id);
    603603
    604604        /* Remove usermeta */
    605         delete_usermeta( $user_id, 'total_friend_count' );
     605        delete_user_meta( $user_id, 'total_friend_count' );
    606606
    607607        /* Remove friendship requests FROM user */
    608608        bp_core_delete_notifications_from_user( $user_id, $bp->friends->id, 'friendship_request' );
  • bp-activity.php

     
    275275                        <tr>
    276276                                <td></td>
    277277                                <td><?php printf( __( 'A member mentions you in an update using "@%s"', 'buddypress' ), bp_core_get_username( $bp->loggedin_user->id, $bp->loggedin_user->userdata->user_nicename, $bp->loggedin_user->userdata->user_login ) ) ?></td>
    278                                 <td class="yes"><input type="radio" name="notifications[notification_activity_new_mention]" value="yes" <?php if ( !get_usermeta( $bp->loggedin_user->id, 'notification_activity_new_mention' ) || 'yes' == get_usermeta( $bp->loggedin_user->id, 'notification_activity_new_mention' ) ) { ?>checked="checked" <?php } ?>/></td>
    279                                 <td class="no"><input type="radio" name="notifications[notification_activity_new_mention]" value="no" <?php if ( 'no' == get_usermeta( $bp->loggedin_user->id, 'notification_activity_new_mention' ) ) { ?>checked="checked" <?php } ?>/></td>
     278                                <td class="yes"><input type="radio" name="notifications[notification_activity_new_mention]" value="yes" <?php if ( !get_user_meta( $bp->loggedin_user->id, 'notification_activity_new_mention', true ) || 'yes' == get_user_meta( $bp->loggedin_user->id, 'notification_activity_new_mention', true ) ) { ?>checked="checked" <?php } ?>/></td>
     279                                <td class="no"><input type="radio" name="notifications[notification_activity_new_mention]" value="no" <?php if ( 'no' == get_user_meta( $bp->loggedin_user->id, 'notification_activity_new_mention', true ) ) { ?>checked="checked" <?php } ?>/></td>
    280280                        </tr>
    281281                        <tr>
    282282                                <td></td>
    283283                                <td><?php printf( __( "A member replies to an update or comment you've posted", 'buddypress' ), $current_user->user_login ) ?></td>
    284                                 <td class="yes"><input type="radio" name="notifications[notification_activity_new_reply]" value="yes" <?php if ( !get_usermeta( $bp->loggedin_user->id, 'notification_activity_new_reply' ) || 'yes' == get_usermeta( $bp->loggedin_user->id, 'notification_activity_new_reply' ) ) { ?>checked="checked" <?php } ?>/></td>
    285                                 <td class="no"><input type="radio" name="notifications[notification_activity_new_reply]" value="no" <?php if ( 'no' == get_usermeta( $bp->loggedin_user->id, 'notification_activity_new_reply' ) ) { ?>checked="checked" <?php } ?>/></td>
     284                                <td class="yes"><input type="radio" name="notifications[notification_activity_new_reply]" value="yes" <?php if ( !get_user_meta( $bp->loggedin_user->id, 'notification_activity_new_reply', true ) || 'yes' == get_user_meta( $bp->loggedin_user->id, 'notification_activity_new_reply', true ) ) { ?>checked="checked" <?php } ?>/></td>
     285                                <td class="no"><input type="radio" name="notifications[notification_activity_new_reply]" value="no" <?php if ( 'no' == get_user_meta( $bp->loggedin_user->id, 'notification_activity_new_reply', true ) ) { ?>checked="checked" <?php } ?>/></td>
    286286                        </tr>
    287287
    288288                        <?php do_action( 'bp_activity_screen_notification_settings' ) ?>
     
    710710        ) );
    711711
    712712        /* Add this update to the "latest update" usermeta so it can be fetched anywhere. */
    713         update_usermeta( $bp->loggedin_user->id, 'bp_latest_update', array( 'id' => $activity_id, 'content' => wp_filter_kses( $content ) ) );
     713        update_user_meta( $bp->loggedin_user->id, 'bp_latest_update', array( 'id' => $activity_id, 'content' => wp_filter_kses( $content ) ) );
    714714
    715715        /* Require the notifications code so email notifications can be set on the 'bp_activity_posted_update' action. */
    716716        require_once( BP_PLUGIN_DIR . '/bp-activity/bp-activity-notifications.php' );
     
    837837        else
    838838                $user_id = $args['user_id'];
    839839
    840         $latest_update = get_usermeta( $user_id, 'bp_latest_update' );
     840        $latest_update = get_user_meta( $user_id, 'bp_latest_update', true );
    841841        if ( !empty( $latest_update ) ) {
    842842                if ( in_array( (int)$latest_update['id'], (array)$activity_ids_deleted ) )
    843                         delete_usermeta( $user_id, 'bp_latest_update' );
     843                        delete_user_meta( $user_id, 'bp_latest_update' );
    844844        }
    845845
    846846        do_action( 'bp_activity_delete', $args );
     
    991991}
    992992
    993993function bp_activity_get_user_favorites( $user_id ) {
    994         $my_favs = maybe_unserialize( get_usermeta( $user_id, 'bp_favorite_activities' ) );
     994        $my_favs = maybe_unserialize( get_user_meta( $user_id, 'bp_favorite_activities', true ) );
    995995        $existing_favs = bp_activity_get_specific( array( 'activity_ids' => $my_favs ) );
    996996
    997997        foreach( (array)$existing_favs['activities'] as $fav )
    998998                $new_favs[] = $fav->id;
    999999
    10001000        $new_favs = array_unique( (array)$new_favs );
    1001         update_usermeta( $user_id, 'bp_favorite_activities', $new_favs );
     1001        update_user_meta( $user_id, 'bp_favorite_activities', $new_favs );
    10021002
    10031003        return apply_filters( 'bp_activity_get_user_favorites', $new_favs );
    10041004}
     
    10101010                $user_id = $bp->loggedin_user->id;
    10111011
    10121012        /* Update the user's personal favorites */
    1013         $my_favs = maybe_unserialize( get_usermeta( $bp->loggedin_user->id, 'bp_favorite_activities' ) );
     1013        $my_favs = maybe_unserialize( get_user_meta( $bp->loggedin_user->id, 'bp_favorite_activities', true ) );
    10141014        $my_favs[] = $activity_id;
    10151015
    10161016        /* Update the total number of users who have favorited this activity */
     
    10211021        else
    10221022                $fav_count = 1;
    10231023
    1024         update_usermeta( $bp->loggedin_user->id, 'bp_favorite_activities', $my_favs );
     1024        update_user_meta( $bp->loggedin_user->id, 'bp_favorite_activities', $my_favs );
    10251025        bp_activity_update_meta( $activity_id, 'favorite_count', $fav_count );
    10261026
    10271027        do_action( 'bp_activity_add_user_favorite', $activity_id, $user_id );
     
    10361036                $user_id = $bp->loggedin_user->id;
    10371037
    10381038        /* Remove the fav from the user's favs */
    1039         $my_favs = maybe_unserialize( get_usermeta( $user_id, 'bp_favorite_activities' ) );
     1039        $my_favs = maybe_unserialize( get_user_meta( $user_id, 'bp_favorite_activities', true ) );
    10401040        $my_favs = array_flip( (array) $my_favs );
    10411041        unset( $my_favs[$activity_id] );
    10421042        $my_favs = array_unique( array_flip( $my_favs ) );
     
    10491049                bp_activity_update_meta( $activity_id, 'favorite_count', $fav_count );
    10501050        }
    10511051
    1052         update_usermeta( $user_id, 'bp_favorite_activities', $my_favs );
     1052        update_user_meta( $user_id, 'bp_favorite_activities', $my_favs );
    10531053
    10541054        do_action( 'bp_activity_remove_user_favorite', $activity_id, $user_id );
    10551055
     
    11711171        bp_activity_delete( array( 'user_id' => $user_id ) );
    11721172
    11731173        // Remove any usermeta
    1174         delete_usermeta( $user_id, 'bp_latest_update' );
    1175         delete_usermeta( $user_id, 'bp_favorite_activities' );
     1174        delete_user_meta( $user_id, 'bp_latest_update' );
     1175        delete_user_meta( $user_id, 'bp_favorite_activities' );
    11761176
    11771177        do_action( 'bp_activity_remove_data', $user_id );
    11781178}
  • bp-themes/bp-default/_inc/ajax.php

     
    442442        if ( !isset( $_POST['notice_id'] ) ) {
    443443                echo "-1<div id='message' class='error'><p>" . __('There was a problem closing the notice.', 'buddypress') . '</p></div>';
    444444        } else {
    445                 $notice_ids = get_usermeta( $userdata->ID, 'closed_notices' );
     445                $notice_ids = get_user_meta( $userdata->ID, 'closed_notices', true );
    446446
    447447                $notice_ids[] = (int) $_POST['notice_id'];
    448448
    449                 update_usermeta( $userdata->ID, 'closed_notices', $notice_ids );
     449                update_user_meta( $userdata->ID, 'closed_notices', $notice_ids );
    450450        }
    451451}
    452452add_action( 'wp_ajax_messages_close_notice', 'bp_dtheme_ajax_close_notice' );
  • bp-core/bp-core-signup.php

     
    424424        if ( apply_filters( 'bp_core_signup_send_activation_key', true ) ) {
    425425                if ( !bp_core_is_multisite() ) {
    426426                        $activation_key = wp_hash( $user_id );
    427                         update_usermeta( $user_id, 'activation_key', $activation_key );
     427                        update_user_meta( $user_id, 'activation_key', $activation_key );
    428428                        bp_core_signup_send_validation_email( $user_id, $user_email, $activation_key );
    429429                }
    430430        }
     
    487487                wp_new_user_notification( $user_id );
    488488
    489489                /* Remove the activation key meta */
    490                 delete_usermeta( $user_id, 'activation_key' );
     490                delete_user_meta( $user_id, 'activation_key' );
    491491        }
    492492
    493493        /* Update the user_url and display_name */
    494494        wp_update_user( array( 'ID' => $user_id, 'user_url' => bp_core_get_user_domain( $user_id, sanitize_title( $user_login ), $user_login ), 'display_name' => bp_core_get_user_displayname( $user_id ) ) );
    495495
    496496        /* Add a last active entry */
    497         update_usermeta( $user_id, 'last_activity', gmdate( "Y-m-d H:i:s" ) );
     497        update_user_meta( $user_id, 'last_activity', gmdate( "Y-m-d H:i:s" ) );
    498498
    499499        /* Set the password on multisite installs */
    500500        if ( bp_core_is_multisite() && !empty( $user['meta']['password'] ) )
     
    537537                return false;
    538538
    539539        /* Add a last active entry */
    540         update_usermeta( $user_id, 'last_activity', gmdate( "Y-m-d H:i:s" ) );
     540        update_user_meta( $user_id, 'last_activity', gmdate( "Y-m-d H:i:s" ) );
    541541
    542542        /* Add the user's fullname to Xprofile */
    543543        if ( function_exists( 'xprofile_set_field_data' ) ) {
    544                 $firstname = get_usermeta( $user_id, 'first_name' );
    545                 $lastname = ' ' . get_usermeta( $user_id, 'last_name' );
     544                $firstname = get_user_meta( $user_id, 'first_name', true );
     545                $lastname = ' ' . get_user_meta( $user_id, 'last_name', true );
    546546                $name = $firstname . $lastname;
    547547
    548548                if ( empty( $name ) || ' ' == $name )
    549                         $name = get_usermeta( $user_id, 'nickname' );
     549                        $name = get_user_meta( $user_id, 'nickname', true );
    550550
    551551                xprofile_set_field_data( 1, $user_id, $name );
    552552        }
  • bp-core/bp-core-templatetags.php

     
    13311331        if ( !$user_id )
    13321332                $user_id = $bp->displayed_user->id;
    13331333
    1334         $last_activity = bp_core_get_last_activity( get_usermeta( $user_id, 'last_activity' ), __('active %s ago', 'buddypress') );
     1334        $last_activity = bp_core_get_last_activity( get_user_meta( $user_id, 'last_activity', true ), __('active %s ago', 'buddypress') );
    13351335
    13361336        if ( $echo )
    13371337                echo apply_filters( 'bp_last_activity', $last_activity );
  • bp-core/bp-core-classes.php

     
    5050         * @uses bp_core_get_userurl() Returns the URL with no HTML markup for a user based on their user id
    5151         * @uses bp_core_get_userlink() Returns a HTML formatted link for a user with the user's full name as the link text
    5252         * @uses bp_core_get_user_email() Returns the email address for the user based on user ID
    53          * @uses get_usermeta() WordPress function returns the value of passed usermeta name from usermeta table
     53         * @uses get_user_meta() WordPress function returns the value of passed usermeta name from usermeta table
    5454         * @uses bp_core_fetch_avatar() Returns HTML formatted avatar for a user
    5555         * @uses bp_profile_last_updated_date() Returns the last updated date for a user.
    5656         */
     
    7979                $this->avatar_thumb = bp_core_fetch_avatar( array( 'item_id' => $this->id, 'type' => 'thumb' ) );
    8080                $this->avatar_mini = bp_core_fetch_avatar( array( 'item_id' => $this->id, 'type' => 'thumb', 'width' => 30, 'height' => 30 ) );
    8181
    82                 $this->last_active = bp_core_get_last_activity( get_usermeta( $this->id, 'last_activity' ), __( 'active %s ago', 'buddypress' ) );
     82                $this->last_active = bp_core_get_last_activity( get_user_meta( $this->id, 'last_activity', true ), __( 'active %s ago', 'buddypress' ) );
    8383        }
    8484
    8585        function populate_extras() {
  • bp-core/bp-core-settings.php

     
    114114
    115115                if ( $_POST['notifications'] ) {
    116116                        foreach ( (array)$_POST['notifications'] as $key => $value ) {
    117                                 update_usermeta( (int)$current_user->id, $key, $value );
     117                                update_user_meta( (int)$current_user->id, $key, $value );
    118118                        }
    119119                }
    120120
  • bp-xprofile/bp-xprofile-templatetags.php

     
    646646        function bp_get_profile_last_updated() {
    647647                global $bp;
    648648
    649                 $last_updated = get_usermeta( $bp->displayed_user->id, 'profile_last_updated' );
     649                $last_updated = get_user_meta( $bp->displayed_user->id, 'profile_last_updated', true );
    650650
    651651                if ( $last_updated )
    652652                        return apply_filters( 'bp_get_profile_last_updated', sprintf( __('Profile updated %s ago', 'buddypress'), bp_core_time_since( strtotime( $last_updated ) ) ) );
  • bp-friends/bp-friends-notifications.php

     
    55
    66        $initiator_name = bp_core_get_user_displayname( $initiator_id );
    77
    8         if ( 'no' == get_usermeta( (int)$friend_id, 'notification_friends_friendship_request' ) )
     8        if ( 'no' == get_user_meta( (int)$friend_id, 'notification_friends_friendship_request', true ) )
    99                return false;
    1010
    1111        $ud = get_userdata( $friend_id );
     
    1818
    1919        // Set up and send the message
    2020        $to = $ud->user_email;
    21         $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( 'New friendship request from %s', 'buddypress' ), $initiator_name );
     21        $subject = '[' . wp_specialchars_decode( get_blog_option( BP_ROOT_BLOG, 'blogname' ) ) . '] ' . sprintf( __( 'New friendship request from %s', 'buddypress' ), $initiator_name );
    2222
    2323        $message = sprintf( __(
    2424"%s wants to add you as a friend.
     
    4747
    4848        $friend_name = bp_core_get_user_displayname( $friend_id );
    4949
    50         if ( 'no' == get_usermeta( (int)$initiator_id, 'notification_friends_friendship_accepted' ) )
     50        if ( 'no' == get_user_meta( (int)$initiator_id, 'notification_friends_friendship_accepted', true ) )
    5151                return false;
    5252
    5353        $ud = get_userdata( $initiator_id );
     
    5757
    5858        // Set up and send the message
    5959        $to = $ud->user_email;
    60         $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( '%s accepted your friendship request', 'buddypress' ), $friend_name );
     60        $subject = '[' . wp_specialchars_decode( get_blog_option( BP_ROOT_BLOG, 'blogname' ) ) . '] ' . sprintf( __( '%s accepted your friendship request', 'buddypress' ), $friend_name );
    6161
    6262        $message = sprintf( __(
    6363'%s accepted your friend request.
  • bp-friends/bp-friends-classes.php

     
    127127                $count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(id) FROM {$bp->friends->table_name} WHERE (initiator_user_id = %d OR friend_user_id = %d) AND is_confirmed = 1", $user_id, $user_id ) );
    128128
    129129                // Do not update meta if user has never had friends
    130                 if ( !$count && !get_usermeta( $user_id, 'total_friend_count' ) )
     130                if ( !$count && !get_user_meta( $user_id, 'total_friend_count', true ) )
    131131                        return 0;
    132132
    133                 update_usermeta( $user_id, 'total_friend_count', (int)$count );
     133                update_user_meta( $user_id, 'total_friend_count', (int)$count );
    134134                return (int)$count;
    135135        }
    136136
  • bp-activity/bp-activity-filters.php

     
    114114                        continue;
    115115
    116116                /* Increase the number of new @ mentions for the user */
    117                 $new_mention_count = (int)get_usermeta( $user_id, 'bp_new_mention_count' );
    118                 update_usermeta( $user_id, 'bp_new_mention_count', $new_mention_count + 1 );
     117                $new_mention_count = (int)get_user_meta( $user_id, 'bp_new_mention_count', true );
     118                update_user_meta( $user_id, 'bp_new_mention_count', $new_mention_count + 1 );
    119119
    120120                $content = str_replace( "@$username", "<a href='" . bp_core_get_user_domain( bp_core_get_userid( $username ) ) . "' rel='nofollow'>@$username</a>", $content );
    121121        }
  • bp-activity/bp-activity-notifications.php

     
    1616                        continue;
    1717
    1818                // Now email the user with the contents of the message (if they have enabled email notifications)
    19                 if ( 'no' != get_usermeta( $receiver_user_id, 'notification_activity_new_mention' ) ) {
     19                if ( 'no' != get_user_meta( $receiver_user_id, 'notification_activity_new_mention', true ) ) {
    2020                        $poster_name = bp_core_get_user_displayname( $poster_user_id );
    2121
    2222                        $message_link = bp_activity_get_permalink( $activity_id );
     
    2828                        // Set up and send the message
    2929                        $ud = bp_core_get_core_userdata( $receiver_user_id );
    3030                        $to = $ud->user_email;
    31                         $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( '%s mentioned you in an update', 'buddypress' ), $poster_name );
     31                        $subject = '[' . wp_specialchars_decode( get_blog_option( BP_ROOT_BLOG, 'blogname' ) ) . '] ' . sprintf( __( '%s mentioned you in an update', 'buddypress' ), $poster_name );
    3232
    3333$message = sprintf( __(
    3434'%s mentioned you in an update:
     
    6060
    6161        $original_activity = new BP_Activity_Activity( $activity_id );
    6262
    63         if ( $original_activity->user_id != $commenter_id && 'no' != get_usermeta( $original_activity->user_id, 'notification_activity_new_reply' ) ) {
     63        if ( $original_activity->user_id != $commenter_id && 'no' != get_user_meta( $original_activity->user_id, 'notification_activity_new_reply', true ) ) {
    6464                $poster_name = bp_core_get_user_displayname( $commenter_id );
    6565                $thread_link = bp_activity_get_permalink( $activity_id );
    6666                $settings_link = bp_core_get_user_domain( $original_activity->user_id ) .  BP_SETTINGS_SLUG . '/notifications/';
     
    7171                // Set up and send the message
    7272                $ud = bp_core_get_core_userdata( $original_activity->user_id );
    7373                $to = $ud->user_email;
    74                 $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( '%s replied to one of your updates', 'buddypress' ), $poster_name );
     74                $subject = '[' . wp_specialchars_decode( get_blog_option( BP_ROOT_BLOG, 'blogname' ) ) . '] ' . sprintf( __( '%s replied to one of your updates', 'buddypress' ), $poster_name );
    7575
    7676$message = sprintf( __(
    7777'%s replied to one of your updates:
     
    102102
    103103        $parent_comment = new BP_Activity_Activity( $parent_id );
    104104
    105         if ( $parent_comment->user_id != $commenter_id && $original_activity->user_id != $parent_comment->user_id && 'no' != get_usermeta( $parent_comment->user_id, 'notification_activity_new_reply' ) ) {
     105        if ( $parent_comment->user_id != $commenter_id && $original_activity->user_id != $parent_comment->user_id && 'no' != get_user_meta( $parent_comment->user_id, 'notification_activity_new_reply', true ) ) {
    106106                $poster_name = bp_core_get_user_displayname( $commenter_id );
    107107                $thread_link = bp_activity_get_permalink( $activity_id );
    108108                $settings_link = bp_core_get_user_domain( $parent_comment->user_id ) .  BP_SETTINGS_SLUG . '/notifications/';
     
    110110                // Set up and send the message
    111111                $ud = bp_core_get_core_userdata( $parent_comment->user_id );
    112112                $to = $ud->user_email;
    113                 $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( '%s replied to one of your comments', 'buddypress' ), $poster_name );
     113                $subject = '[' . wp_specialchars_decode( get_blog_option( BP_ROOT_BLOG, 'blogname' ) ) . '] ' . sprintf( __( '%s replied to one of your comments', 'buddypress' ), $poster_name );
    114114
    115115                $poster_name = stripslashes( $poster_name );
    116116                $content = bp_activity_filter_kses( stripslashes( $content ) );
  • bp-activity/bp-activity-templatetags.php

     
    2525                $this->disable_blogforum_replies = $bp->site_options['bp-disable-blogforum-comments'];
    2626
    2727                /* Get an array of the logged in user's favorite activities */
    28                 $this->my_favs = maybe_unserialize( get_usermeta( $bp->loggedin_user->id, 'bp_favorite_activities' ) );
     28                $this->my_favs = maybe_unserialize( get_user_meta( $bp->loggedin_user->id, 'bp_favorite_activities', true ) );
    2929
    3030                if ( !empty( $include ) ) {
    3131                        /* Fetch specific activity items based on ID's */
     
    729729                if ( !$user_id )
    730730                        $user_id = $bp->displayed_user->id;
    731731
    732                 if ( !$update = get_usermeta( $user_id, 'bp_latest_update' ) )
     732                if ( !$update = get_user_meta( $user_id, 'bp_latest_update', true ) )
    733733                        return false;
    734734
    735735                $latest_update = '&quot;' . apply_filters( 'bp_get_activity_latest_update_excerpt', trim( strip_tags( bp_create_excerpt( $update['content'], 40 ) ) ) ) . '&quot;';
     
    831831        echo bp_get_total_favorite_count_for_user( $user_id );
    832832}
    833833        function bp_get_total_mention_count_for_user( $user_id = false ) {
    834                 return apply_filters( 'bp_get_total_mention_count_for_user', get_usermeta( $user_id, 'bp_new_mention_count' ) );
     834                return apply_filters( 'bp_get_total_mention_count_for_user', get_user_meta( $user_id, 'bp_new_mention_count', true ) );
    835835        }
    836836
    837837function bp_send_public_message_link() {
  • bp-activity/bp-activity-classes.php

     
    531531        function total_favorite_count( $user_id ) {
    532532                global $bp;
    533533
    534                 if ( !$favorite_activity_entries = get_usermeta( $user_id, 'bp_favorite_activities' ) )
     534                if ( !$favorite_activity_entries = get_user_meta( $user_id, 'bp_favorite_activities', true ) )
    535535                        return 0;
    536536
    537537                return count( maybe_unserialize( $favorite_activity_entries ) );
  • bp-messages.php

     
    249249                        <tr>
    250250                                <td></td>
    251251                                <td><?php _e( 'A member sends you a new message', 'buddypress' ) ?></td>
    252                                 <td class="yes"><input type="radio" name="notifications[notification_messages_new_message]" value="yes" <?php if ( !get_usermeta( $current_user->id, 'notification_messages_new_message' ) || 'yes' == get_usermeta( $current_user->id, 'notification_messages_new_message' ) ) { ?>checked="checked" <?php } ?>/></td>
    253                                 <td class="no"><input type="radio" name="notifications[notification_messages_new_message]" value="no" <?php if ( 'no' == get_usermeta( $current_user->id, 'notification_messages_new_message' ) ) { ?>checked="checked" <?php } ?>/></td>
     252                                <td class="yes"><input type="radio" name="notifications[notification_messages_new_message]" value="yes" <?php if ( !get_user_meta( $current_user->id, 'notification_messages_new_message', true ) || 'yes' == get_user_meta( $current_user->id, 'notification_messages_new_message', true ) ) { ?>checked="checked" <?php } ?>/></td>
     253                                <td class="no"><input type="radio" name="notifications[notification_messages_new_message]" value="no" <?php if ( 'no' == get_user_meta( $current_user->id, 'notification_messages_new_message', true ) ) { ?>checked="checked" <?php } ?>/></td>
    254254                        </tr>
    255255                        <tr>
    256256                                <td></td>
    257257                                <td><?php _e( 'A new site notice is posted', 'buddypress' ) ?></td>
    258                                 <td class="yes"><input type="radio" name="notifications[notification_messages_new_notice]" value="yes" <?php if ( !get_usermeta( $current_user->id, 'notification_messages_new_notice' ) || 'yes' == get_usermeta( $current_user->id, 'notification_messages_new_notice' ) ) { ?>checked="checked" <?php } ?>/></td>
    259                                 <td class="no"><input type="radio" name="notifications[notification_messages_new_notice]" value="no" <?php if ( 'no' == get_usermeta( $current_user->id, 'notification_messages_new_notice' ) ) { ?>checked="checked" <?php } ?>/></td>
     258                                <td class="yes"><input type="radio" name="notifications[notification_messages_new_notice]" value="yes" <?php if ( !get_user_meta( $current_user->id, 'notification_messages_new_notice', true ) || 'yes' == get_user_meta( $current_user->id, 'notification_messages_new_notice', true ) ) { ?>checked="checked" <?php } ?>/></td>
     259                                <td class="no"><input type="radio" name="notifications[notification_messages_new_notice]" value="no" <?php if ( 'no' == get_user_meta( $current_user->id, 'notification_messages_new_notice', true ) ) { ?>checked="checked" <?php } ?>/></td>
    260260                        </tr>
    261261
    262262                        <?php do_action( 'messages_screen_notification_settings' ) ?>
  • bp-forums.php

     
    527527function bp_forums_filter_caps( $allcaps ) {
    528528        global $bp, $wp_roles, $bb_table_prefix;
    529529
    530         $bb_cap = get_usermeta( $bp->loggedin_user->id, $bb_table_prefix . 'capabilities' );
     530        $bb_cap = get_user_meta( $bp->loggedin_user->id, $bb_table_prefix . 'capabilities', true );
    531531
    532532        if ( empty( $bb_cap ) )
    533533                return $allcaps;
  • bp-groups.php

     
    974974                        <tr>
    975975                                <td></td>
    976976                                <td><?php _e( 'A member invites you to join a group', 'buddypress' ) ?></td>
    977                                 <td class="yes"><input type="radio" name="notifications[notification_groups_invite]" value="yes" <?php if ( !get_usermeta( $current_user->id, 'notification_groups_invite') || 'yes' == get_usermeta( $current_user->id, 'notification_groups_invite') ) { ?>checked="checked" <?php } ?>/></td>
    978                                 <td class="no"><input type="radio" name="notifications[notification_groups_invite]" value="no" <?php if ( 'no' == get_usermeta( $current_user->id, 'notification_groups_invite') ) { ?>checked="checked" <?php } ?>/></td>
     977                                <td class="yes"><input type="radio" name="notifications[notification_groups_invite]" value="yes" <?php if ( !get_user_meta( $current_user->id, 'notification_groups_invite', true ) || 'yes' == get_user_meta( $current_user->id, 'notification_groups_invite', true ) ) { ?>checked="checked" <?php } ?>/></td>
     978                                <td class="no"><input type="radio" name="notifications[notification_groups_invite]" value="no" <?php if ( 'no' == get_user_meta( $current_user->id, 'notification_groups_invite', true ) ) { ?>checked="checked" <?php } ?>/></td>
    979979                        </tr>
    980980                        <tr>
    981981                                <td></td>
    982982                                <td><?php _e( 'Group information is updated', 'buddypress' ) ?></td>
    983                                 <td class="yes"><input type="radio" name="notifications[notification_groups_group_updated]" value="yes" <?php if ( !get_usermeta( $current_user->id, 'notification_groups_group_updated') || 'yes' == get_usermeta( $current_user->id, 'notification_groups_group_updated') ) { ?>checked="checked" <?php } ?>/></td>
    984                                 <td class="no"><input type="radio" name="notifications[notification_groups_group_updated]" value="no" <?php if ( 'no' == get_usermeta( $current_user->id, 'notification_groups_group_updated') ) { ?>checked="checked" <?php } ?>/></td>
     983                                <td class="yes"><input type="radio" name="notifications[notification_groups_group_updated]" value="yes" <?php if ( !get_user_meta( $current_user->id, 'notification_groups_group_updated', true ) || 'yes' == get_user_meta( $current_user->id, 'notification_groups_group_updated', true ) ) { ?>checked="checked" <?php } ?>/></td>
     984                                <td class="no"><input type="radio" name="notifications[notification_groups_group_updated]" value="no" <?php if ( 'no' == get_user_meta( $current_user->id, 'notification_groups_group_updated', true ) ) { ?>checked="checked" <?php } ?>/></td>
    985985                        </tr>
    986986                        <tr>
    987987                                <td></td>
    988988                                <td><?php _e( 'You are promoted to a group administrator or moderator', 'buddypress' ) ?></td>
    989                                 <td class="yes"><input type="radio" name="notifications[notification_groups_admin_promotion]" value="yes" <?php if ( !get_usermeta( $current_user->id, 'notification_groups_admin_promotion') || 'yes' == get_usermeta( $current_user->id, 'notification_groups_admin_promotion') ) { ?>checked="checked" <?php } ?>/></td>
    990                                 <td class="no"><input type="radio" name="notifications[notification_groups_admin_promotion]" value="no" <?php if ( 'no' == get_usermeta( $current_user->id, 'notification_groups_admin_promotion') ) { ?>checked="checked" <?php } ?>/></td>
     989                                <td class="yes"><input type="radio" name="notifications[notification_groups_admin_promotion]" value="yes" <?php if ( !get_user_meta( $current_user->id, 'notification_groups_admin_promotion', true ) || 'yes' == get_user_meta( $current_user->id, 'notification_groups_admin_promotion', true ) ) { ?>checked="checked" <?php } ?>/></td>
     990                                <td class="no"><input type="radio" name="notifications[notification_groups_admin_promotion]" value="no" <?php if ( 'no' == get_user_meta( $current_user->id, 'notification_groups_admin_promotion', true ) ) { ?>checked="checked" <?php } ?>/></td>
    991991                        </tr>
    992992                        <tr>
    993993                                <td></td>
    994994                                <td><?php _e( 'A member requests to join a private group for which you are an admin', 'buddypress' ) ?></td>
    995                                 <td class="yes"><input type="radio" name="notifications[notification_groups_membership_request]" value="yes" <?php if ( !get_usermeta( $current_user->id, 'notification_groups_membership_request') || 'yes' == get_usermeta( $current_user->id, 'notification_groups_membership_request') ) { ?>checked="checked" <?php } ?>/></td>
    996                                 <td class="no"><input type="radio" name="notifications[notification_groups_membership_request]" value="no" <?php if ( 'no' == get_usermeta( $current_user->id, 'notification_groups_membership_request') ) { ?>checked="checked" <?php } ?>/></td>
     995                                <td class="yes"><input type="radio" name="notifications[notification_groups_membership_request]" value="yes" <?php if ( !get_user_meta( $current_user->id, 'notification_groups_membership_request', true ) || 'yes' == get_user_meta( $current_user->id, 'notification_groups_membership_request', true ) ) { ?>checked="checked" <?php } ?>/></td>
     996                                <td class="no"><input type="radio" name="notifications[notification_groups_membership_request]" value="no" <?php if ( 'no' == get_user_meta( $current_user->id, 'notification_groups_membership_request', true ) ) { ?>checked="checked" <?php } ?>/></td>
    997997                        </tr>
    998998
    999999                        <?php do_action( 'groups_screen_notification_settings' ); ?>
     
    16871687        groups_update_groupmeta( $group_id, 'total_member_count', (int) groups_get_groupmeta( $group_id, 'total_member_count') - 1 );
    16881688
    16891689        /* Modify user's group memberhip count */
    1690         update_usermeta( $user_id, 'total_group_count', (int) get_usermeta( $user_id, 'total_group_count') - 1 );
     1690        update_user_meta( $user_id, 'total_group_count', (int) get_user_meta( $user_id, 'total_group_count', true ) - 1 );
    16911691
    16921692        /* If the user joined this group less than five minutes ago, remove the joined_group activity so
    16931693         * users cannot flood the activity stream by joining/leaving the group in quick succession.
     
    23372337        if ( !$member->ban() )
    23382338                return false;
    23392339
    2340         update_usermeta( $user_id, 'total_group_count', (int)$total_count - 1 );
     2340        update_user_meta( $user_id, 'total_group_count', (int)$total_count - 1 );
    23412341}
    23422342
    23432343function groups_unban_member( $user_id, $group_id ) {
  • bp-messages/bp-messages-notifications.php

     
    77        $sender_name = bp_core_get_user_displayname( $sender_id );
    88
    99        foreach( $recipients as $recipient ) {
    10                 if ( $sender_id == $recipient->user_id || 'no' == get_usermeta( $recipient->user_id, 'notification_messages_new_message' ) ) continue;
     10                if ( $sender_id == $recipient->user_id || 'no' == get_user_meta( $recipient->user_id, 'notification_messages_new_message', true ) ) continue;
    1111
    1212                $ud = get_userdata( $recipient->user_id );
    1313                $message_link = bp_core_get_user_domain( $recipient->user_id ) . BP_MESSAGES_SLUG .'/';
     
    1919
    2020                // Set up and send the message
    2121                $email_to = $ud->user_email;
    22                 $email_subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( 'New message from %s', 'buddypress' ), $sender_name );
     22                $email_subject = '[' . wp_specialchars_decode( get_blog_option( BP_ROOT_BLOG, 'blogname' ) ) . '] ' . sprintf( __( 'New message from %s', 'buddypress' ), $sender_name );
    2323
    2424                $email_content = sprintf( __(
    2525'%s sent you a new message:
  • bp-messages/bp-messages-templatetags.php

     
    272272        function bp_get_message_thread_last_post_date() {
    273273                global $messages_template;
    274274
    275                 return apply_filters( 'bp_get_message_thread_last_post_date', bp_format_time( strtotime( $messages_template->thread->last_message_date ) ) );
     275                return apply_filters( 'bp_get_message_thread_last_post_date', bp_format_time( get_date_from_gmt( $messages_template->thread->last_message_date, 'U' ) ) );
    276276        }
    277277
    278278function bp_message_thread_avatar() {
     
    456456        if ( empty( $notice ) )
    457457                return false;
    458458
    459         $closed_notices = get_usermeta( $userdata->ID, 'closed_notices' );
     459        $closed_notices = get_user_meta( $userdata->ID, 'closed_notices', true );
    460460
    461461        if ( !$closed_notices )
    462462                $closed_notices = array();
  • bp-messages/bp-messages-classes.php

     
    401401                // Now deactivate all notices apart from the new one.
    402402                $wpdb->query( $wpdb->prepare( "UPDATE {$bp->messages->table_name_notices} SET is_active = 0 WHERE id != %d", $id ) );
    403403
    404                 update_usermeta( $bp->loggedin_user->id, 'last_activity', date( 'Y-m-d H:i:s' ) );
     404                update_user_meta( $bp->loggedin_user->id, 'last_activity', date( 'Y-m-d H:i:s' ) );
    405405
    406406                do_action( 'messages_notice_after_save', $this );
    407407
  • bp-forums/bp-forums-bbpress.php

     
    103103                /* Set the site admins as the keymasters */
    104104                $site_admins = get_site_option( 'site_admins', array('admin') );
    105105                foreach ( (array)$site_admins as $site_admin )
    106                         update_usermeta( bp_core_get_userid( $site_admin ), $bb_table_prefix . 'capabilities', array( 'keymaster' => true ) );
     106                        update_user_meta( bp_core_get_userid( $site_admin ), $bb_table_prefix . 'capabilities', array( 'keymaster' => true ) );
    107107
    108108                // Create the first forum.
    109109                bb_new_forum( array( 'forum_name' => 'Default Forum' ) );
     
    130130                $args = wp_parse_args( $args, $defaults );
    131131                extract( $args, EXTR_SKIP );
    132132
    133                 return update_usermeta( $id, $meta_key, $meta_value );
     133                return update_user_meta( $id, $meta_key, $meta_value );
    134134        }
    135135}
    136136
  • bp-core.php

     
    556556 * @package BuddyPress Core
    557557 * @global $current_user WordPress global variable containing current logged in user information
    558558 * @param user_id The ID of the user.
    559  * @uses get_usermeta() WordPress function to get the usermeta for a user.
     559 * @uses get_user_meta() WordPress function to get the usermeta for a user.
    560560 */
    561561function bp_core_get_user_domain( $user_id, $user_nicename = false, $user_login = false ) {
    562562        global $bp;
     
    14751475 *
    14761476 * @package BuddyPress Core
    14771477 * @global $userdata WordPress user data for the current logged in user.
    1478  * @uses update_usermeta() WordPress function to update user metadata in the usermeta table.
     1478 * @uses update_user_meta() WordPress function to update user metadata in the usermeta table.
    14791479 */
    14801480function bp_core_record_activity() {
    14811481        global $bp;
     
    14831483        if ( !is_user_logged_in() )
    14841484                return false;
    14851485
    1486         $activity = get_usermeta( $bp->loggedin_user->id, 'last_activity' );
     1486        $activity = get_user_meta( $bp->loggedin_user->id, 'last_activity', true );
    14871487
    14881488        if ( !is_numeric( $activity ) )
    14891489                $activity = strtotime( $activity );
    14901490
    14911491        if ( '' == $activity || strtotime( gmdate( "Y-m-d H:i:s" ) ) >= strtotime( '+5 minutes', $activity ) )
    1492                 update_usermeta( $bp->loggedin_user->id, 'last_activity', gmdate( "Y-m-d H:i:s" ) );
     1492                update_user_meta( $bp->loggedin_user->id, 'last_activity', gmdate( "Y-m-d H:i:s" ) );
    14931493}
    14941494add_action( 'wp_head', 'bp_core_record_activity' );
    14951495
     
    19261926 *
    19271927 * @package BuddyPress Core
    19281928 * @param $user_id The user id for the user to delete usermeta for
    1929  * @uses delete_usermeta() deletes a row from the wp_usermeta table based on meta_key
     1929 * @uses delete_user_meta() deletes a row from the wp_usermeta table based on meta_key
    19301930 */
    19311931function bp_core_remove_data( $user_id ) {
    19321932        /* Remove usermeta */
    1933         delete_usermeta( $user_id, 'last_activity' );
     1933        delete_user_meta( $user_id, 'last_activity' );
    19341934
    19351935        /* Flush the cache to remove the user from all cached objects */
    19361936        wp_cache_flush();
  • bp-xprofile.php

     
    908908                $lastname = trim( substr( $fullname, $space, strlen($fullname) ) );
    909909        }
    910910
    911         update_usermeta( $user_id, 'nickname', $fullname );
    912         update_usermeta( $user_id, 'first_name', $firstname );
    913         update_usermeta( $user_id, 'last_name', $lastname );
     911        update_user_meta( $user_id, 'nickname', $fullname );
     912        update_user_meta( $user_id, 'first_name', $firstname );
     913        update_user_meta( $user_id, 'last_name', $lastname );
    914914
    915915        $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->users} SET display_name = %s WHERE ID = %d", $fullname, $user_id ) );
    916916        $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->users} SET user_url = %s WHERE ID = %d", bp_core_get_user_domain( $user_id ), $user_id ) );
     
    962962 *
    963963 * @package BuddyPress XProfile
    964964 * @param $user_id The ID of the deleted user
    965  * @uses get_usermeta() Get a user meta value based on meta key from wp_usermeta
    966  * @uses delete_usermeta() Delete user meta value based on meta key from wp_usermeta
     965 * @uses get_user_meta() Get a user meta value based on meta key from wp_usermeta
     966 * @uses delete_user_meta() Delete user meta value based on meta key from wp_usermeta
    967967 * @uses delete_data_for_user() Removes all profile data from the xprofile tables for the user
    968968 */
    969969function xprofile_remove_data( $user_id ) {
    970970        BP_XProfile_ProfileData::delete_data_for_user( $user_id );
    971971
    972972        // delete any avatar files.
    973         @unlink( get_usermeta( $user_id, 'bp_core_avatar_v1_path' ) );
    974         @unlink( get_usermeta( $user_id, 'bp_core_avatar_v2_path' ) );
     973        @unlink( get_user_meta( $user_id, 'bp_core_avatar_v1_path', true ) );
     974        @unlink( get_user_meta( $user_id, 'bp_core_avatar_v2_path', true ) );
    975975
    976976        // unset the usermeta for avatars from the usermeta table.
    977         delete_usermeta( $user_id, 'bp_core_avatar_v1' );
    978         delete_usermeta( $user_id, 'bp_core_avatar_v1_path' );
    979         delete_usermeta( $user_id, 'bp_core_avatar_v2' );
    980         delete_usermeta( $user_id, 'bp_core_avatar_v2_path' );
     977        delete_user_meta( $user_id, 'bp_core_avatar_v1' );
     978        delete_user_meta( $user_id, 'bp_core_avatar_v1_path' );
     979        delete_user_meta( $user_id, 'bp_core_avatar_v2' );
     980        delete_user_meta( $user_id, 'bp_core_avatar_v2_path' );
    981981}
    982982add_action( 'wpmu_delete_user', 'xprofile_remove_data' );
    983983add_action( 'delete_user', 'xprofile_remove_data' );
  • bp-groups/bp-groups-classes.php

     
    748748
    749749                groups_update_groupmeta( $this->group_id, 'total_member_count', ( (int) groups_get_groupmeta( $this->group_id, 'total_member_count' ) - 1 ) );
    750750
    751                 $group_count = get_usermeta( $this->user_id, 'total_group_count' );
     751                $group_count = get_user_meta( $this->user_id, 'total_group_count', true );
    752752                if ( !empty( $group_count ) )
    753                         update_usermeta( $this->user_id, 'total_group_count', (int)$group_count - 1 );
     753                        update_user_meta( $this->user_id, 'total_group_count', (int)$group_count - 1 );
    754754
    755755                return $this->save();
    756756        }
     
    762762                $this->is_banned = 0;
    763763
    764764                groups_update_groupmeta( $this->group_id, 'total_member_count', ( (int) groups_get_groupmeta( $this->group_id, 'total_member_count' ) + 1 ) );
    765                 update_usermeta( $this->user_id, 'total_group_count', (int)get_usermeta( $this->user_id, 'total_group_count' ) + 1 );
     765                update_user_meta( $this->user_id, 'total_group_count', (int)get_user_meta( $this->user_id, 'total_group_count', true ) + 1 );
    766766
    767767                return $this->save();
    768768        }
  • bp-groups/bp-groups-notifications.php

     
    44        global $bp;
    55
    66        $group = new BP_Groups_Group( $group_id );
    7         $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . __( 'Group Details Updated', 'buddypress' );
     7        $subject = '[' . wp_specialchars_decode( get_blog_option( BP_ROOT_BLOG, 'blogname' ) ) . '] ' . __( 'Group Details Updated', 'buddypress' );
    88
    99        $user_ids = BP_Groups_Member::get_group_member_ids( $group->id );
    1010        foreach ( (array)$user_ids as $user_id ) {
    11                 if ( 'no' == get_usermeta( $user_id, 'notification_groups_group_updated' ) ) continue;
     11                if ( 'no' == get_user_meta( $user_id, 'notification_groups_group_updated', true ) ) continue;
    1212
    1313                $ud = bp_core_get_core_userdata( $user_id );
    1414
     
    4444
    4545        bp_core_add_notification( $requesting_user_id, $admin_id, 'groups', 'new_membership_request', $group_id );
    4646
    47         if ( 'no' == get_usermeta( $admin_id, 'notification_groups_membership_request' ) )
     47        if ( 'no' == get_user_meta( $admin_id, 'notification_groups_membership_request', true ) )
    4848                return false;
    4949
    5050        $requesting_user_name = bp_core_get_user_displayname( $requesting_user_id );
     
    5959
    6060        // Set up and send the message
    6161        $to = $ud->user_email;
    62         $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( 'Membership request for group: %s', 'buddypress' ), $group->name );
     62        $subject = '[' . wp_specialchars_decode( get_blog_option( BP_ROOT_BLOG, 'blogname' ) ) . '] ' . sprintf( __( 'Membership request for group: %s', 'buddypress' ), $group->name );
    6363
    6464$message = sprintf( __(
    6565'%s wants to join the group "%s".
     
    9393        else
    9494                bp_core_add_notification( $group_id, $requesting_user_id, 'groups', 'membership_request_rejected' );
    9595
    96         if ( 'no' == get_usermeta( $requesting_user_id, 'notification_membership_request_completed' ) )
     96        if ( 'no' == get_user_meta( $requesting_user_id, 'notification_membership_request_completed', true ) )
    9797                return false;
    9898
    9999        $group = new BP_Groups_Group( $group_id );
     
    107107        $to = $ud->user_email;
    108108
    109109        if ( $accepted ) {
    110                 $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( 'Membership request for group "%s" accepted', 'buddypress' ), $group->name );
     110                $subject = '[' . wp_specialchars_decode( get_blog_option( BP_ROOT_BLOG, 'blogname' ) ) . '] ' . sprintf( __( 'Membership request for group "%s" accepted', 'buddypress' ), $group->name );
    111111                $message = sprintf( __(
    112112'Your membership request for the group "%s" has been accepted.
    113113
     
    117117', 'buddypress' ), $group->name, $group_link );
    118118
    119119        } else {
    120                 $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( 'Membership request for group "%s" rejected', 'buddypress' ), $group->name );
     120                $subject = '[' . wp_specialchars_decode( get_blog_option( BP_ROOT_BLOG, 'blogname' ) ) . '] ' . sprintf( __( 'Membership request for group "%s" rejected', 'buddypress' ), $group->name );
    121121                $message = sprintf( __(
    122122'Your membership request for the group "%s" has been rejected.
    123123
     
    151151        // Post a screen notification first.
    152152        bp_core_add_notification( $group_id, $user_id, 'groups', $type );
    153153
    154         if ( 'no' == get_usermeta( $user_id, 'notification_groups_admin_promotion' ) )
     154        if ( 'no' == get_user_meta( $user_id, 'notification_groups_admin_promotion', true ) )
    155155                return false;
    156156
    157157        $group = new BP_Groups_Group( $group_id );
     
    163163        // Set up and send the message
    164164        $to = $ud->user_email;
    165165
    166         $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( 'You have been promoted in the group: "%s"', 'buddypress' ), $group->name );
     166        $subject = '[' . wp_specialchars_decode( get_blog_option( BP_ROOT_BLOG, 'blogname' ) ) . '] ' . sprintf( __( 'You have been promoted in the group: "%s"', 'buddypress' ), $group->name );
    167167
    168168        $message = sprintf( __(
    169169'You have been promoted to %s for the group: "%s".
     
    199199                // Post a screen notification first.
    200200                bp_core_add_notification( $group->id, $invited_user_id, 'groups', 'group_invite' );
    201201
    202                 if ( 'no' == get_usermeta( $invited_user_id, 'notification_groups_invite' ) )
     202                if ( 'no' == get_user_meta( $invited_user_id, 'notification_groups_invite', true ) )
    203203                        return false;
    204204
    205205                $invited_ud = bp_core_get_core_userdata($invited_user_id);
     
    211211                // Set up and send the message
    212212                $to = $invited_ud->user_email;
    213213
    214                 $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( 'You have an invitation to the group: "%s"', 'buddypress' ), $group->name );
     214                $subject = '[' . wp_specialchars_decode( get_blog_option( BP_ROOT_BLOG, 'blogname' ) ) . '] ' . sprintf( __( 'You have an invitation to the group: "%s"', 'buddypress' ), $group->name );
    215215
    216216                $message = sprintf( __(
    217217'One of your friends %s has invited you to the group: "%s".
     
    258258                        continue;
    259259
    260260                // Now email the user with the contents of the message (if they have enabled email notifications)
    261                 if ( 'no' != get_usermeta( $user_id, 'notification_activity_new_mention' ) ) {
     261                if ( 'no' != get_user_meta( $user_id, 'notification_activity_new_mention', true ) ) {
    262262                        $poster_name = bp_core_get_user_displayname( $poster_user_id );
    263263
    264264                        $message_link = bp_activity_get_permalink( $activity_id );
     
    270270                        // Set up and send the message
    271271                        $ud = bp_core_get_core_userdata( $receiver_user_id );
    272272                        $to = $ud->user_email;
    273                         $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( '%s mentioned you in the group "%s"', 'buddypress' ), $poster_name, $group->name );
     273                        $subject = '[' . wp_specialchars_decode( get_blog_option( BP_ROOT_BLOG, 'blogname' ) ) . '] ' . sprintf( __( '%s mentioned you in the group "%s"', 'buddypress' ), $poster_name, $group->name );
    274274
    275275$message = sprintf( __(
    276276'%s mentioned you in the group "%s":