Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
12/07/2014 12:27:30 AM (12 years ago)
Author:
tw2113
Message:

Add hook documentation for the Messages component.

Fixes #5945

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-messages/bp-messages-screens.php

    r9190 r9216  
    2424        }
    2525
     26        /**
     27         * Fires right before the loading of the Messages inbox screen template file.
     28         *
     29         * @since BuddyPress (1.0.0)
     30         */
    2631        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         */
    2740        bp_core_load_template( apply_filters( 'messages_template_inbox', 'members/single/home' ) );
    2841}
     
    3750        }
    3851
     52        /**
     53         * Fires right before the loading of the Messages sentbox screen template file.
     54         *
     55         * @since BuddyPress (1.0.0)
     56         */
    3957        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         */
    4066        bp_core_load_template( apply_filters( 'messages_template_sentbox', 'members/single/home' ) );
    4167}
     
    77103                                $typed_recipients        = explode( ' ', $_POST['send_to_usernames'] );
    78104                                $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                                 */
    79113                                $recipients              = apply_filters( 'bp_messages_recipients', $recipients );
    80114                                $thread_id               = messages_new_message( array(
     
    95129        }
    96130
     131        /**
     132         * Fires right before the loading of the Messages compose screen template file.
     133         *
     134         * @since BuddyPress (1.0.0)
     135         */
    97136        do_action( 'messages_screen_compose' );
    98137
     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         */
    99145        bp_core_load_template( apply_filters( 'messages_template_compose', 'members/single/home' ) );
    100146}
     
    124170        $bp->bp_nav[$bp->messages->slug]['name'] = sprintf( __( 'Messages <span>%s</span>', 'buddypress' ), bp_get_total_unread_messages_count() );
    125171
     172        /**
     173         * Fires right before the loading of the Messages view screen template file.
     174         *
     175         * @since BuddyPress (1.7.0)
     176         */
    126177        do_action( 'messages_screen_conversation' );
    127178
     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         */
    128186        bp_core_load_template( apply_filters( 'messages_template_view_message', 'members/single/home' ) );
    129187}
     
    174232        }
    175233
     234        /**
     235         * Fires right before the loading of the Messages notices screen template file.
     236         *
     237         * @since BuddyPress (1.0.0)
     238         */
    176239        do_action( 'messages_screen_notices' );
    177240
     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         */
    178248        bp_core_load_template( apply_filters( 'messages_template_notices', 'members/single/home' ) );
    179249}
     
    210280                        </tr>
    211281
    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' ); ?>
    213290                </tbody>
    214291        </table>
Note: See TracChangeset for help on using the changeset viewer.