Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/22/2015 04:58:34 AM (9 years ago)
Author:
tw2113
Message:

More docs cleanup for BP-Groups component.

See #6401.

File:
1 edited

Legend:

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

    r10148 r10373  
    6666 *
    6767 * @param int $group_id Group id, passed from groups_details_updated.
    68  *
    6968 * @return mixed
    7069 */
     
    112111 * @param mixed  $page      The page number where the new forum post should reside.
    113112 *                          Default: false.
    114  *
    115113 * @return mixed The new forum post ID on success. Boolean false on failure.
    116114 */
     
    221219 * @param string $topic_tags  A comma-delimited string of topic tags.
    222220 * @param int    $forum_id    The forum ID this forum topic resides in.
    223  *
    224221 * @return mixed The new topic object on success. Boolean false on failure.
    225222 */
     
    342339 * @param string $topic_text  The text for the forum topic.
    343340 * @param mixed  $topic_tags  A comma-delimited string of topic tags. Optional.
    344  *
    345341 * @return mixed The topic object on success. Boolean false on failure.
    346342 */
     
    364360    }
    365361
    366     // Get the corresponding activity item
     362    // Get the corresponding activity item.
    367363    if ( bp_is_active( 'activity' ) ) {
    368364        $id = bp_activity_get_activity_id( array(
     
    421417 * @param int    $topic_id  The topic ID of the existing forum topic.
    422418 * @param mixed  $page      The page number where the new forum post should reside. Optional.
    423  *
    424419 * @return mixed The forum post ID on success. Boolean false on failure.
    425420 */
     
    454449    }
    455450
    456     // Get the corresponding activity item
     451    // Get the corresponding activity item.
    457452    if ( bp_is_active( 'activity' ) ) {
    458453        $id = bp_activity_get_activity_id( array(
     
    507502 *
    508503 * @param int $topic_id The ID of the topic to be deleted.
    509  *
    510504 * @return bool True if the delete routine went through properly.
    511505 */
     
    513507    $bp = buddypress();
    514508
    515     // Before deleting the thread, get the post ids so that their activity items can be deleted
     509    // Before deleting the thread, get the post ids so that their activity items can be deleted.
    516510    $posts  = bp_forums_get_topic_posts( array( 'topic_id' => $topic_id, 'per_page' => -1 ) );
    517511    $action = bp_forums_delete_topic( array( 'topic_id' => $topic_id ) );
     
    528522        do_action( 'groups_before_delete_group_forum_topic', $topic_id );
    529523
    530         // Delete the corresponding activity stream items
     524        // Delete the corresponding activity stream items.
    531525        if ( bp_is_active( 'activity' ) ) {
    532526
    533             // The activity item for the initial topic
     527            // The activity item for the initial topic.
    534528            bp_activity_delete( array(
    535529                'item_id'           => bp_get_current_group_id(),
     
    539533            ) );
    540534
    541             // The activity item for each post
     535            // The activity item for each post.
    542536            foreach ( (array) $posts as $post ) {
    543537                bp_activity_delete( array(
     
    574568 *                           value isn't used in the function but is passed along
    575569 *                           to do_action() hooks.
    576  *
    577570 * @return bool True on success.
    578571 */
     
    593586        do_action( 'groups_before_delete_group_forum_post', $post_id, $topic_id );
    594587
    595         // Delete the corresponding activity stream item
     588        // Delete the corresponding activity stream item.
    596589        if ( bp_is_active( 'activity' ) ) {
    597590            bp_activity_delete( array(
     
    624617 * @param string $type Either 'newest', 'popular', 'unreplied', 'tags'.
    625618 *                     Default: 'newest'.
    626  *
    627619 * @return int The topic count.
    628620 */
     
    647639 *                                  'all'. Default: 'public'.
    648640 * @param string|bool $search_terms Optional. Limit by a search term.
    649  *
    650641 * @return int The topic count.
    651642 */
Note: See TracChangeset for help on using the changeset viewer.