Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/12/2010 01:01:19 PM (16 years ago)
Author:
apeatling
Message:

Adding filters to all BuddyPress wp_mail() calls.

File:
1 edited

Legend:

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

    r2663 r2697  
    2929        $message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link );
    3030
    31         // Send it
     31        /* Send the message */
     32        $to = apply_filters( 'groups_notification_group_updated_to', $to );
     33        $subject = apply_filters( 'groups_notification_group_updated_subject', $subject );
     34        $message = apply_filters( 'groups_notification_group_updated_message', $message );
     35
    3236        wp_mail( $to, $subject, $message );
    3337
     
    7377    $message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link );
    7478
    75     // Send it
     79    /* Send the message */
     80    $to = apply_filters( 'groups_notification_new_membership_request_to', $to );
     81    $subject = apply_filters( 'groups_notification_new_membership_request_subject', $subject );
     82    $message = apply_filters( 'groups_notification_new_membership_request_message', $message );
     83
    7684    wp_mail( $to, $subject, $message );
    7785}
     
    122130    $message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link );
    123131
    124     // Send it
     132    /* Send the message */
     133    $to = apply_filters( 'groups_notification_membership_request_completed_to', $to );
     134    $subject = apply_filters( 'groups_notification_membership_request_completed_subject', $subject );
     135    $message = apply_filters( 'groups_notification_membership_request_completed_message', $message );
     136
    125137    wp_mail( $to, $subject, $message );
    126138}
     
    164176    $message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link );
    165177
    166     // Send it
     178    /* Send the message */
     179    $to = apply_filters( 'groups_notification_promoted_member_to', $to );
     180    $subject = apply_filters( 'groups_notification_promoted_member_subject', $subject );
     181    $message = apply_filters( 'groups_notification_promoted_member_message', $message );
     182
    167183    wp_mail( $to, $subject, $message );
    168184}
     
    212228        $message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link );
    213229
    214         // Send it
     230        /* Send the message */
     231        $to = apply_filters( 'groups_notification_group_invites_to', $to );
     232        $subject = apply_filters( 'groups_notification_group_invites_subject', $subject );
     233        $message = apply_filters( 'groups_notification_group_invites_message', $message );
     234
    215235        wp_mail( $to, $subject, $message );
    216236    }
     
    262282            $message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link );
    263283
    264             // Send it
     284            /* Send the message */
     285            $to = apply_filters( 'groups_at_message_notification_to', $to );
     286            $subject = apply_filters( 'groups_at_message_notification_subject', $subject );
     287            $message = apply_filters( 'groups_at_message_notification_message', $message );
     288
    265289            wp_mail( $to, $subject, $message );
    266290        }
Note: See TracChangeset for help on using the changeset viewer.