Skip to:
Content

BuddyPress.org

Changeset 9789


Ignore:
Timestamp:
04/23/2015 05:20:25 AM (11 years ago)
Author:
tw2113
Message:

Adds hooks documentation for the forums template files.

See #5948.

Location:
trunk/src/bp-templates/bp-legacy/buddypress/forums
Files:
2 edited

Legend:

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

    r9604 r9789  
    1212?>
    1313
    14 <?php do_action( 'bp_before_forums_loop' ); ?>
     14<?php
     15
     16/**
     17 * Fires at the start of the forums loop.
     18 *
     19 * @since BuddyPress (1.2.6)
     20 */
     21do_action( 'bp_before_forums_loop' ); ?>
    1522
    1623<?php if ( bp_has_forum_topics( bp_ajax_querystring( 'forums' ) ) ) : ?>
    … …  
    3239        </div>
    3340
    34         <?php do_action( 'bp_before_directory_forums_list' ); ?>
     41        <?php
     42
     43        /**
     44         * Fires before the display of the forums list.
     45         *
     46         * @since BuddyPress (1.1.0)
     47         */
     48        do_action( 'bp_before_directory_forums_list' ); ?>
    3549
    3650        <table class="forum">
    … …  
    4155                                <th id="th-freshness"><?php _e( 'Freshness', 'buddypress' ); ?></th>
    4256
    43                                 <?php do_action( 'bp_directory_forums_extra_cell_head' ); ?>
     57                                <?php
     58
     59                                /**
     60                                 * Fires at the end of <tr> row holding the <th> tags.
     61                                 *
     62                                 * @since BuddyPress (1.2.4)
     63                                 */
     64                                do_action( 'bp_directory_forums_extra_cell_head' ); ?>
    4465
    4566                        </tr>
    … …  
    92113                                </td>
    93114
    94                                 <?php do_action( 'bp_directory_forums_extra_cell' ); ?>
     115                                <?php
     116
     117                                /**
     118                                 * Fires at the end of <tr> row holding the <td> tags.
     119                                 *
     120                                 * @since BuddyPress (1.1.0)
     121                                 */
     122                                do_action( 'bp_directory_forums_extra_cell' ); ?>
    95123
    96124                        </tr>
    97125
    98                         <?php do_action( 'bp_directory_forums_extra_row' ); ?>
     126                        <?php
     127
     128                                /**
     129                                 * Fires after the <tr> for a forum listing display.
     130                                 *
     131                                 * @since BuddyPress (1.1.0)
     132                                 */
     133                                do_action( 'bp_directory_forums_extra_row' ); ?>
    99134
    100135                        <?php endwhile; ?>
    … …  
    103138        </table>
    104139
    105         <?php do_action( 'bp_after_directory_forums_list' ); ?>
     140        <?php
     141
     142        /**
     143         * Fires after the display of the forums list.
     144         *
     145         * @since BuddyPress (1.1.0)
     146         */
     147        do_action( 'bp_after_directory_forums_list' ); ?>
    106148
    107149        <div id="pag-bottom" class="pagination">
    … …  
    125167<?php endif; ?>
    126168
    127 <?php do_action( 'bp_after_forums_loop' ); ?>
     169<?php
     170
     171/**
     172 * Fires at the end of the forums loop.
     173 *
     174 * @since BuddyPress (1.2.6)
     175 */
     176do_action( 'bp_after_forums_loop' ); ?>
  • trunk/src/bp-templates/bp-legacy/buddypress/forums/index.php

    r9604 r9789  
    11<div id="buddypress">
    2        
    3         <?php do_action( 'bp_before_directory_forums' ); ?>
     2
     3        <?php
     4
     5        /**
     6         * Fires at the start of the forums template.
     7         *
     8         * @since BuddyPress (1.5.0)
     9         */
     10        do_action( 'bp_before_directory_forums' ); ?>
    411
    512        <form action="" method="post" id="forums-search-form" class="dir-form">
    613
    7                 <?php do_action( 'bp_before_directory_forums_content' ); ?>
     14                <?php
     15
     16                /**
     17                 * Fires before the display of the forums content.
     18                 *
     19                 * @since BuddyPress (1.1.0)
     20                 */
     21                do_action( 'bp_before_directory_forums_content' ); ?>
    822
    923                <div id="forums-dir-search" class="dir-search" role="search">
    … …  
    1428        </form>
    1529
    16         <?php do_action( 'bp_before_topics' ); ?>
     30        <?php
     31
     32        /**
     33         * Fires before the display of the forum topics.
     34         *
     35         * @since BuddyPress (1.5.0)
     36         */
     37        do_action( 'bp_before_topics' ); ?>
    1738
    1839        <form action="" method="post" id="forums-directory-form" class="dir-form">
    … …  
    2849                                <?php endif; ?>
    2950
    30                                 <?php do_action( 'bp_forums_directory_group_types' ); ?>
     51                                <?php
     52
     53                                /**
     54                                 * Fires inside the forum group types list.
     55                                 *
     56                                 * @since BuddyPress (1.2.0)
     57                                 */
     58                                do_action( 'bp_forums_directory_group_types' ); ?>
    3159
    3260                        </ul>
    … …  
    3664                        <ul>
    3765
    38                                 <?php do_action( 'bp_forums_directory_group_sub_types' ); ?>
     66                                <?php
     67
     68                                /**
     69                                 * Fires inside the forum group sub-types list.
     70                                 *
     71                                 * @since BuddyPress (1.5.0)
     72                                 */
     73                                do_action( 'bp_forums_directory_group_sub_types' ); ?>
    3974
    4075                                <li id="forums-order-select" class="last filter">
    … …  
    4681                                                <option value="unreplied"><?php _e( 'Unreplied', 'buddypress' ); ?></option>
    4782
    48                                                 <?php do_action( 'bp_forums_directory_order_options' ); ?>
     83                                                <?php
     84
     85                                                /**
     86                                                 * Fires inside the select input for forums order options.
     87                                                 *
     88                                                 * @since BuddyPress (1.2.0)
     89                                                 */
     90                                                do_action( 'bp_forums_directory_order_options' ); ?>
    4991
    5092                                        </select>
    … …  
    59101                </div>
    60102
    61                 <?php do_action( 'bp_directory_forums_content' ); ?>
     103                <?php
     104
     105                /**
     106                 * Fires and displays the forums content.
     107                 *
     108                 * @since BuddyPress (1.1.0)
     109                 */
     110                do_action( 'bp_directory_forums_content' ); ?>
    62111
    63112                <?php wp_nonce_field( 'directory_forums', '_wpnonce-forums-filter' ); ?>
    … …  
    65114        </form>
    66115
    67         <?php do_action( 'bp_after_directory_forums' ); ?>
    68 
    69         <?php do_action( 'bp_before_new_topic_form' ); ?>
     116        <?php
     117
     118        /**
     119         * Fires after the display of the forums.
     120         *
     121         * @since BuddyPress (1.5.0)
     122         */
     123        do_action( 'bp_after_directory_forums' ); ?>
     124
     125        <?php
     126
     127        /**
     128         * Fires before the display of the new topic form.
     129         *
     130         * @since BuddyPress (1.5.0)
     131         */
     132        do_action( 'bp_before_new_topic_form' ); ?>
    70133
    71134        <div id="new-topic-post">
    … …  
    77140                                <form action="" method="post" id="forum-topic-form" class="standard-form">
    78141
    79                                         <?php do_action( 'groups_forum_new_topic_before' ); ?>
     142                                        <?php
     143
     144                                        /**
     145                                         * Fires inside the new topic form tag and before input display.
     146                                         *
     147                                         * @since BuddyPress (1.0.0)
     148                                         */
     149                                        do_action( 'groups_forum_new_topic_before' ); ?>
    80150
    81151                                        <a name="post-new"></a>
    82152                                        <h5><?php _e( 'Create New Topic:', 'buddypress' ); ?></h5>
    83153
    84                                         <?php do_action( 'template_notices' ); ?>
     154                                        <?php
     155
     156                                        /** This action is documented in bp-templates/bp-legacy/buddypress/activity/index.php */
     157                                        do_action( 'template_notices' ); ?>
    85158
    86159                                        <label><?php _e( 'Title:', 'buddypress' ); ?></label>
    … …  
    110183                                        </select><!-- #topic_group_id -->
    111184
    112                                         <?php do_action( 'groups_forum_new_topic_after' ); ?>
     185                                        <?php
     186
     187                                        /**
     188                                         * Fires before the new topic form submit actions.
     189                                         *
     190                                         * @since BuddyPress (1.0.0)
     191                                         */
     192                                        do_action( 'groups_forum_new_topic_after' ); ?>
    113193
    114194                                        <div class="submit">
    … …  
    134214        </div><!-- #new-topic-post -->
    135215
    136         <?php do_action( 'bp_after_new_topic_form' ); ?>
    137 
    138         <?php do_action( 'bp_after_directory_forums_content' ); ?>
    139        
     216        <?php
     217
     218        /**
     219         * Fires after the display of the new topic form.
     220         *
     221         * @since BuddyPress (1.5.0)
     222         */
     223        do_action( 'bp_after_new_topic_form' ); ?>
     224
     225        <?php
     226
     227        /**
     228         * Fires before the display of the forums content.
     229         *
     230         * @since BuddyPress (1.1.0)
     231         */
     232        do_action( 'bp_after_directory_forums_content' ); ?>
     233
    140234</div>
Note: See TracChangeset for help on using the changeset viewer.