Changeset 9216 for trunk/src/bp-messages/bp-messages-notifications.php
- Timestamp:
- 12/07/2014 12:27:30 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-messages/bp-messages-notifications.php
r9208 r9216 93 93 } 94 94 95 // Send the message 95 /** 96 * Filters the user email that the message notification will be sent to. 97 * 98 * @since BuddyPress (1.2.0) 99 * 100 * @param string $email_to User email the notification is being sent to. 101 * @param WP_User $ud WP_User object of who is receiving the message. 102 */ 96 103 $email_to = apply_filters( 'messages_notification_new_message_to', $email_to, $ud ); 104 105 /** 106 * Filters the message notification subject that will be sent to user. 107 * 108 * @since BuddyPress (1.2.0) 109 * 110 * @param string $email_subject Email notification subject text. 111 * @param string $sender_name Name of the person who sent the message. 112 * @param WP_User $ud WP_User object of who is receiving the message. 113 */ 97 114 $email_subject = apply_filters( 'messages_notification_new_message_subject', $email_subject, $sender_name, $ud ); 115 116 /** 117 * Filters the message notification message that will be sent to user. 118 * 119 * @since BuddyPress (1.2.0) 120 * 121 * @param string $email_content Email notification message text. 122 * @param string $sender_name Name of the person who sent the message. 123 * @param string $subject Email notification subject text. 124 * @param string $content Content of the message. 125 * @param string $message_link URL permalink for the message. 126 * @param string $settings_link URL permalink for the user's notification settings area. 127 * @param WP_User $ud WP_User object of who is receiving the message. 128 */ 98 129 $email_content = apply_filters( 'messages_notification_new_message_message', $email_content, $sender_name, $subject, $content, $message_link, $settings_link, $ud ); 99 130 … … 102 133 } 103 134 135 /** 136 * Fires after the sending of a new message email notification. 137 * 138 * @since BuddyPress (1.5.0) 139 * 140 * @param array $recipients User IDs of recipients. 141 * @param string $email_subject Email notification subject text. 142 * @param string $email_content Email notification message text. 143 * @param array $$args Array of originally provided arguments. 144 */ 104 145 do_action( 'bp_messages_sent_notification_email', $recipients, $email_subject, $email_content, $args ); 105 146 } … … 126 167 $link = trailingslashit( bp_loggedin_user_domain() . bp_get_messages_slug() . '/inbox' ); 127 168 $title = __( 'Inbox', 'buddypress' ); 169 $amount = 'single'; 128 170 129 171 if ( 'new_message' === $action ) { … … 131 173 $amount = 'multiple'; 132 174 $text = sprintf( __( 'You have %d new messages', 'buddypress' ), $total_items ); 175 $amount = 'multiple'; 133 176 } else { 134 177 $amount = 'single'; … … 178 221 } 179 222 223 /** 224 * Fires right before returning the formatted message notifications. 225 * 226 * @since BuddyPress (1.0.0) 227 * 228 * @param string $action The type of message notification. 229 * @param int $item_id The primary item ID. 230 * @param int $secondary_item_id The secondary item ID. 231 * @param int $total_items Total amount of items to format. 232 */ 180 233 do_action( 'messages_format_notifications', $action, $item_id, $secondary_item_id, $total_items ); 181 234
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)