Skip to:
Content

bbPress.org


Ignore:
Timestamp:
04/12/2011 03:42:06 PM (15 years ago)
Author:
johnjamesjacoby
Message:

Fixes #1496. Documentation clean-up. Fix incorrect references to split/merge. Fix incorrect post_field usage where post_parent was used rather than post_type. Fix incorrect function usage for querying topic id's from a forum. Props GautamGupta

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/plugin/bbp-includes/bbp-forum-template.php

    r2981 r2993  
    1111
    1212/**
    13  * Return the unique ID of the custom post type for forums
     13 * Output the unique id of the custom post type for forums
    1414 *
    1515 * @since bbPress (r2857)
    16  *
    17  * @global bbPress $bbp
    18  * @return string
     16 * @uses bbp_get_forum_post_type() To get the forum post type
    1917 */
    2018function bbp_forum_post_type() {
     
    2220}
    2321        /**
    24          * Return the unique ID of the custom post type for forums
     22         * Return the unique id of the custom post type for forums
    2523         *
    2624         * @since bbPress (r2857)
    2725         *
    28          * @global bbPress $bbp
    29          * @return string
     26         * @uses apply_filters() Calls 'bbp_get_forum_post_type' with the forum
     27         *                        post type id
     28         * @return string The unique forum post type id
    3029         */
    3130        function bbp_get_forum_post_type() {
    3231                global $bbp;
     32
    3333                return apply_filters( 'bbp_get_forum_post_type', $bbp->forum_post_type );
    3434        }
     
    4545 * @param mixed $args All the arguments supported by {@link WP_Query}
    4646 * @uses WP_Query To make query and get the forums
     47 * @uses bbp_get_forum_post_type() To get the forum post type id
     48 * @uses bbp_get_forum_id() To get the forum id
     49 * @uses get_option() To get the forums per page option
    4750 * @uses current_user_can() To check if the current user is capable of editing
    4851 *                           others' forums
     
    132135         * @uses bbp_is_topic() To check if it's a topic page
    133136         * @uses bbp_get_topic_forum_id() To get the topic forum id
    134          * @uses apply_filters() Calls 'bbp_get_forum_id' with the forum id
    135          * @return int Forum id
     137         * @uses get_post_field() To get the post's post type
     138         * @uses apply_filters() Calls 'bbp_get_forum_id' with the forum id and
     139         *                        supplied forum id
     140         * @return int The forum id
    136141         */
    137142        function bbp_get_forum_id( $forum_id = 0 ) {
     
    393398         * @param int $forum_id Optional. Forum id
    394399         * @uses bbp_get_forum_id() To get the forum id
     400         * @uses bbp_get_forum_last_active_id() To get the forum last active id
     401         * @uses bbp_get_forum_last_reply_id() To get the forum last reply id
     402         * @uses bbp_get_forum_last_topic_id() To get the forum last topic id
    395403         * @uses bbp_get_forum_last_reply_url() To get the forum last reply url
    396404         * @uses bbp_get_forum_last_reply_title() To get the forum last reply
    397405         *                                         title
    398          * @uses bbp_get_forum_last_active_time() To get the time when the forum was
    399          *                                    last active
     406         * @uses bbp_get_forum_last_topic_permalink() To get the forum last
     407         *                                             topic permalink
     408         * @uses bbp_get_forum_last_topic_title() To get the forum last topic
     409         *                                         title
     410         * @uses bbp_get_forum_last_active_time() To get the time when the forum
     411         *                                         was last active
    400412         * @uses apply_filters() Calls 'bbp_get_forum_freshness_link' with the
    401413         *                        link and forum id
    402414         */
    403415        function bbp_get_forum_freshness_link( $forum_id = 0 ) {
    404                 $forum_id   = bbp_get_forum_id( $forum_id );
    405                 $active_id  = bbp_get_forum_last_active_id( $forum_id );
     416                $forum_id  = bbp_get_forum_id( $forum_id );
     417                $active_id = bbp_get_forum_last_active_id( $forum_id );
    406418
    407419                if ( empty( $active_id ) )
     
    748760         * @uses bbp_get_forum_id() To get the forum id
    749761         * @uses get_post_meta() To get the forum's last reply id
     762         * @uses bbp_get_forum_last_topic_id() To get the forum's last topic id
    750763         * @uses apply_filters() Calls 'bbp_get_forum_last_reply_id' with
    751764         *                        the last reply id and forum id
     
    13191332 * @since bbPress (r2860)
    13201333 *
     1334 * @param array $args Arguments passed to alter output
    13211335 * @uses bbp_get_single_forum_description() Return the eventual output
    1322  *
    1323  * @param arr $args Arguments passed to alter output
    13241336 */
    13251337function bbp_single_forum_description( $args = '' ) {
     
    13271339}
    13281340        /**
    1329          * Return a fancy description of the current forum, including total topics,
    1330          * total replies, and last activity.
     1341         * Return a fancy description of the current forum, including total
     1342         * topics, total replies, and last activity.
    13311343         *
    13321344         * @since bbPress (r2860)
    13331345         *
    1334          * @uses wp_parse_args()
    1335          * @uses bbp_get_forum_id()
    1336          * @uses bbp_get_forum_topic_count()
    1337          * @uses bbp_get_forum_reply_count()
    1338          * @uses bbp_get_forum_subforum_count()
    1339          * @uses bbp_get_forum_freshness_link()
    1340          * @uses bbp_get_forum_last_reply_id()
    1341          * @uses bbp_get_reply_author_avatar()
    1342          * @uses bbp_get_reply_author_link()
    1343          * @uses apply_filters()
    1344          *
    1345          * @param arr $args Arguments passed to alter output
    1346          *
     1346         * @param mixed $args This function supports these arguments:
     1347         *  - topic_id: Topic id
     1348         *  - before: Before the text
     1349         *  - after: After the text
     1350         *  - size: Size of the avatar
     1351         * @uses bbp_get_forum_id() To get the forum id
     1352         * @uses bbp_get_forum_topic_count() To get the forum topic count
     1353         * @uses bbp_get_forum_reply_count() To get the forum reply count
     1354         * @uses bbp_get_forum_subforum_count() To get the forum subforum count
     1355         * @uses bbp_get_forum_freshness_link() To get the forum freshness link
     1356         * @uses bbp_get_forum_last_active_id() To get the forum last active id
     1357         * @uses bbp_get_author_link() To get the author link
     1358         * @uses add_filter() To add the 'view all' filter back
     1359         * @uses apply_filters() Calls 'bbp_get_single_forum_description' with
     1360         *                        the description and args
    13471361         * @return string Filtered forum description
    13481362         */
Note: See TracChangeset for help on using the changeset viewer.