bbp_update_topic_reply_count

  • apply_filters( 'bbp_update_topic_reply_count', (int) $reply_count, $topic_id )

    Source Reference:

    • Component: bbPress :: bbp-topic
      File: /bbp-includes/bbp-topic-functions.php :: Trac Source Line: 2100
      	else
      		$topic_id = bbp_get_topic_id( $topic_id );
      
      	// Get replies of topic if not passed
      	if ( empty( $reply_count ) )
      		$reply_count = bbp_get_public_child_count( $topic_id, bbp_get_reply_post_type() );
      
      	update_post_meta( $topic_id, '_bbp_reply_count', (int) $reply_count );
      
      	return apply_filters( 'bbp_update_topic_reply_count', (int) $reply_count, $topic_id );
      }
      
      /**
       * Adjust the total hidden reply count of a topic (hidden includes trashed and spammed replies)
       *
       * @since bbPress (r2740)
       *
       * @param int $topic_id Optional. Topic id to update
       * @param int $reply_count Optional. Set the reply count manually
       * @uses bbp_is_reply() To check if the passed topic id is a reply
      

Comments are closed.