bbp_get_forum_reply_count

  • apply_filters( 'bbp_get_forum_reply_count', (int) $replies, $forum_id )

    Source Reference:

    • Component: bbPress :: bbp-forum
      File: /bbp-includes/bbp-forum-template.php :: Trac Source Line: 1202
      	 * @uses get_post_meta() To get the forum reply count
      	 * @uses apply_filters() Calls 'bbp_get_forum_reply_count' with the
      	 *                        reply count and forum id
      	 * @return int Forum reply count
      	 */
      	function bbp_get_forum_reply_count( $forum_id = 0, $total_count = true ) {
      		$forum_id = bbp_get_forum_id( $forum_id );
      		$replies  = get_post_meta( $forum_id, empty( $total_count ) ? '_bbp_reply_count' : '_bbp_total_reply_count', true );
      
      		return apply_filters( 'bbp_get_forum_reply_count', (int) $replies, $forum_id );
      	}
      
      /**
       * Output total post count of a forum
       *
       * @since bbPress (r2954)
       *
       * @param int $forum_id Optional. Forum id
       * @param bool $total_count Optional. To get the total count or normal count?
       * @uses bbp_get_forum_post_count() To get the forum post count
      

Hook: add_filter: bbp_get_forum_reply_count instances (1)

  • add_filter( 'bbp_get_forum_reply_count',    'bbp_suppress_private_forum_meta',  10, 2 )
    $tag: bbp_get_forum_reply_count
    $function_to_add: bbp_suppress_private_forum_meta
    $priority: 10
    $accepted_args: 2

    Source Reference:

    • Component: bbPress :: bbp-core
      File: /bbp-includes/bbp-core-hooks.php :: Trac Source Line: 356
      // Login/Register/Lost Password
      add_filter( 'login_redirect', 'bbp_redirect_login', 2, 3 );
      add_filter( 'logout_url',     'bbp_logout_url',     2, 2 );
      
      // Fix post author id for anonymous posts (set it back to 0) when the post status is changed
      add_filter( 'wp_insert_post_data', 'bbp_fix_post_author', 30, 2 );
      
      // Suppress private forum details
      add_filter( 'bbp_get_forum_topic_count',    'bbp_suppress_private_forum_meta',  10, 2 );
      add_filter( 'bbp_get_forum_reply_count',    'bbp_suppress_private_forum_meta',  10, 2 );
      add_filter( 'bbp_get_forum_post_count',     'bbp_suppress_private_forum_meta',  10, 2 );
      add_filter( 'bbp_get_forum_freshness_link', 'bbp_suppress_private_forum_meta',  10, 2 );
      add_filter( 'bbp_get_author_link',          'bbp_suppress_private_author_link', 10, 2 );
      add_filter( 'bbp_get_topic_author_link',    'bbp_suppress_private_author_link', 10, 2 );
      add_filter( 'bbp_get_reply_author_link',    'bbp_suppress_private_author_link', 10, 2 );
      
      /**
       * Add filters to anonymous post author data
       *
       * This is used to clean-up any anonymous user data that is submitted via the
      

Comments are closed.