acf_field_number::update_value() public ACF 3.6
This filter is appied to the $value before it is updated in the db
{} Это метод класса: acf_field_number{}
Хуков нет.
Возвращает
$value. - the modified value
Использование
$acf_field_number = new acf_field_number(); $acf_field_number->update_value( $value, $post_id, $field );
-
- ($value) (обязательный)
- the value which will be saved in the database
-
- ($field) (обязательный)
- the field array holding all the field options
-
- ($post_id) (обязательный)
- the $post_id of which the value will be saved
Список изменений
С версии 3.6 | Введена. |
Код acf_field_number::update_value() acf field number::update value ACF 5.9.1
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;
}