Skip to:
Content

BuddyPress.org

Changeset 9762


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.

Location:
trunk/src/bp-templates/bp-legacy/buddypress/activity
Files:
6 edited

Legend:

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

    r9604 r9762  
    1 <?php do_action( 'bp_before_activity_loop' ); ?>
     1<?php
     2
     3/**
     4 * Fires before the start of the activity loop.
     5 *
     6 * @since BuddyPress (1.2.0)
     7 */
     8do_action( 'bp_before_activity_loop' ); ?>
    29
    310<?php if ( bp_has_activities( bp_ajax_querystring( 'activity' ) ) ) : ?>
     
    3744<?php endif; ?>
    3845
    39 <?php do_action( 'bp_after_activity_loop' ); ?>
     46<?php
     47
     48/**
     49 * Fires after the finish of the activity loop.
     50 *
     51 * @since BuddyPress (1.2.0)
     52 */
     53do_action( 'bp_after_activity_loop' ); ?>
    4054
    4155<?php if ( empty( $_POST['page'] ) ) : ?>
  • trunk/src/bp-templates/bp-legacy/buddypress/activity/comment.php

    r9604 r9762  
    1313?>
    1414
    15 <?php do_action( 'bp_before_activity_comment' ); ?>
     15<?php
     16
     17/**
     18 * Fires before the display of an activity comment.
     19 *
     20 * @since BuddyPress (1.5.0)
     21 */
     22do_action( 'bp_before_activity_comment' ); ?>
    1623
    1724<li id="acomment-<?php bp_activity_comment_id(); ?>">
     
    4552                <?php endif; ?>
    4653
    47                 <?php do_action( 'bp_activity_comment_options' ); ?>
     54                <?php
     55
     56                /**
     57                 * Fires after the defualt comment action options display.
     58                 *
     59                 * @since BuddyPress (1.6.0)
     60                 */
     61                do_action( 'bp_activity_comment_options' ); ?>
    4862
    4963        </div>
     
    5266</li>
    5367
    54 <?php do_action( 'bp_after_activity_comment' ); ?>
     68<?php
     69
     70/**
     71 * Fires after the display of an activity comment.
     72 *
     73 * @since BuddyPress (1.5.0)
     74 */
     75do_action( 'bp_after_activity_comment' ); ?>
  • trunk/src/bp-templates/bp-legacy/buddypress/activity/entry.php

    r9604 r9762  
    1313?>
    1414
    15 <?php do_action( 'bp_before_activity_entry' ); ?>
     15<?php
     16
     17/**
     18 * Fires before the display of an activity entry.
     19 *
     20 * @since BuddyPress (1.2.0)
     21 */
     22do_action( 'bp_before_activity_entry' ); ?>
    1623
    1724<li class="<?php bp_activity_css_class(); ?>" id="activity-<?php bp_activity_id(); ?>">
     
    4249                <?php endif; ?>
    4350
    44                 <?php do_action( 'bp_activity_entry_content' ); ?>
     51                <?php
     52
     53                /**
     54                 * Fires after the display of an activity entry content.
     55                 *
     56                 * @since BuddyPress (1.2.0)
     57                 */
     58                do_action( 'bp_activity_entry_content' ); ?>
    4559
    4660                <div class="activity-meta">
     
    7690                                <?php if ( bp_activity_user_can_delete() ) bp_activity_delete_link(); ?>
    7791
    78                                 <?php do_action( 'bp_activity_entry_meta' ); ?>
     92                                <?php
     93
     94                                /**
     95                                 * Fires at the end of the activity entry meta data area.
     96                                 *
     97                                 * @since BuddyPress (1.2.0)
     98                                 */
     99                                do_action( 'bp_activity_entry_meta' ); ?>
    79100
    80101                        <?php endif; ?>
     
    84105        </div>
    85106
    86         <?php do_action( 'bp_before_activity_entry_comments' ); ?>
     107        <?php
     108
     109        /**
     110         * Fires before the display of the activity entry comments.
     111         *
     112         * @since BuddyPress (1.2.0)
     113         */
     114        do_action( 'bp_before_activity_entry_comments' ); ?>
    87115
    88116        <?php if ( ( bp_activity_get_comment_count() || bp_activity_can_comment() ) || bp_is_single_activity() ) : ?>
     
    104132                                        </div>
    105133
    106                                         <?php do_action( 'bp_activity_entry_comments' ); ?>
     134                                        <?php
     135
     136                                        /**
     137                                         * Fires after the activity entry comment form.
     138                                         *
     139                                         * @since BuddyPress (1.5.0)
     140                                         */
     141                                        do_action( 'bp_activity_entry_comments' ); ?>
    107142
    108143                                        <?php wp_nonce_field( 'new_activity_comment', '_wpnonce_new_activity_comment' ); ?>
     
    116151        <?php endif; ?>
    117152
    118         <?php do_action( 'bp_after_activity_entry_comments' ); ?>
     153        <?php
     154
     155        /**
     156         * Fires after the display of the activity entry comments.
     157         *
     158         * @since BuddyPress (1.2.0)
     159         */
     160        do_action( 'bp_after_activity_entry_comments' ); ?>
    119161
    120162</li>
    121163
    122 <?php do_action( 'bp_after_activity_entry' ); ?>
     164<?php
     165
     166/**
     167 * Fires after the display of an activity entry.
     168 *
     169 * @since BuddyPress (1.2.0)
     170 */
     171do_action( 'bp_after_activity_entry' ); ?>
  • 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>
  • trunk/src/bp-templates/bp-legacy/buddypress/activity/post-form.php

    r9604 r9762  
    1212<form action="<?php bp_activity_post_form_action(); ?>" method="post" id="whats-new-form" name="whats-new-form" role="complementary">
    1313
    14         <?php do_action( 'bp_before_activity_post_form' ); ?>
     14        <?php
     15
     16        /**
     17         * Fires before the activity post form.
     18         *
     19         * @since BuddyPress (1.2.0)
     20         */
     21        do_action( 'bp_before_activity_post_form' ); ?>
    1522
    1623        <div id="whats-new-avatar">
     
    2835        <div id="whats-new-content">
    2936                <div id="whats-new-textarea">
    30                         <textarea class="bp-suggestions" name="whats-new" id="whats-new" cols="50" rows="10" 
     37                        <textarea class="bp-suggestions" name="whats-new" id="whats-new" cols="50" rows="10"
    3138                                <?php if ( bp_is_group() ) : ?>data-suggestions-group-id="<?php echo esc_attr( (int) bp_get_current_group_id() ); ?>" <?php endif; ?>
    3239                        ><?php if ( isset( $_GET['r'] ) ) : ?>@<?php echo esc_textarea( $_GET['r'] ); ?> <?php endif; ?></textarea>
     
    6673                        <?php endif; ?>
    6774
    68                         <?php do_action( 'bp_activity_post_form_options' ); ?>
     75                        <?php
     76
     77                        /**
     78                         * Fires at the end of the activity post form markup.
     79                         *
     80                         * @since BuddyPress (1.2.0)
     81                         */
     82                        do_action( 'bp_activity_post_form_options' ); ?>
    6983
    7084                </div><!-- #whats-new-options -->
     
    7286
    7387        <?php wp_nonce_field( 'post_update', '_wpnonce_post_update' ); ?>
    74         <?php do_action( 'bp_after_activity_post_form' ); ?>
     88        <?php
     89
     90        /**
     91         * Fires after the activity post form.
     92         *
     93         * @since BuddyPress (1.2.0)
     94         */
     95        do_action( 'bp_after_activity_post_form' ); ?>
    7596
    7697</form><!-- #whats-new-form -->
  • trunk/src/bp-templates/bp-legacy/buddypress/activity/single/home.php

    r9604 r9762  
    11<div id="buddypress">
    2         <?php do_action( 'template_notices' ); ?>
     2        <?php
     3
     4        /** This action is documented in bp-templates/bp-legacy/buddypress/activity/index.php */
     5        do_action( 'template_notices' ); ?>
    36
    47        <div class="activity no-ajax" role="main">
Note: See TracChangeset for help on using the changeset viewer.