Skip to:
Content

BuddyPress.org

Changeset 10821


Ignore:
Timestamp:
05/29/2016 07:08:27 AM (9 years ago)
Author:
tw2113
Message:

Plenty of @since tags for the BP Forums component.

See #6399.

Location:
trunk/src/bp-forums
Files:
6 edited

Legend:

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

    r10417 r10821  
    1313/**
    1414 * Bootstrap bbPress 1.x, and manipulate globals to integrate with BuddyPress.
     15 *
     16 * @since 1.1.0
    1517 *
    1618 * @return bool|null Returns false on failure.
     
    157159 * Get the current bbPress user.
    158160 *
     161 * @since 1.1.0
     162 *
    159163 * @return object $current_user Current user object from WordPress.
    160164 */
     
    163167/**
    164168 * Get userdata for a bbPress user.
     169 *
     170 * @since 1.1.0
    165171 *
    166172 * @param int $user_id User ID.
     
    174180 * Noop.
    175181 *
     182 * @since 1.1.0
     183 *
    176184 * @param array $users Array of users.
    177185 */
     
    180188/**
    181189 * The bbPress plugin needs this class for its usermeta manipulation.
     190 *
     191 * @since 1.1.0
    182192 */
    183193class BP_Forums_BB_Auth {
     194
     195    /**
     196     * Update usermeta data.
     197     *
     198     * @since 1.1.0
     199     *
     200     * @param string $args Array of arguments.
     201     * @return bool
     202     */
    184203    function update_meta( $args = '' ) {
    185204        $defaults = array( 'id' => 0, 'meta_key' => null, 'meta_value' => null, 'meta_table' => 'usermeta', 'meta_field' => 'user_id', 'cache_group' => 'users' );
     
    199218 */
    200219if ( ! class_exists( 'BPDB' ) ) :
     220
     221    /**
     222     * WPDB class extension.
     223     *
     224     * @since 1.1.0
     225     */
    201226    class BPDB extends WPDB {
    202227        var $db_servers = array();
     
    204229        /**
    205230         * Constructor.
     231         *
     232         * @since 1.1.0
    206233         *
    207234         * @see WPDB::__construct() for description of parameters.
     
    226253         * supported by WordPress' minimum required MySQL version, so
    227254         * this is safe.
     255         *
     256         * @since 1.1.0
    228257         *
    229258         * @see WPDB::has_cap() for a description of parameters and
     
    280309         * Stub for escape_deep() compatibility.
    281310         *
     311         * @since 1.1.0
     312         *
    282313         * @see WPDB::escape_deep() for description of parameters and
    283314         *      return values.
     
    296327 *
    297328 * The bbPress plugin needs this to convert vars.
     329 *
     330 * @since 1.1.0
    298331 *
    299332 * @param object $object Object to convert.
     
    318351 * Copied from wp-admin/includes/upgrade.php, this will take care of creating
    319352 * the bbPress stand-alone tables without loading a conflicting WP Admin.
     353 *
     354 * @since 1.5.0
    320355 *
    321356 * @see dbDelta() for a description of parameters and return value.
  • trunk/src/bp-forums/bp-forums-filters.php

    r10417 r10821  
    5858/**
    5959 * Custom KSES filter for the Forums component.
     60 *
     61 * @since 1.2.0
    6062 *
    6163 * @param string $content Content to sanitize.
     
    99101 * Get a link for a forum topic tags directory.
    100102 *
     103 * @since 1.1.0
     104 *
    101105 * @param string $link    Link passed from filter.
    102106 * @param string $tag     Name of the tag.
     
    120124 * Add rel="nofollow" to bbPress content.
    121125 *
     126 * @since 1.2.1
     127 *
    122128 * @param string $text Post content.
    123129 * @return string Modified post content.
     
    128134    /**
    129135     * Callback for preg_replace_callback() in bp_forums_make_nofollow_filter().
     136     *
     137     * @since 1.2.1
    130138     *
    131139     * @param array $matches Regex matches from {@link bp_forums_make_nofollow_filter()}.
     
    141149 * Append forum topic to page title.
    142150 *
     151 * @since 1.2.6
     152 *
    143153 * @see bp_modify_page_title()
    144154 *
     
    164174 * Prevents embedded anchor tags.
    165175 *
     176 * @since 1.5.0
     177 *
    166178 * @param string $content Edited post content.
    167179 * @return string $content Sanitized post content.
  • trunk/src/bp-forums/bp-forums-functions.php

    r10417 r10821  
    7777 * Wrapper for {@link bb_get_forum()}.
    7878 *
     79 * @since 1.0.0
     80 *
    7981 * @param int $forum_id ID of the forum being fetched.
    8082 * @return object bbPress forum object.
     
    9193 *
    9294 * Wrapper for {@link bb_new_forum()}.
     95 *
     96 * @since 1.0.0
    9397 *
    9498 * @param array|string $args {
     
    124128 *
    125129 * Wrapper for {@link bb_update_forum(}.
     130 *
     131 * @since 1.2.5
    126132 *
    127133 * @param array|string $args {
     
    159165 * Delete a group forum by the group id.
    160166 *
     167 * @since 1.6.0
     168 *
    161169 * @param int $group_id ID of the group whose forum is to be deleted.
    162170 */
     
    177185/**
    178186 * Fetch a set of forum topics.
     187 *
     188 * @since 1.1.0
    179189 *
    180190 * @param array|string $args {
     
    256266 * Get additional details about a given forum topic.
    257267 *
     268 * @since 1.0.0
     269 *
    258270 * @param int $topic_id ID of the topic for which you're fetching details.
    259271 * @return object Details about the topic.
     
    274286 * Wrapper for {@link bb_get_id_from_slug()}.
    275287 *
     288 * @since 1.1.0
     289 *
    276290 * @param string $topic_slug Slug of the topic.
    277291 * @return int|bool ID of the topic (if found), false on failure.
     
    290304/**
    291305 * Create a new forum topic.
     306 *
     307 * @since 1.0.0
    292308 *
    293309 * @param array|string $args {
     
    374390 * Update a topic's details.
    375391 *
     392 * @since 1.1.0
     393 *
    376394 * @param array|string $args {
    377395 *     Array of arguments.
     
    419437}
    420438
     439/**
     440 * Set a topic as sticky/unsticky.
     441 *
     442 * @since 1.1.0
     443 *
     444 * @param string $args Array of arguments for sticky topic.
     445 * @return bool
     446 */
    421447function bp_forums_sticky_topic( $args = '' ) {
    422448
     
    440466/**
    441467 * Set a topic's open/closed status.
     468 *
     469 * @since 1.1.0
    442470 *
    443471 * @param array|string $args {
     
    470498 * Delete a topic.
    471499 *
     500 * @since 1.1.0
     501 *
    472502 * @param array|string $args {
    473503 *     @type int $topic_id ID of the topic being deleted.
     
    490520/**
    491521 * Get a count of the total topics on the site.
     522 *
     523 * @since 1.2.0
    492524 *
    493525 * @return int $count Total topic count.
     
    593625 * Get a total "Topics Started" count for a given user.
    594626 *
     627 * @since 1.2.0
     628 *
    595629 * @param int    $user_id ID of the user being queried. Falls back on displayed
    596630 *                        user, then loggedin.
     
    694728 * - information about topic users that may have been deleted/spammed
    695729 *
     730 * @since 1.2.0
     731 *
    696732 * @param array $topics Array of topics.
    697733 * @return array $topics Topics with BP details added.
     
    757793 * Get the posts belonging to a topic.
    758794 *
     795 * @since 1.1.0
     796 *
    759797 * @param array|string $args {
    760798 *     @type int    $topic_id ID of the topic for which posts are being fetched.
     
    789827 * Wrapper for {@link bb_get_post()}.
    790828 *
     829 * @since 1.0.0
     830 *
    791831 * @param int $post_id ID of the post being fetched.
    792832 * @return object Post object.
     
    803843 *
    804844 * Wrapper for {@link bb_delete_post()}.
     845 *
     846 * @since 1.1.0
    805847 *
    806848 * @param array|string $args {
     
    825867/**
    826868 * Create a new post.
     869 *
     870 * @since 1.1.0
    827871 *
    828872 * @param array|string $args {
     
    906950 * - BP fullname for each poster
    907951 *
     952 * @since 1.2.0
     953 *
    908954 * @param array $posts List of posts.
    909955 * @return array Posts with BP-data added.
     
    9591005 * Get topic and post counts for a given forum.
    9601006 *
     1007 * @since 1.1.0
     1008 *
    9611009 * @param int $forum_id ID of the forum.
    9621010 * @return object Object with properties $topics (topic count) and $posts
     
    9751023/**
    9761024 * Map WordPress caps onto bbPress users, to ensure that they can post.
     1025 *
     1026 * @since 1.1.0
    9771027 *
    9781028 * @param array $allcaps Array of capabilities.
  • trunk/src/bp-forums/bp-forums-loader.php

    r10417 r10821  
    1616defined( 'ABSPATH' ) || exit;
    1717
     18/**
     19 * Sets up the forums component.
     20 *
     21 * @since 1.5.0
     22 */
    1823class BP_Forums_Component extends BP_Component {
    1924
     
    8085    /**
    8186     * Include bp-forums files.
     87     *
     88     * @since 1.5.0
    8289     *
    8390     * @see BP_Component::includes() for description of parameters.
     
    239246    /**
    240247     * Set up the title for pages and the <title> element.
     248     *
     249     * @since 1.5.0
    241250     */
    242251    public function setup_title() {
     
    264273/**
    265274 * Set up the bp-forums component.
     275 *
     276 * @since 1.6.0
    266277 */
    267278function bp_setup_forums() {
  • trunk/src/bp-forums/bp-forums-screens.php

    r10417 r10821  
    1313/**
    1414 * Load the Forums directory.
     15 *
     16 * @since 1.1.0
    1517 */
    1618function bp_forums_directory_forums_setup() {
     
    103105/**
    104106 * Load the Topics Started screen.
     107 *
     108 * @since 1.5.0
    105109 */
    106110function bp_member_forums_screen_topics() {
     
    125129/**
    126130 * Load the Replied To screen.
     131 *
     132 * @since 1.5.0
    127133 */
    128134function bp_member_forums_screen_replies() {
     
    149155 *
    150156 * Note that this feature is not fully implemented at the moment.
     157 *
     158 * @since 1.5.0
    151159 */
    152160function bp_member_forums_screen_favorites() {
     
    171179/**
    172180 * Load a single forum page.
     181 *
     182 * @since 1.5.0
    173183 */
    174184function bp_forums_screen_single_forum() {
     
    197207/**
    198208 * Load a single forum topic page.
     209 *
     210 * @since 1.5.0
    199211 */
    200212function bp_forums_screen_single_topic() {
  • trunk/src/bp-forums/bp-forums-template.php

    r10712 r10821  
    105105 *
    106106 * Responsible for loading a group of forum topics into a loop for display.
     107 *
     108 * @since 1.0.0
    107109 */
    108110class BP_Forums_Template_Forum {
     
    110112     * The loop iterator.
    111113     *
     114     * @since 1.0.0
    112115     * @var int
    113116     */
     
    117120     * The number of topics returned by the paged query.
    118121     *
     122     * @since 1.0.0
    119123     * @var int
    120124     */
     
    124128     * Array of topics located by the query.
    125129     *
     130     * @since 1.0.0
    126131     * @var array
    127132     */
     
    131136     * The topic object currently being iterated on.
    132137     *
     138     * @since 1.0.0
    133139     * @var object
    134140     */
     
    138144     * The ID of the forum whose topics are being queried.
    139145     *
     146     * @since 1.5.0
    140147     * @var int
    141148     */
     
    145152     * A flag for whether the loop is currently being iterated.
    146153     *
     154     * @since 1.0.0
    147155     * @var bool
    148156     */
     
    152160     * The page number being requested.
    153161     *
     162     * @since 1.0.0
    154163     * @var int
    155164     */
     
    159168     * The number of items being requested per page.
    160169     *
     170     * @since 1.0.0
    161171     * @var int
    162172     */
     
    166176     * An HTML string containing pagination links.
    167177     *
     178     * @since 1.0.0
    168179     * @var string
    169180     */
     
    173184     * The total number of topics matching the query parameters.
    174185     *
     186     * @since 1.0.0
    175187     * @var int
    176188     */
     
    180192     * Whether requesting a single topic. Not currently used.
    181193     *
     194     * @since 1.0.0
    182195     * @var bool
    183196     */
     
    187200     * Term to sort by. Not currently used.
    188201     *
     202     * @since 1.0.0
    189203     * @var string
    190204     */
     
    194208     * Sort order. Not currently used.
    195209     *
     210     * @since 1.0.0
    196211     * @var string
    197212     */
     
    200215    /**
    201216     * Constructor method.
     217     *
     218     * @since 1.5.0
    202219     *
    203220     * @param string   $type         The 'type' is the sort order/kind. 'newest',
     
    357374     * Whether there are topics available in the loop.
    358375     *
     376     * @since 1.0.0
     377     *
    359378     * @see bp_has_forum_topics()
    360379     *
     
    372391     * Set up the next topic and iterate index.
    373392     *
     393     * @since 1.0.0
     394     *
    374395     * @return object The next topic to iterate over.
    375396     */
     
    383404    /**
    384405     * Rewind the topics and reset topic index.
     406     *
     407     * @since 1.0.0
    385408     */
    386409    function rewind_topics() {
     
    399422     *
    400423     * @see bp_forum_topics()
     424     *
     425     * @since 1.0.0
    401426     *
    402427     * @return bool True if there are more topics to show, otherwise false.
     
    424449     * Set up the current topic in the loop.
    425450     *
     451     * @since 1.0.0
     452     *
    426453     * @see bp_the_forum_topic()
    427454     */
     
    451478 * are determined dynamically, depending on your current page. All of these
    452479 * $defaults can be overridden in the $args parameter.
     480 *
     481 * @since 1.1.0
    453482 *
    454483 * @uses apply_filters() Filter 'bp_has_topics' to manipulate the
     
    664693 * Determine whether there are still topics left in the loop.
    665694 *
     695 * @since 1.1.0
     696 *
    666697 * @global BP_Forums_Template_Forum $forum_template Template global.
    667698 *
     
    676707 * Get the current topic object in the loop.
    677708 *
     709 * @since 1.1.0
     710 *
    678711 * @global BP_Forums_Template_Forum $forum_template Template global.
    679712 *
     
    687720/**
    688721 * Output the ID of the current topic in the loop.
     722 *
     723 * @since 1.0.0
    689724 */
    690725function bp_the_topic_id() {
     
    694729     * Return the ID of the current topic in the loop.
    695730     *
     731     * @since 1.0.0
     732     *
    696733     * @return int ID of the current topic in the loop.
    697734     */
     
    711748/**
    712749 * Output the title of the current topic in the loop.
     750 *
     751 * @since 1.0.0
    713752 */
    714753function bp_the_topic_title() {
     
    718757     * Return the title of the current topic in the loop.
    719758     *
     759     * @since 1.0.0
     760     *
    720761     * @return string Title of the current topic in the loop.
    721762     */
     
    735776/**
    736777 * Output the slug of the current topic in the loop.
     778 *
     779 * @since 1.0.0
    737780 */
    738781function bp_the_topic_slug() {
     
    742785     * Return the slug of the current topic in the loop.
    743786     *
     787     * @since 1.0.0
     788     *
    744789     * @return string Slug of the current topic in the loop.
    745790     */
     
    759804/**
    760805 * Output the text of the first post in the current topic in the loop.
     806 *
     807 * @since 1.1.0
    761808 */
    762809function bp_the_topic_text() {
     
    766813     * Return the text of the first post in the current topic in the loop.
    767814     *
     815     * @since 1.1.0
     816     *
    768817     * @return string Text of the first post in the current topic.
    769818     */
     
    785834/**
    786835 * Output the ID of the user who posted the current topic in the loop.
     836 *
     837 * @since 1.0.0
    787838 */
    788839function bp_the_topic_poster_id() {
     
    792843     * Return the ID of the user who posted the current topic in the loop.
    793844     *
     845     * @since 1.0.0
     846     *
    794847     * @return int ID of the user who posted the current topic.
    795848     */
     
    810863 * Output the avatar of the user who posted the current topic in the loop.
    811864 *
     865 * @since 1.0.0
     866 *
    812867 * @see bp_get_the_topic_poster_avatar() for a description of arguments.
    813868 *
     
    819874    /**
    820875     * Return the avatar of the user who posted the current topic in the loop.
     876     *
     877     * @since 1.0.0
    821878     *
    822879     * @param array|string $args {
     
    860917/**
    861918 * Output the name of the user who posted the current topic in the loop.
     919 *
     920 * @since 1.0.0
    862921 */
    863922function bp_the_topic_poster_name() {
     
    867926     * Return the name of the user who posted the current topic in the loop.
    868927     *
     928     * @since 1.0.0
     929     *
    869930     * @return string Name of the user who posted the current topic.
    870931     */
     
    889950/**
    890951 * Output the ID of the object associated with the current topic in the loop.
     952 *
     953 * @since 1.1.0
    891954 */
    892955function bp_the_topic_object_id() {
     
    898961     * Objects are things like associated groups.
    899962     *
     963     * @since 1.1.0
     964     *
    900965     * @return int ID of the associated object.
    901966     */
     
    917982/**
    918983 * Output the name of the object associated with the current topic in the loop.
     984 *
     985 * @since 1.1.0
    919986 */
    920987function bp_the_topic_object_name() {
     
    926993     * Objects are things like groups. So this function would return the
    927994     * name of the group associated with the forum topic, if it exists.
     995     *
     996     * @since 1.1.0
    928997     *
    929998     * @return string Object name.
     
    9521021/**
    9531022 * Output the slug of the object associated with the current topic in the loop.
     1023 *
     1024 * @since 1.1.0
    9541025 */
    9551026function bp_the_topic_object_slug() {
     
    9621033     * slug of the group associated with the forum topic, if it exists.
    9631034     *
     1035     * @since 1.1.0
     1036     *
    9641037     * @return string Object slug.
    9651038     */
     
    9821055/**
    9831056 * Output the permalink of the object associated with the current topic in the loop.
     1057 *
     1058 * @since 1.1.0
    9841059 */
    9851060function bp_the_topic_object_permalink() {
     
    9911066     * Objects are things like groups. So this function would return the
    9921067     * permalink of the group associated with the forum topic, if it exists.
     1068     *
     1069     * @since 1.1.0
    9931070     *
    9941071     * @return string Object permalink.
     
    10181095/**
    10191096 * Output the linked name of the user who last posted to the current topic in the loop.
     1097 *
     1098 * @since 1.0.0
    10201099 */
    10211100function bp_the_topic_last_poster_name() {
     
    10241103    /**
    10251104     * Return the linked name of the user who last posted to the current topic in the loop.
     1105     *
     1106     * @since 1.0.0
    10261107     *
    10271108     * @return string HTML link to the profile of the user who last posted
     
    10521133 * Output the permalink of the object associated with the current topic in the loop.
    10531134 *
     1135 * @since 1.1.0
     1136 *
    10541137 * @see bp_get_the_topic_object_avatar() for description of arguments.
    10551138 *
     
    10641147     * Objects are things like groups. So this function would return the
    10651148     * avatar of the group associated with the forum topic, if it exists.
     1149     *
     1150     * @since 1.1.0
    10661151     *
    10671152     * @param array|string $args {
     
    11091194 * Output the avatar for the user who last posted to the current topic in the loop.
    11101195 *
     1196 * @since 1.0.0
     1197 *
    11111198 * @see bp_get_the_topic_last_poster_avatar() for description of arguments.
    11121199 *
     
    11181205    /**
    11191206     * Return the avatar for the user who last posted to the current topic in the loop.
     1207     *
     1208     * @since 1.0.0
    11201209     *
    11211210     * @param array|string $args {
     
    11591248/**
    11601249 * Output the start time of the current topic in the loop.
     1250 *
     1251 * @since 1.0.0
    11611252 */
    11621253function bp_the_topic_start_time() {
     
    11661257     * Return the start time of the current topic in the loop.
    11671258     *
     1259     * @since 1.0.0
     1260     *
    11681261     * @return string Start time of the current topic.
    11691262     */
     
    11831276/**
    11841277 * Output the topic time of the current topic in the loop.
     1278 *
     1279 * @since 1.0.0
    11851280 */
    11861281function bp_the_topic_time() {
     
    11901285     * Return the topic time of the current topic in the loop.
    11911286     *
     1287     * @since 1.0.0
     1288     *
    11921289     * @return string Topic time of the current topic.
    11931290     */
     
    12071304/**
    12081305 * Output the ID of the forum associated with the current topic in the loop.
     1306 *
     1307 * @since 1.0.0
    12091308 */
    12101309function bp_the_topic_forum_id() {
     
    12141313     * Return the ID of the forum associated with the current topic in the loop.
    12151314     *
     1315     * @since 1.0.0
     1316     *
    12161317     * @return int ID of the forum associated with the current topic.
    12171318     */
     
    12311332/**
    12321333 * Output the status of the current topic in the loop.
     1334 *
     1335 * @since 1.0.0
    12331336 */
    12341337function bp_the_topic_status() {
     
    12381341     * Return the status of the current topic in the loop.
    12391342     *
     1343     * @since 1.0.0
     1344     *
    12401345     * @return string Status of the current topic.
    12411346     */
     
    12551360/**
    12561361 * Output whether the current topic in the loop is open.
     1362 *
     1363 * @since 1.0.0
    12571364 */
    12581365function bp_the_topic_is_topic_open() {
     
    12621369     * Return whether the current topic in the loop is open.
    12631370     *
     1371     * @since 1.0.0
     1372     *
    12641373     * @return string
    12651374     */
     
    12791388/**
    12801389 * Output the ID of the last post in the current topic in the loop.
     1390 *
     1391 * @since 1.0.0
    12811392 */
    12821393function bp_the_topic_last_post_id() {
     
    12861397     * Return the ID of the last post in the current topic in the loop.
    12871398     *
     1399     * @since 1.0.0
     1400     *
    12881401     * @return int ID of the last post in the current topic.
    12891402     */
     
    13031416/**
    13041417 * Output whether the current topic in the loop is sticky.
     1418 *
     1419 * @since 1.0.0
    13051420 */
    13061421function bp_the_topic_is_sticky() {
     
    13101425     * Return whether the current topic in the loop is sticky.
    13111426     *
     1427     * @since 1.0.0
     1428     *
    13121429     * @return bool
    13131430     */
     
    13271444/**
    13281445 * Output a 'x posts' string with the number of posts in the current topic.
     1446 *
     1447 * @since 1.0.0
    13291448 */
    13301449function bp_the_topic_total_post_count() {
     
    13331452    /**
    13341453     * Return a 'x posts' string with the number of posts in the current topic.
     1454     *
     1455     * @since 1.0.0
    13351456     *
    13361457     * @return string String of the form 'x posts'.
     
    13581479/**
    13591480 * Output the total number of posts in the current topic in the loop.
     1481 *
     1482 * @since 1.1.0
    13601483 */
    13611484function bp_the_topic_total_posts() {
     
    13651488     * Return the total number of posts in the current topic in the loop.
    13661489     *
     1490     * @since 1.1.0
     1491     *
    13671492     * @return int Total number of posts in the current topic.
    13681493     */
     
    13821507/**
    13831508 * Output the tag count for the current topic in the loop.
     1509 *
     1510 * @since 1.0.0
    13841511 */
    13851512function bp_the_topic_tag_count() {
     
    13891516     * Return the tag count for the current topic in the loop.
    13901517     *
     1518     * @since 1.0.0
     1519     *
    13911520     * @return int Tag count for the current topic.
    13921521     */
     
    14061535/**
    14071536 * Output the permalink of the current topic in the loop.
     1537 *
     1538 * @since 1.0.0
    14081539 */
    14091540function bp_the_topic_permalink() {
     
    14121543    /**
    14131544     * Return the permalink for the current topic in the loop.
     1545     *
     1546     * @since 1.0.0
    14141547     *
    14151548     * @return string Permalink for the current topic.
     
    14471580/**
    14481581 * Output a 'since' string describing when the current topic was created.
     1582 *
     1583 * @since 1.0.0
    14491584 */
    14501585function bp_the_topic_time_since_created() {
     
    14541589     * Return a 'since' string describing when the current topic was created.
    14551590     *
     1591     * @since 1.0.0
     1592     *
    14561593     * @see bp_core_time_since() for a description of return value.
    14571594     *
     
    14741611 * Output an excerpt from the latest post of the current topic in the loop.
    14751612 *
     1613 * @since 1.0.0
     1614 *
    14761615 * @param array|string $args See {@bp_get_the_topic_latest_post_excerpt()}.
    14771616 */
     
    14811620    /**
    14821621     * Return an excerpt from the latest post of the current topic in the loop.
     1622     *
     1623     * @since 1.0.0
    14831624     *
    14841625     * @param array|string $args {
     
    15131654/**
    15141655 * Output a 'since' string describing when the last post in the current topic was created.
     1656 *
     1657 * @since 1.0.0
    15151658 */
    15161659function bp_the_topic_time_since_last_post() {
     
    15201663     * Return a 'since' string describing when the last post in the current topic was created.
    15211664     *
     1665     * @since 1.0.0
     1666     *
    15221667     * @see bp_core_time_since() for a description of return value.
    15231668     *
     
    15391684/**
    15401685 * Output whether the current topic in the loop belongs to the logged-in user.
     1686 *
     1687 * @since 1.1.0
    15411688 */
    15421689function bp_the_topic_is_mine() {
     
    15461693     * Does the current topic belong to the logged-in user?
    15471694     *
     1695     * @since 1.1.0
     1696     *
    15481697     * @return bool True if the current topic in the loop was created by
    15491698     *              the logged-in user, otherwise false.
     
    15581707 * Output the admin links for the current topic in the loop.
    15591708 *
     1709 * @since 1.1.0
     1710 *
    15601711 * @see bp_get_the_topic_admin_links() for a description of arguments.
    15611712 *
     
    15671718    /**
    15681719     * Return the admin links for the current topic in the loop.
     1720     *
     1721     * @since 1.1.0
    15691722     *
    15701723     * @param array|string $args {
     
    16041757/**
    16051758 * Output the CSS class for the current topic in the loop.
     1759 *
     1760 * @since 1.1.0
    16061761 */
    16071762function bp_the_topic_css_class() {
     
    16141769     * based on context.
    16151770     *
     1771     * @since 1.1.0
     1772     *
    16161773     * @return string Contents of the 'class' attribute.
    16171774     */
     
    16451802/**
    16461803 * Output the permalink to the 'personal' topics tab.
     1804 *
     1805 * @since 1.1.0
    16471806 */
    16481807function bp_my_forum_topics_link() {
     
    16521811     * Return the permalink to the 'personal' topics tab.
    16531812     *
     1813     * @since 1.1.0
     1814     *
    16541815     * @return string Link to the 'personal' topics tab.
    16551816     */
     
    16671828/**
    16681829 * Output the permalink to the 'unreplied' topics tab.
     1830 *
     1831 * @since 1.1.0
    16691832 */
    16701833function bp_unreplied_forum_topics_link() {
     
    16741837     * Return the permalink to the 'unreplied' topics tab.
    16751838     *
     1839     * @since 1.1.0
     1840     *
    16761841     * @return string Link to the 'unreplied' topics tab.
    16771842     */
     
    16891854/**
    16901855 * Output the permalink to the 'popular' topics tab.
     1856 *
     1857 * @since 1.1.0
    16911858 */
    16921859function bp_popular_forum_topics_link() {
     
    16961863     * Return the permalink to the 'popular' topics tab.
    16971864     *
     1865     * @since 1.1.0
     1866     *
    16981867     * @return string Link to the 'popular' topics tab.
    16991868     */
     
    17111880/**
    17121881 * Output the link to the forums directory.
     1882 *
     1883 * @since 1.1.0
    17131884 */
    17141885function bp_newest_forum_topics_link() {
     
    17181889     * Return the link to the forums directory.
    17191890     *
     1891     * @since 1.1.0
     1892     *
    17201893     * @return string Link to the forums directory.
    17211894     */
     
    17331906/**
    17341907 * Output the currently viewed topic list type.
     1908 *
     1909 * @since 1.1.0
    17351910 */
    17361911function bp_forum_topic_type() {
     
    17411916     *
    17421917     * Eg, 'newest', 'popular', etc.
     1918     *
     1919     * @since 1.1.0
    17431920     *
    17441921     * @return string Type of the currently viewed topic list.
     
    18061983 * Output the currently viewed tag name.
    18071984 *
     1985 * @since 1.1.0
     1986 *
    18081987 * @todo Deprecate?
    18091988 */
     
    18141993     * Return the currently viewed tag name.
    18151994     *
     1995     * @since 1.1.0
     1996     *
    18161997     * @todo Deprecate? Seems unused
    18171998     *
     
    18262007/**
    18272008 * Output the pagination links for the current topic list.
     2009 *
     2010 * @since 1.0.0
    18282011 */
    18292012function bp_forum_pagination() {
     
    18332016     * Return the pagination links for the current topic list.
    18342017     *
     2018     * @since 1.0.0
     2019     *
    18352020     * @return string HTML pagination links.
    18362021     */
     
    18502035/**
    18512036 * Output the pagination count for the current topic list.
     2037 *
     2038 * @since 1.0.0
    18522039 */
    18532040function bp_forum_pagination_count() {
     
    18582045     *
    18592046     * The "count" is a string of the form "Viewing x of y topics".
     2047     *
     2048     * @since 1.5.0
    18602049     *
    18612050     * @return string
     
    18952084 * Are we currently on an Edit Topic screen?
    18962085 *
     2086 * @since 1.1.0
     2087 *
    18972088 * @return bool True if currently editing a topic, otherwise false.
    18982089 */
     
    19092100 *
    19102101 * Responsible for loading a topic's posts into a loop for display.
     2102 *
     2103 * @since 1.0.0
    19112104 */
    19122105class BP_Forums_Template_Topic {
     
    19142107     * The loop iterator.
    19152108     *
     2109     * @since 1.0.0
    19162110     * @var int
    19172111     */
     
    19212115     * The number of posts returned by the paged query.
    19222116     *
     2117     * @since 1.0.0
    19232118     * @var int
    19242119     */
     
    19282123     * Array of posts located by the query.
    19292124     *
     2125     * @since 1.0.0
    19302126     * @var array
    19312127     */
     
    19352131     * The post object currently being iterated on.
    19362132     *
     2133     * @since 1.0.0
    19372134     * @var object
    19382135     */
     
    19422139     * The ID of the forum whose topic is being queried.
    19432140     *
     2141     * @since 1.5.0
    19442142     * @var int
    19452143     */
     
    19492147     * The ID of the topic whose posts are being queried.
    19502148     *
     2149     * @since 1.0.0
    19512150     * @var int
    19522151     */
     
    19562155     * The topic object to which the posts belong.
    19572156     *
     2157     * @since 1.0.0
    19582158     * @var object
    19592159     */
     
    19632163     * A flag for whether the loop is currently being iterated.
    19642164     *
     2165     * @since 1.0.0
    19652166     * @var bool
    19662167     */
     
    19792180     * The page number being requested.
    19802181     *
     2182     * @since 1.0.0
    19812183     * @var int
    19822184     */
     
    19862188     * The number of items being requested per page.
    19872189     *
     2190     * @since 1.0.0
    19882191     * @var int
    19892192     */
     
    19932196     * An HTML string containing pagination links.
    19942197     *
     2198     * @since 1.0.0
    19952199     * @var string
    19962200     */
     
    20002204     * The total number of posts matching the query parameters.
    20012205     *
     2206     * @since 1.0.0
    20022207     * @var int
    20032208     */
     
    20072212     * Whether requesting a single topic. Not currently used.
    20082213     *
     2214     * @since 1.0.0
    20092215     * @var bool
    20102216     */
     
    20142220     * Term to sort by.
    20152221     *
     2222     * @since 1.0.0
    20162223     * @var string
    20172224     */
     
    20212228     * Sort order.
    20222229     *
     2230     * @since 1.0.0
    20232231     * @var string
    20242232     */
     
    20272235    /**
    20282236     * Constructor method.
     2237     *
     2238     * @since 1.5.0
    20292239     *
    20302240     * @param int    $topic_id ID of the topic whose posts are being requested.
     
    20972307     * Whether there are posts available in the loop.
    20982308     *
     2309     * @since 1.0.0
     2310     *
    20992311     * @see bp_has_forum_topic_posts()
    21002312     *
     
    21112323     * Set up the next post and iterate index.
    21122324     *
     2325     * @since 1.0.0
     2326     *
    21132327     * @return object The next post to iterate over.
    21142328     */
     
    21222336    /**
    21232337     * Rewind the posts and reset post index.
     2338     *
     2339     * @since 1.0.0
    21242340     */
    21252341    function rewind_posts() {
     
    21362352     * the while loop that controls iteration inside the blogs loop, eg:
    21372353     *     while ( bp_forum_topic_posts() ) { ...
     2354     *
     2355     * @since 1.0.0
    21382356     *
    21392357     * @see bp_forum_topic_posts()
     
    21632381     * Set up the current topic in the loop.
    21642382     *
     2383     * @since 1.0.0
     2384     *
    21652385     * @see bp_the_forum_topic_post()
    21662386     */
     
    21852405/**
    21862406 * Initiate the loop for a single topic's posts.
     2407 *
     2408 * @since 1.1.0
    21872409 *
    21882410 * @param array|string $args {
     
    22392461 * Determine whether there are posts left in the loop.
    22402462 *
     2463 * @since 1.1.0
     2464 *
    22412465 * @return bool True when posts are found.
    22422466 */
     
    22492473 * Set up the current post in the loop.
    22502474 *
     2475 * @since 1.1.0
     2476 *
    22512477 * @return object
    22522478 */
     
    22582484/**
    22592485 * Output the ID of the current post in the loop.
     2486 *
     2487 * @since 1.0.0
    22602488 */
    22612489function bp_the_topic_post_id() {
     
    22652493     * Return the ID of the current post in the loop.
    22662494     *
     2495     * @since 1.0.0
     2496     *
    22672497     * @return int ID of the current post in the loop.
    22682498     */
     
    22822512/**
    22832513 * Output the content of the current post in the loop.
     2514 *
     2515 * @since 1.0.0
    22842516 */
    22852517function bp_the_topic_post_content() {
     
    22892521     * Return the content of the current post in the loop.
    22902522     *
     2523     * @since 1.0.0
     2524     *
    22912525     * @return string Content of the current post.
    22922526     */
     
    23062540/**
    23072541 * Output the CSS class of the current post in the loop.
     2542 *
     2543 * @since 1.2.4
    23082544 */
    23092545function bp_the_topic_post_css_class() {
     
    23162552     * context.
    23172553     *
     2554     * @since 1.2.4
     2555     *
    23182556     * @return string String to put in the 'class' attribute of the current
    23192557     *                post.
     
    23492587 * Output the avatar of the user who posted the current post in the loop.
    23502588 *
     2589 * @since 1.0.0
     2590 *
    23512591 * @see bp_get_the_topic_post_poster_avatar() for a description of arguments.
    23522592 *
     
    23582598    /**
    23592599     * Return the avatar of the user who posted the current post in the loop.
     2600     *
     2601     * @since 1.0.0
    23602602     *
    23612603     * @param array|string $args {
     
    23992641/**
    24002642 * Output the name of the user who posted the current post in the loop.
     2643 *
     2644 * @since 1.0.0
    24012645 */
    24022646function bp_the_topic_post_poster_name() {
     
    24062650     * Return the name of the user who posted the current post in the loop.
    24072651     *
     2652     * @since 1.0.0
     2653     *
    24082654     * @return string Name of the user who posted the current post.
    24092655     */
     
    24262672/**
    24272673 * Output a link to the profile of the user who posted the current post.
     2674 *
     2675 * @since 1.2.0
    24282676 */
    24292677function bp_the_topic_post_poster_link() {
     
    24332681     * Return a link to the profile of the user who posted the current post.
    24342682     *
     2683     * @since 1.2.0
     2684     *
    24352685     * @return string Link to the profile of the user who posted the
    24362686     *                current post.
     
    24512701/**
    24522702 * Output a 'since' string describing when the current post in the loop was posted.
     2703 *
     2704 * @since 1.0.0
    24532705 */
    24542706function bp_the_topic_post_time_since() {
     
    24582710     * Return a 'since' string describing when the current post in the loop was posted.
    24592711     *
     2712     * @since 1.0.0
     2713     *
    24602714     * @see bp_core_time_since() for a description of return value.
    24612715     *
     
    24772731/**
    24782732 * Output whether the current post in the loop belongs to the logged-in user.
     2733 *
     2734 * @since 1.1.0
    24792735 */
    24802736function bp_the_topic_post_is_mine() {
     
    24842740     * Does the current post belong to the logged-in user?
    24852741     *
     2742     * @since 1.1.0
     2743     *
    24862744     * @return bool True if the current post in the loop was created by
    24872745     *              the logged-in user, otherwise false.
     
    24962754 * Output the admin links for the current post in the loop.
    24972755 *
     2756 * @since 1.1.0
     2757 *
    24982758 * @see bp_get_the_post_admin_links() for a description of arguments.
    24992759 *
     
    25052765    /**
    25062766     * Return the admin links for the current post in the loop.
     2767     *
     2768     * @since 1.1.0
    25072769     *
    25082770     * @param array|string $args {
     
    25462808/**
    25472809 * Output the text to edit when editing a post.
     2810 *
     2811 * @since 1.1.0
    25482812 */
    25492813function bp_the_topic_post_edit_text() {
     
    25532817     * Return the text to edit when editing a post.
    25542818     *
     2819     * @since 1.1.0
     2820     *
    25552821     * @return string Editable text.
    25562822     */
     
    25702836/**
    25712837 * Output the pagination links for the current topic.
     2838 *
     2839 * @since 1.0.0
    25722840 */
    25732841function bp_the_topic_pagination() {
     
    25772845     * Return the pagination links for the current topic page.
    25782846     *
     2847     * @since 1.0.0
     2848     *
    25792849     * @return string HTML pagination links.
    25802850     */
     
    25972867 *
    25982868 * The "count" is a string of the form "Viewing x of y posts".
     2869 *
     2870 * @since 1.0.0
    25992871 */
    26002872function bp_the_topic_pagination_count() {
     
    26272899/**
    26282900 * Output whether this is the last page in the current topic.
     2901 *
     2902 * @since 1.2.0
    26292903 */
    26302904function bp_the_topic_is_last_page() {
     
    26342908     * Is this the last page in the current topic?
    26352909     *
     2910     * @since 1.2.0
     2911     *
    26362912     * @return bool True if this is the last page of posts for the current
    26372913     *              topic, otherwise false.
     
    26522928/**
    26532929 * Output the forums directory search form.
     2930 *
     2931 * @since 1.1.0
    26542932 */
    26552933function bp_directory_forums_search_form() {
     
    26752953 * Output the link to a given forum.
    26762954 *
     2955 * @since 1.0.0
     2956 *
    26772957 * @see bp_get_forum_permalink() for a description of arguments.
    26782958 *
     
    26842964    /**
    26852965     * Return the permalink to a given forum.
     2966     *
     2967     * @since 1.0.0
    26862968     *
    26872969     * @param int $forum_id Optional. Defaults to the current forum, if
     
    27193001 * Output the name of a given forum.
    27203002 *
     3003 * @since 1.5.0
     3004 *
    27213005 * @see bp_get_forum_name() for a description of parameters.
    27223006 *
     
    27283012    /**
    27293013     * Return the name of a given forum.
     3014     *
     3015     * @since 1.5.0
    27303016     *
    27313017     * @param int $forum_id Optional. Defaults to the current forum, if
     
    27633049 * defaults.
    27643050 *
     3051 * @since 1.1.0
     3052 *
    27653053 * @param array|string $args {
    27663054 *     An array of optional arguments.
     
    28563144/**
    28573145 * Output a URL to use in as a forum form 'action'.
     3146 *
     3147 * @since 1.0.0
    28583148 */
    28593149function bp_forum_action() {
     
    28633153     * Get a URL to use in as a forum form 'action'.
    28643154     *
     3155     * @since 1.0.0
     3156     *
    28653157     * @return string URL of the current page, minus query args.
    28663158     */
     
    28803172/**
    28813173 * Output a URL to use in as a forum topic form 'action'.
     3174 *
     3175 * @since 1.0.0
    28823176 */
    28833177function bp_forum_topic_action() {
     
    28873181     * Get a URL to use in as a forum topic form 'action'.
    28883182     *
     3183     * @since 1.0.0
     3184     *
    28893185     * @return string URL of the current page, minus query args.
    28903186     */
     
    29033199/**
    29043200 * Output the total topic count for a given user.
     3201 *
     3202 * @since 1.2.0
    29053203 *
    29063204 * @see bp_get_forum_topic_count_for_user() for description of parameters.
     
    29143212     * Return the total topic count for a given user.
    29153213     *
     3214     * @since 1.2.0
     3215     *
    29163216     * @param int $user_id See {@link bp_forums_total_topic_count_for_user}.
    29173217     *
     
    29323232/**
    29333233 * Output the total topic count for a given user.
     3234 *
     3235 * @since 1.2.0
    29343236 *
    29353237 * @see bp_get_forum_topic_count() for description of parameters.
     
    29433245     * Return the total topic count for a given user.
    29443246     *
     3247     * @since 1.2.0
     3248     *
    29453249     * @param int $user_id See {@link bp_forums_total_topic_count()}.
    29463250     *
Note: See TracChangeset for help on using the changeset viewer.