bbp_update_forum_topic_count

  • apply_filters( 'bbp_update_forum_topic_count', (int) $total_topics, $forum_id )

    Source Reference:

    • Component: bbPress :: bbp-forum
      File: /bbp-includes/bbp-forum-functions.php :: Trac Source Line: 642
      	$topics = (int) count( bbp_forum_query_topic_ids( $forum_id ) );
      
      	// Calculate total topics in this forum
      	$total_topics = $topics + $children_topic_count;
      
      	// Update the count
      	update_post_meta( $forum_id, '_bbp_topic_count',       (int) $topics       );
      	update_post_meta( $forum_id, '_bbp_total_topic_count', (int) $total_topics );
      
      	return apply_filters( 'bbp_update_forum_topic_count', (int) $total_topics, $forum_id );
      }
      
      /**
       * Adjust the total hidden topic count of a forum (hidden includes trashed and spammed topics)
       *
       * @since bbPress (r2888)
       *
       * @param int $forum_id Optional. Topic id to update
       * @param int $topic_count Optional. Set the topic count manually
       * @uses bbp_is_topic() To check if the supplied id is a topic
      

Comments are closed.