Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/06/2011 02:57:57 PM (15 years ago)
Author:
boonebgorges
Message:

Cleanup of PHP warnings and PHPdoc for bp_activity_at_message_notification()

File:
1 edited

Legend:

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

    r3592 r3665  
    11<?php
    22
     3/**
     4 * Sends an email notification and a BP notification when someone mentions you in an update
     5 *
     6 * @package BuddyPress Activity
     7 * @param str $content The content of the activity update
     8 * @param int $poster_user_id The unique user_id of the user who sent the update
     9 * @param int $activity_id The id of the activity update
     10 */
    311function bp_activity_at_message_notification( $content, $poster_user_id, $activity_id ) {
    412    global $bp;
     
    1725
    1826        bp_core_add_notification( $activity_id, $receiver_user_id, 'activity', 'new_at_mention', $poster_user_id );
     27
     28        $subject = '';
     29        $message = '';
    1930
    2031        // Now email the user with the contents of the message (if they have enabled email notifications)
     
    5364            wp_mail( $to, $subject, $message );
    5465        }
     66       
     67        do_action( 'bp_activity_sent_mention_email', $usernames, $subject, $message, $content, $poster_user_id, $activity_id );
    5568    }
    56 
    57     do_action( 'bp_activity_sent_mention_email', $usernames, $subject, $message, $content, $poster_user_id, $activity_id );
    5869}
    5970add_action( 'bp_activity_posted_update', 'bp_activity_at_message_notification', 10, 3 );
Note: See TracChangeset for help on using the changeset viewer.