bbp_number_format_i18n( string $number, string $decimals = false )

A Forums specific method of formatting numeric values

Description

Parameters

$number

(Required) Number to format

$decimals

(Optional) Display decimals

Default value: false

Return

(string) Formatted string

Source

File: bp-forums/common/functions.php

function bbp_number_format_i18n( $number = 0, $decimals = false ) {

	// If empty, set $number to (int) 0
	if ( ! is_numeric( $number ) )
		$number = 0;

	return apply_filters( 'bbp_number_format_i18n', number_format_i18n( $number, $decimals ), $number, $decimals );
}

Changelog

Changelog
Version Description
bbPress (r3857) Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.