acf_field_number::update_value
This filter is appied to the $value before it is updated in the db
Method of the class: acf_field_number{}
No Hooks.
Returns
$value. - the modified value
Usage
$acf_field_number = new acf_field_number(); $acf_field_number->update_value( $value, $post_id, $field );
- $value(required)
- .
- $post_id(required)
- .
- $field(required)
- .
Changelog
| Since 3.6 | Introduced. |
acf_field_number::update_value() acf field number::update value code ACF 6.8.8
function update_value( $value, $post_id, $field ) {
// no formatting needed for empty value
if ( empty( $value ) ) {
return $value;
}
// remove ','
if ( acf_str_exists( ',', $value ) ) {
$value = str_replace( ',', '', $value );
}
// return
return $value;
}