Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/17/2015 03:31:35 AM (11 years ago)
Author:
tw2113
Message:

Adds hooks documentation for the activity template files.

See #5948.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-legacy/buddypress/activity/index.php

    r9604 r9762  
    1 <?php do_action( 'bp_before_directory_activity' ); ?>
     1<?php
     2
     3/**
     4 * Fires before the activity directory listing.
     5 *
     6 * @since BuddyPress (1.5.0)
     7 */
     8do_action( 'bp_before_directory_activity' ); ?>
    29
    310<div id="buddypress">
    411
    5     <?php do_action( 'bp_before_directory_activity_content' ); ?>
     12    <?php
     13
     14    /**
     15     * Fires before the activity directory display content.
     16     *
     17     * @since BuddyPress (1.2.0)
     18     */
     19    do_action( 'bp_before_directory_activity_content' ); ?>
    620
    721    <?php if ( is_user_logged_in() ) : ?>
     
    1125    <?php endif; ?>
    1226
    13     <?php do_action( 'template_notices' ); ?>
     27    <?php
     28
     29    /**
     30     * Fires towards the top of template pages for notice display.
     31     *
     32     * @since BuddyPress (1.0.0)
     33     */
     34    do_action( 'template_notices' ); ?>
    1435
    1536    <div class="item-list-tabs activity-type-tabs" role="navigation">
    1637        <ul>
    17             <?php do_action( 'bp_before_activity_type_tab_all' ); ?>
     38            <?php
     39
     40            /**
     41             * Fires before the listing of activity type tabs.
     42             *
     43             * @since BuddyPress (1.2.0)
     44             */
     45            do_action( 'bp_before_activity_type_tab_all' ); ?>
    1846
    1947            <li class="selected" id="activity-all"><a href="<?php bp_activity_directory_permalink(); ?>" title="<?php esc_attr_e( 'The public activity for everyone on this site.', 'buddypress' ); ?>"><?php printf( __( 'All Members <span>%s</span>', 'buddypress' ), bp_get_total_member_count() ); ?></a></li>
     
    2149            <?php if ( is_user_logged_in() ) : ?>
    2250
    23                 <?php do_action( 'bp_before_activity_type_tab_friends' ); ?>
     51                <?php
     52
     53                /**
     54                 * Fires before the listing of friends activity type tab.
     55                 *
     56                 * @since BuddyPress (1.2.0)
     57                 */
     58                do_action( 'bp_before_activity_type_tab_friends' ); ?>
    2459
    2560                <?php if ( bp_is_active( 'friends' ) ) : ?>
     
    3368                <?php endif; ?>
    3469
    35                 <?php do_action( 'bp_before_activity_type_tab_groups' ); ?>
     70                <?php
     71
     72                /**
     73                 * Fires before the listing of groups activity type tab.
     74                 *
     75                 * @since BuddyPress (1.2.0)
     76                 */
     77                do_action( 'bp_before_activity_type_tab_groups' ); ?>
    3678
    3779                <?php if ( bp_is_active( 'groups' ) ) : ?>
     
    4587                <?php endif; ?>
    4688
    47                 <?php do_action( 'bp_before_activity_type_tab_favorites' ); ?>
     89                <?php
     90
     91                /**
     92                 * Fires before the listing of favorites activity type tab.
     93                 *
     94                 * @since BuddyPress (1.2.0)
     95                 */
     96                do_action( 'bp_before_activity_type_tab_favorites' ); ?>
    4897
    4998                <?php if ( bp_get_total_favorite_count_for_user( bp_loggedin_user_id() ) ) : ?>
     
    55104                <?php if ( bp_activity_do_mentions() ) : ?>
    56105
    57                     <?php do_action( 'bp_before_activity_type_tab_mentions' ); ?>
     106                    <?php
     107
     108                    /**
     109                     * Fires before the listing of mentions activity type tab.
     110                     *
     111                     * @since BuddyPress (1.2.0)
     112                     */
     113                    do_action( 'bp_before_activity_type_tab_mentions' ); ?>
    58114
    59115                    <li id="activity-mentions"><a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/mentions/'; ?>" title="<?php esc_attr_e( 'Activity that I have been mentioned in.', 'buddypress' ); ?>"><?php _e( 'Mentions', 'buddypress' ); ?><?php if ( bp_get_total_mention_count_for_user( bp_loggedin_user_id() ) ) : ?> <strong><span><?php printf( _nx( '%s new', '%s new', bp_get_total_mention_count_for_user( bp_loggedin_user_id() ), 'Number of new activity mentions', 'buddypress' ), bp_get_total_mention_count_for_user( bp_loggedin_user_id() ) ); ?></span></strong><?php endif; ?></a></li>
     
    63119            <?php endif; ?>
    64120
    65             <?php do_action( 'bp_activity_type_tabs' ); ?>
     121            <?php
     122
     123            /**
     124             * Fires after the listing of activity type tabs.
     125             *
     126             * @since BuddyPress (1.2.0)
     127             */
     128            do_action( 'bp_activity_type_tabs' ); ?>
    66129        </ul>
    67130    </div><!-- .item-list-tabs -->
     
    71134            <li class="feed"><a href="<?php bp_sitewide_activity_feed_link(); ?>" title="<?php esc_attr_e( 'RSS Feed', 'buddypress' ); ?>"><?php _e( 'RSS', 'buddypress' ); ?></a></li>
    72135
    73             <?php do_action( 'bp_activity_syndication_options' ); ?>
     136            <?php
     137
     138            /**
     139             * Fires before the display of the activity syndication options.
     140             *
     141             * @since BuddyPress (1.2.0)
     142             */
     143            do_action( 'bp_activity_syndication_options' ); ?>
    74144
    75145            <li id="activity-filter-select" class="last">
     
    80150                    <?php bp_activity_show_filters(); ?>
    81151
    82                     <?php do_action( 'bp_activity_filter_options' ); ?>
     152                    <?php
     153
     154                    /**
     155                     * Fires inside the select input for activity filter by options.
     156                     *
     157                     * @since BuddyPress (1.2.0)
     158                     */
     159                    do_action( 'bp_activity_filter_options' ); ?>
    83160
    84161                </select>
     
    87164    </div><!-- .item-list-tabs -->
    88165
    89     <?php do_action( 'bp_before_directory_activity_list' ); ?>
     166    <?php
     167
     168    /**
     169     * Fires before the display of the activity list.
     170     *
     171     * @since BuddyPress (1.5.0)
     172     */
     173    do_action( 'bp_before_directory_activity_list' ); ?>
    90174
    91175    <div class="activity" role="main">
     
    95179    </div><!-- .activity -->
    96180
    97     <?php do_action( 'bp_after_directory_activity_list' ); ?>
    98 
    99     <?php do_action( 'bp_directory_activity_content' ); ?>
    100 
    101     <?php do_action( 'bp_after_directory_activity_content' ); ?>
    102 
    103     <?php do_action( 'bp_after_directory_activity' ); ?>
     181    <?php
     182
     183    /**
     184     * Fires after the display of the activity list.
     185     *
     186     * @since BuddyPress (1.5.0)
     187     */
     188    do_action( 'bp_after_directory_activity_list' ); ?>
     189
     190    <?php
     191
     192    /**
     193     * Fires inside and displays the activity directory display content.
     194     */
     195    do_action( 'bp_directory_activity_content' ); ?>
     196
     197    <?php
     198
     199    /**
     200     * Fires after the activity directory display content.
     201     *
     202     * @since BuddyPress (1.2.0)
     203     */
     204    do_action( 'bp_after_directory_activity_content' ); ?>
     205
     206    <?php
     207
     208    /**
     209     * Fires after the activity directory listing.
     210     *
     211     * @since BuddyPress (1.5.0)
     212     */
     213    do_action( 'bp_after_directory_activity' ); ?>
    104214
    105215</div>
Note: See TracChangeset for help on using the changeset viewer.