Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
09/17/2014 12:39:27 AM (11 years ago)
Author:
boonebgorges
Message:

Improved inline documentation in bp-groups

See #5022

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-groups/bp-groups-filters.php

    r8458 r9026  
    111111}
    112112
    113 /** Group forums **************************************************************/
    114 
    115 /**
    116  * Only filter the forum SQL on group pages or on the forums directory
     113/** Legacy group forums (bbPress 1.x) *****************************************/
     114
     115/**
     116 * Filter bbPress query SQL when on group pages or on forums directory.
    117117 */
    118118function groups_add_forum_privacy_sql() {
     
    123123add_filter( 'bbpress_init', 'groups_add_forum_privacy_sql' );
    124124
     125/**
     126 * Add fields to bbPress query for group-specific data.
     127 *
     128 * @param string $sql
     129 * @return string
     130 */
    125131function groups_add_forum_fields_sql( $sql = '' ) {
    126132    $sql = 't.*, g.id as object_id, g.name as object_name, g.slug as object_slug';
     
    128134}
    129135
     136/**
     137 * Add JOINed tables to bbPress query for group-specific data.
     138 *
     139 * @param string $sql
     140 * @return string
     141 */
    130142function groups_add_forum_tables_sql( $sql = '' ) {
    131143    global $bp;
     
    136148}
    137149
     150/**
     151 * Add WHERE clauses to bbPress query for group-specific data and access protection.
     152 *
     153 * @param string $sql
     154 * @return string
     155 */
    138156function groups_add_forum_where_sql( $sql = '' ) {
    139157    global $bp;
     
    179197}
    180198
     199/**
     200 * Modify bbPress caps for bp-forums.
     201 *
     202 * @param bool $value
     203 * @param string $cap
     204 * @param array $args
     205 * @return bool
     206 */
    181207function groups_filter_bbpress_caps( $value, $cap, $args ) {
    182208    global $bp;
     
    196222
    197223/**
    198  * Amends the forum directory's "last active" bbPress SQL query to stop it fetching
    199  * information we aren't going to use. This speeds up the query.
     224 * Amends the forum directory's "last active" bbPress SQL query to stop it fetching information we aren't going to use.
     225 *
     226 * This speeds up the query.
     227 *
     228 * @since BuddyPress (1.5.0)
    200229 *
    201230 * @see BB_Query::_filter_sql()
    202  * @since BuddyPress (1.5)
    203231 */
    204232function groups_filter_forums_root_page_sql( $sql ) {
Note: See TracChangeset for help on using the changeset viewer.