Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
09/17/2014 12:39:27 AM (5 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-forums.php

    r8460 r9026  
    2323 * Uses the bundled version of bbPress packaged with BuddyPress.
    2424 *
    25  * @param int $group_id The group ID that the new forum should be attached to
    26  * @param string $group_name The group name
    27  * @param string $group_desc The group description
    28  *
    29  * @since BuddyPress (1.0)
     25 * @since BuddyPress (1.0.0)
     26 *
     27 * @param int $group_id The group ID that the new forum should be attached to.
     28 * @param string $group_name The group name.
     29 * @param string $group_desc The group description.
    3030 */
    3131function groups_new_group_forum( $group_id = 0, $group_name = '', $group_desc = '' ) {
     
    5454
    5555/**
    56  * Updates group forum metadata (title, description, slug) when the group's details are edited
    57  *
    58  * @package BuddyPress
    59  * @subpackage Groups
    60  *
    61  * @param int $group_id Group id, passed from groups_details_updated
    62  *
    63  * @since BuddyPress (1.1)
     56 * Update group forum metadata (title, description, slug) when the group's details are edited.
     57 *
     58 * @since BuddyPress (1.1.0)
     59 *
     60 * @param int $group_id Group id, passed from groups_details_updated.
    6461 */
    6562function groups_update_group_forum( $group_id ) {
     
    8885
    8986/**
    90  * Creates a new group forum post.
    91  *
    92  * Uses the bundled version of bbPress packaged with BuddyPress.
    93  *
    94  * @param string $post_text The text for the forum post
    95  * @param int $topic_id The topic ID used so we can identify where the new forum post should reside
    96  * @param mixed $page The page number where the new forum post should reside. Defaults to boolean false.
     87 * Create a new group forum post.
     88 *
     89 * Uses the bundled version of bbPress packaged with BuddyPress.
     90 *
     91 * @since BuddyPress (1.0.0)
     92 *
     93 * @param string $post_text The text for the forum post.
     94 * @param int $topic_id The topic ID used so we can identify where the new
     95 *        forum post should reside.
     96 * @param mixed $page The page number where the new forum post should reside.
     97 *        Default: false.
    9798 * @return mixed The new forum post ID on success. Boolean false on failure.
    98  *
    99  * @since BuddyPress (1.0)
    10099 */
    101100function groups_new_group_forum_post( $post_text, $topic_id, $page = false ) {
     
    140139
    141140/**
    142  * Creates a new group forum topic.
    143  *
    144  * Uses the bundled version of bbPress packaged with BuddyPress.
    145  *
    146  * @param string $topic_title The title for the forum topic
    147  * @param string $topic_text The text for the forum topic
    148  * @param string $topic_tags A comma-delimited string of topic tags
    149  * @param int $forum_id The forum ID this forum topic resides in
     141 * Create a new group forum topic.
     142 *
     143 * Uses the bundled version of bbPress packaged with BuddyPress.
     144 *
     145 * @since BuddyPress (1.0.0)
     146 *
     147 * @param string $topic_title The title for the forum topic.
     148 * @param string $topic_text The text for the forum topic.
     149 * @param string $topic_tags A comma-delimited string of topic tags.
     150 * @param int $forum_id The forum ID this forum topic resides in.
    150151 * @return mixed The new topic object on success. Boolean false on failure.
    151  *
    152  * @since BuddyPress (1.0)
    153152 */
    154153function groups_new_group_forum_topic( $topic_title, $topic_text, $topic_tags, $forum_id ) {
     
    191190
    192191/**
    193  * Updates an existing group forum topic.
    194  *
    195  * Uses the bundled version of bbPress packaged with BuddyPress.
    196  *
    197  * @param int $topic_id The topic ID of the existing forum topic
    198  * @param string $topic_title The title for the forum topic
    199  * @param string $topic_text The text for the forum topic
    200  * @param mixed $topic_tags A comma-delimited string of topic tags. Defaults to boolean false.
     192 * Update an existing group forum topic.
     193 *
     194 * Uses the bundled version of bbPress packaged with BuddyPress.
     195 *
     196 * @since BuddyPress (1.1.0)
     197 *
     198 * @param int $topic_id The topic ID of the existing forum topic.
     199 * @param string $topic_title The title for the forum topic.
     200 * @param string $topic_text The text for the forum topic.
     201 * @param mixed $topic_tags A comma-delimited string of topic tags. Optional.
    201202 * @return mixed The topic object on success. Boolean false on failure.
    202  *
    203  * @since BuddyPress (1.1)
    204203 */
    205204function groups_update_group_forum_topic( $topic_id, $topic_title, $topic_text, $topic_tags = false ) {
     
    251250
    252251/**
    253  * Updates an existing group forum post.
    254  *
    255  * Uses the bundled version of bbPress packaged with BuddyPress.
    256  *
    257  * @param int $post_id The post ID of the existing forum post
    258  * @param string $post_text The text for the forum post
    259  * @param int $topic_id The topic ID of the existing forum topic
    260  * @param mixed $page The page number where the new forum post should reside. Defaults to boolean false.
     252 * Update an existing group forum post.
     253 *
     254 * Uses the bundled version of bbPress packaged with BuddyPress.
     255 *
     256 * @since BuddyPress (1.1.0)
     257 *
     258 * @param int $post_id The post ID of the existing forum post.
     259 * @param string $post_text The text for the forum post.
     260 * @param int $topic_id The topic ID of the existing forum topic.
     261 * @param mixed $page The page number where the new forum post should reside.
     262 *    Optional.
    261263 * @return mixed The forum post ID on success. Boolean false on failure.
    262  *
    263  * @since BuddyPress (1.1)
    264264 */
    265265function groups_update_group_forum_post( $post_id, $post_text, $topic_id, $page = false ) {
     
    320320
    321321/**
    322  * Deletes a group forum topic and also any corresponding activity items.
    323  *
    324  * Uses the bundled version of bbPress packaged with BuddyPress.
    325  *
    326  * @package BuddyPress
    327  *
    328  * @uses bp_activity_delete() to delete corresponding activity items
    329  * @uses bp_forums_get_topic_posts() to get the child posts
    330  * @uses bp_forums_delete_topic() to do the deletion itself
    331  * @param int $topic_id The id of the topic to be deleted
    332  * @return bool True if the delete routine went through properly
    333  *
    334  * @since BuddyPress (1.1)
     322 * Delete a group forum topic and also any corresponding activity items.
     323 *
     324 * Uses the bundled version of bbPress packaged with BuddyPress.
     325 *
     326 * @since BuddyPress (1.1.0)
     327 *
     328 * @param int $topic_id The ID of the topic to be deleted.
     329 * @return bool True if the delete routine went through properly.
    335330 */
    336331function groups_delete_group_forum_topic( $topic_id ) {
     
    373368
    374369/**
    375  * Deletes a group forum post and its corresponding activity item.
    376  *
    377  * Uses the bundled version of bbPress packaged with BuddyPress.
    378  *
    379  * @package BuddyPress
    380  *
    381  * @param int $post_id The id of the post you want to delete
     370 * Delete a group forum post and its corresponding activity item.
     371 *
     372 * Uses the bundled version of bbPress packaged with BuddyPress.
     373 *
     374 * @since BuddyPress (1.1.0)
     375 *
     376 * @param int $post_id The ID of the post you want to delete.
    382377 * @param int $topic_id Optional. The topic to which the post belongs. This
    383  *                      value isn't used in the function but is passed along to
    384  *                      do_action() hooks.
     378 *        value isn't used in the function but is passed along to do_action()
     379 *        hooks.
    385380 * @return bool True on success.
    386  *
    387  * @since BuddyPress (1.1)
    388381 */
    389382function groups_delete_group_forum_post( $post_id, $topic_id = false ) {
     
    411404
    412405/**
    413  * Get a total count of all public topics of a given type, across groups/forums
    414  *
    415  * @package BuddyPress
    416  * @since BuddyPress (1.5)
    417  *
    418  * @param string $type Either 'newest', 'popular', 'unreplied', 'tags'.  Defaults to 'newest'.
    419  * @return int The topic count
     406 * Get a total count of all public topics of a given type, across groups/forums.
     407 *
     408 * @since BuddyPress (1.5.0)
     409 *
     410 * @param string $type Either 'newest', 'popular', 'unreplied', 'tags'.
     411 *        Default: 'newest'.
     412 * @return int The topic count.
    420413 */
    421414function groups_total_public_forum_topic_count( $type = 'newest' ) {
     
    424417
    425418/**
    426  * Get a total count of all topics of a given status, across groups/forums
    427  *
    428  * @package BuddyPress
    429  * @since BuddyPress (1.5)
    430  *
    431  * @param string $status 'public', 'private', 'hidden', 'all' Which group types to count
    432  * @return int The topic count
     419 * Get a total count of all topics of a given status, across groups/forums.
     420 *
     421 * @since BuddyPress (1.5.0)
     422 *
     423 * @param string $status Which groups to count. 'public', 'private', 'hidden',
     424 *        'all'. Default: 'public'.
     425 * @param string $search_terms Optional. Limit by a search term.
     426 * @return int The topic count.
    433427 */
    434428function groups_total_forum_topic_count( $status = 'public', $search_terms = false ) {
Note: See TracChangeset for help on using the changeset viewer.