Filter
rpress_sanitize_amount
On this page
Filters the sanitized price amount before rpress_sanitize_amount returns it.
Runs at the end of rpress_sanitize_amount, after thousands separators have been removed, the decimal separator normalised to a dot and the value rounded with number_format. Negative amounts keep their sign.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$amount | string | The sanitized price. |
Return value#
string. The sanitized price.
Example#
function my_sanitize_amount( $amount ) {
return $amount;
}
add_filter( 'rpress_sanitize_amount', 'my_sanitize_amount', 10, 1 );
Source#
Applied in:
includes/formatting.php(line 61), inrpress_sanitize_amount()
See also#
Was this page helpful?
