Ticket #5945: bp-messages-screens-5945.diff
| File bp-messages-screens-5945.diff, 4.1 KB (added by , 11 years ago) |
|---|
-
src/bp-messages/bp-messages-screens.php
23 23 return; 24 24 } 25 25 26 /** 27 * Fires right before the loading of the Messages inbox screen template file. 28 * 29 * @since BuddyPress (1.0.0) 30 */ 26 31 do_action( 'messages_screen_inbox' ); 32 33 /** 34 * Filters the template to load for the Messages inbox screen. 35 * 36 * @since BuddyPress (1.0.0) 37 * 38 * @param string $template Path to the messages template to load. 39 */ 27 40 bp_core_load_template( apply_filters( 'messages_template_inbox', 'members/single/home' ) ); 28 41 } 29 42 … … 36 49 return; 37 50 } 38 51 52 /** 53 * Fires right before the loading of the Messages sentbox screen template file. 54 * 55 * @since BuddyPress (1.0.0) 56 */ 39 57 do_action( 'messages_screen_sentbox' ); 58 59 /** 60 * Filters the template to load for the Messages sentbox screen. 61 * 62 * @since BuddyPress (1.0.0) 63 * 64 * @param string $template Path to the messages template to load. 65 */ 40 66 bp_core_load_template( apply_filters( 'messages_template_sentbox', 'members/single/home' ) ); 41 67 } 42 68 … … 76 102 $autocomplete_recipients = explode( ',', $_POST['send-to-input'] ); 77 103 $typed_recipients = explode( ' ', $_POST['send_to_usernames'] ); 78 104 $recipients = array_merge( (array) $autocomplete_recipients, (array) $typed_recipients ); 105 106 /** 107 * Filters the array of recipients to receive the composed message. 108 * 109 * @since BuddyPress (1.2.10) 110 * 111 * @param array $recipients Array of recipients to receive message. 112 */ 79 113 $recipients = apply_filters( 'bp_messages_recipients', $recipients ); 80 114 $thread_id = messages_new_message( array( 81 115 'recipients' => $recipients, … … 94 128 } 95 129 } 96 130 131 /** 132 * Fires right before the loading of the Messages compose screen template file. 133 * 134 * @since BuddyPress (1.0.0) 135 */ 97 136 do_action( 'messages_screen_compose' ); 98 137 138 /** 139 * Filters the template to load for the Messages compose screen. 140 * 141 * @since BuddyPress (1.0.0) 142 * 143 * @param string $template Path to the messages template to load. 144 */ 99 145 bp_core_load_template( apply_filters( 'messages_template_compose', 'members/single/home' ) ); 100 146 } 101 147 … … 123 169 // Decrease the unread count in the nav before it's rendered 124 170 $bp->bp_nav[$bp->messages->slug]['name'] = sprintf( __( 'Messages <span>%s</span>', 'buddypress' ), bp_get_total_unread_messages_count() ); 125 171 172 /** 173 * Fires right before the loading of the Messages view screen template file. 174 * 175 * @since BuddyPress (1.7.0) 176 */ 126 177 do_action( 'messages_screen_conversation' ); 127 178 179 /** 180 * Filters the template to load for the Messages view screen. 181 * 182 * @since BuddyPress (1.0.0) 183 * 184 * @param string $template Path to the messages template to load. 185 */ 128 186 bp_core_load_template( apply_filters( 'messages_template_view_message', 'members/single/home' ) ); 129 187 } 130 188 add_action( 'bp_screens', 'messages_screen_conversation' ); … … 173 231 return; 174 232 } 175 233 234 /** 235 * Fires right before the loading of the Messages notices screen template file. 236 * 237 * @since BuddyPress (1.0.0) 238 */ 176 239 do_action( 'messages_screen_notices' ); 177 240 241 /** 242 * Filters the template to load for the Messages notices screen. 243 * 244 * @since BuddyPress (1.0.0) 245 * 246 * @param string $template Path to the messages template to load. 247 */ 178 248 bp_core_load_template( apply_filters( 'messages_template_notices', 'members/single/home' ) ); 179 249 } 180 250 … … 209 279 <td class="no"><input type="radio" name="notifications[notification_messages_new_message]" value="no" <?php checked( $new_messages, 'no', true ) ?>/></td> 210 280 </tr> 211 281 212 <?php do_action( 'messages_screen_notification_settings' ) ?> 282 <?php 283 284 /** 285 * Fires inside the closing </tbody> tag for messages screen notification settings. 286 * 287 * @since BuddyPress (1.0.0) 288 */ 289 do_action( 'messages_screen_notification_settings' ); ?> 213 290 </tbody> 214 291 </table> 215 292