Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/02/2009 07:54:21 PM (16 years ago)
Author:
apeatling
Message:

Merging 1.1 branch changes and syncing.

File:
1 edited

Legend:

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

    r1905 r2077  
    66 * Records a notification for a new profile wire post to the database and sends out a notification
    77 * email if the user has this setting enabled.
    8  * 
     8 *
    99 * @package BuddyPress XProfile
    1010 * @param $wire_post_id The ID of the wire post
     
    2121function xprofile_record_wire_post_notification( $wire_post_id, $user_id, $poster_id ) {
    2222    global $bp, $current_user;
    23    
     23
    2424    if ( $bp->current_component == $bp->wire->slug && !bp_is_home() ) {
    2525        bp_core_add_notification( $poster_id, $user_id, 'xprofile', 'new_wire_post' );
     
    2929            $wire_post = new BP_Wire_Post( $bp->profile->table_name_wire, $wire_post_id, true );
    3030            $ud = get_userdata( $user_id );
    31            
     31
    3232            $wire_link = bp_core_get_user_domain( $user_id ) . 'wire';
    3333            $settings_link = bp_core_get_user_domain( $user_id ) . 'settings/notifications';
    34            
     34
    3535            // Set up and send the message
    3636            $to = $ud->user_email;
    3737            $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( '%s posted on your wire.', 'buddypress' ), stripslashes($poster_name) );
    3838
    39 $message = sprintf( __( 
     39$message = sprintf( __(
    4040'%s posted on your wire:
    4141
     
    4848
    4949            $message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link );
    50            
     50
    5151            // Send it
    5252            wp_mail( $to, $subject, $message );
    5353        }
    5454    }
    55        
     55
    5656}
    5757add_action( 'bp_wire_post_posted', 'xprofile_record_wire_post_notification', 10, 3 );
Note: See TracChangeset for help on using the changeset viewer.