Filter
rpress_format_amount
On this page
Filters the formatted amount returned by rpress_format_amount.
Runs at the end of rpress_format_amount, after number_format has applied the decimals and the thousands and decimal separators from the settings. The result does not include a currency symbol.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$formatted | string | The formatted amount. |
$amount | string | The sanitized amount before formatting. |
$decimals | int | Number of decimals used. |
$decimal_sep | string | Decimal separator. |
$thousands_sep | string | Thousands separator. |
Return value#
string. The formatted amount.
Example#
function my_format_amount( $formatted, $amount, $decimals, $decimal_sep, $thousands_sep ) {
return $formatted;
}
add_filter( 'rpress_format_amount', 'my_format_amount', 10, 5 );
Source#
Applied in:
includes/formatting.php(line 142), inrpress_format_amount()
See also#
Was this page helpful?
