Skip to:
Content

bbPress.org

Changeset 6244


Ignore:
Timestamp:
01/14/2017 09:10:57 AM (8 years ago)
Author:
netweb
Message:

Topics: Fix misspelled bbp_get_topic_last_reply_* filters.

  • Update bbp_get_topic_last_reply_title() to use bbp_get_topic_last_reply_title
  • Includes a fallback for any plugins or themes that use bbp_get_topic_last_topic_title
  • Fix PHPDocs @uses PHPDocs for bbp_get_topic_last_reply_permalink and bbp_get_topic_last_reply_url

Props SergeyBiryukov.
Fixes #3039.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/topics/template.php

    r6228 r6244  
    20342034     * @uses bbp_get_topic_last_reply_id() To get the topic last reply id
    20352035     * @uses bbp_get_reply_title() To get the reply title
    2036      * @uses apply_filters() Calls 'bbp_get_topic_last_topic_title' with
     2036     * @uses apply_filters() Calls 'bbp_get_topic_last_reply_title' with
    20372037     *                        the reply title and topic id
    20382038     * @return string Topic last reply title
     
    20432043        $retval   = bbp_get_reply_title( $reply_id );
    20442044
    2045         return apply_filters( 'bbp_get_topic_last_topic_title', $retval, $topic_id, $reply_id );
     2045        // Misspelled. Use 'bbp_get_topic_last_reply_title' hook instead.
     2046        $retval = apply_filters( 'bbp_get_topic_last_topic_title', $retval, $topic_id, $reply_id );
     2047
     2048        return apply_filters( 'bbp_get_topic_last_reply_title', $retval, $topic_id, $reply_id );
    20462049    }
    20472050
     
    20662069     * @uses bbp_get_topic_last_reply_id() To get the topic last reply id
    20672070     * @uses bbp_get_reply_permalink() To get the reply permalink
    2068      * @uses apply_filters() Calls 'bbp_get_topic_last_topic_permalink' with
     2071     * @uses apply_filters() Calls 'bbp_get_topic_last_reply_permalink' with
    20692072     *                        the reply permalink and topic id
    20702073     * @return string Permanent link to the reply
     
    20992102     * @uses bbp_get_reply_url() To get the reply url
    21002103     * @uses bbp_get_topic_permalink() To get the topic permalink
    2101      * @uses apply_filters() Calls 'bbp_get_topic_last_topic_url' with
     2104     * @uses apply_filters() Calls 'bbp_get_topic_last_reply_url' with
    21022105     *                        the reply url and topic id
    21032106     * @return string Topic last reply url
Note: See TracChangeset for help on using the changeset viewer.