Skip to:
Content

bbPress.org


Ignore:
Timestamp:
06/27/2011 10:18:38 AM (11 years ago)
Author:
johnjamesjacoby
Message:

Add _insert_ functions for forums, topics, and replies. Audit (forum/topic/hidden) meta key and updater function names and and normalize them where needed.

(Existing installs will need to run recounts, or let them adjust themselves naturally as new topics and replies come in.)

File:
1 edited

Legend:

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

    r3348 r3349  
    16061606     * @uses bbp_get_topic_permalink() To get the topic permalink
    16071607     * @uses remove_query_arg() To remove args from the url
    1608      * @uses bbp_get_topic_hidden_reply_count() To get the topic hidden
     1608     * @uses bbp_get_topic_reply_count_hidden() To get the topic hidden
    16091609     *                                           reply count
    16101610     * @uses current_user_can() To check if the current user can edit others
     
    16301630
    16311631        // This forum has hidden topics
    1632         if ( current_user_can( 'edit_others_replies' ) && ( $deleted = bbp_get_topic_hidden_reply_count( $topic_id ) ) ) {
     1632        if ( current_user_can( 'edit_others_replies' ) && ( $deleted = bbp_get_topic_reply_count_hidden( $topic_id ) ) ) {
    16331633
    16341634            // Extra text
     
    17141714 *
    17151715 * @param int $topic_id Optional. Topic id
    1716  * @uses bbp_get_topic_hidden_reply_count() To get the topic hidden reply count
    1717  */
    1718 function bbp_topic_hidden_reply_count( $topic_id = 0 ) {
    1719     echo bbp_get_topic_hidden_reply_count( $topic_id );
     1716 * @uses bbp_get_topic_reply_count_hidden() To get the topic hidden reply count
     1717 */
     1718function bbp_topic_reply_count_hidden( $topic_id = 0 ) {
     1719    echo bbp_get_topic_reply_count_hidden( $topic_id );
    17201720}
    17211721    /**
     
    17281728     * @uses bbp_get_topic_id() To get the topic id
    17291729     * @uses get_post_meta() To get the hidden reply count
    1730      * @uses apply_filters() Calls 'bbp_get_topic_hidden_reply_count' with
     1730     * @uses apply_filters() Calls 'bbp_get_topic_reply_count_hidden' with
    17311731     *                        the hidden reply count and topic id
    17321732     * @return int Topic hidden reply count
    17331733     */
    1734     function bbp_get_topic_hidden_reply_count( $topic_id = 0 ) {
     1734    function bbp_get_topic_reply_count_hidden( $topic_id = 0 ) {
    17351735        $topic_id = bbp_get_topic_id( $topic_id );
    1736         $replies  = get_post_meta( $topic_id, '_bbp_hidden_reply_count', true );
    1737 
    1738         return apply_filters( 'bbp_get_topic_hidden_reply_count', (int) $replies, $topic_id );
     1736        $replies  = get_post_meta( $topic_id, '_bbp_reply_count_hidden', true );
     1737
     1738        return apply_filters( 'bbp_get_topic_reply_count_hidden', (int) $replies, $topic_id );
    17391739    }
    17401740
Note: See TracChangeset for help on using the changeset viewer.