Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/20/2011 10:53:49 AM (16 years ago)
Author:
johnjamesjacoby
Message:

Second pass at huge component refactor.

Move component files out of root directory and append '-loader' to the file names. Split those files up into smaller pieces.

Abstract 'settings' component out of 'core' and into its own component for future extension, including new template files in bp-default.

Append '-sa' to bbPress bridge file for 'Stand Alone' compatibility, to make room for bbPress plugin compatibility layer.

Various bug fixes through-out all components. Various code clean-up and documentation through-out all components.

Still more refactoring to do.

File:
1 edited

Legend:

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

    r3592 r3757  
    33function messages_notification_new_message( $args ) {
    44        global $bp;
     5
    56        extract($args);
    67
    7         $sender_name = bp_core_get_user_displayname( $sender_id );
     8        $email_subject = $email_content = $args = '';
     9        $sender_name   = bp_core_get_user_displayname( $sender_id );
    810
    911        foreach( $recipients as $recipient ) {
    10                 if ( $sender_id == $recipient->user_id || 'no' == get_user_meta( $recipient->user_id, 'notification_messages_new_message', true ) ) continue;
     12                if ( $sender_id == $recipient->user_id || 'no' == get_user_meta( $recipient->user_id, 'notification_messages_new_message', true ) )
     13                        continue;
    1114
    12                 $ud = get_userdata( $recipient->user_id );
    13                 $message_link = bp_core_get_user_domain( $recipient->user_id ) . BP_MESSAGES_SLUG .'/';
     15                // User data and links
     16                $ud            = get_userdata( $recipient->user_id );
     17                $message_link  = bp_core_get_user_domain( $recipient->user_id ) . BP_MESSAGES_SLUG .'/';
    1418                $settings_link = bp_core_get_user_domain( $recipient->user_id ) .  BP_SETTINGS_SLUG . '/notifications/';
    1519
    16                 $sender_name = stripslashes( $sender_name );
    17                 $subject = stripslashes( wp_filter_kses( $subject ) );
    18                 $content = stripslashes( wp_filter_kses( $content ) );
     20                // Sender info
     21                $sender_name   = stripslashes( $sender_name );
     22                $subject       = stripslashes( wp_filter_kses( $subject ) );
     23                $content       = stripslashes( wp_filter_kses( $content ) );
    1924
    2025                // Set up and send the message
    … …  
    3742                $email_content .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link );
    3843
    39                 /* Send the message */
     44                // Send the message
    4045                $email_to = apply_filters( 'messages_notification_new_message_to', $email_to );
    4146                $email_subject = apply_filters( 'messages_notification_new_message_subject', $email_subject, $sender_name );
Note: See TracChangeset for help on using the changeset viewer.