acf_field_google_map::update_value
This filter is appied to the $value before it is updated in the db
Method of the class: acf_field_google_map{}
No Hooks.
Returns
$value. - the modified value
Usage
$acf_field_google_map = new acf_field_google_map(); $acf_field_google_map->update_value( $value, $post_id, $field );
- $value(required)
- .
- $post_id(required)
- .
- $field(required)
- .
Changelog
| Since 3.6 | Introduced. |
acf_field_google_map::update_value() acf field google map::update value code ACF 6.8.8
function update_value( $value, $post_id, $field ) {
// decode JSON string.
if ( is_string( $value ) ) {
$value = json_decode( wp_unslash( $value ), true );
}
// Ensure value is an array.
if ( $value ) {
return (array) $value;
}
// Return default.
return false;
}