bbp_update_user_topic_count( int $user_id, mixed $count = false )

Update the topic count for a user


Description Description


Parameters Parameters

$user_id

(Required)

$count

(Optional)

Default value: false


Top ↑

Return Return

(boolean)


Top ↑

Source Source

File: includes/users/options.php

function bbp_update_user_topic_count( $user_id = 0, $count = false ) {

	// Validate user id
	$user_id = bbp_get_user_id( $user_id );
	if ( empty( $user_id ) ) {
		return false;
	}

	// Just in time filtering of the user's topic count
	$count = apply_filters( 'bbp_update_user_topic_count', $count, $user_id );

	// Bail if no count was passed
	if ( false === $count ) {
		return false;
	}

	// Return the updated user option
	return update_user_option( $user_id, '_bbp_topic_count', $count );
}

Top ↑

Changelog Changelog

Changelog
Version Description
2.6.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.