acf_field_google_map::load_value
load_value
Filters the value loaded from the database.
Method of the class: acf_field_google_map{}
No Hooks.
Returns
(Array|false).
Usage
$acf_field_google_map = new acf_field_google_map(); $acf_field_google_map->load_value( $value, $post_id, $field );
- $value(mixed) (required)
- The value loaded from the database.
- $post_id(mixed) (required)
- The post ID where the value is saved.
- $field(array) (required)
- The field settings array.
Changelog
| Since 5.8.1 | Introduced. |
acf_field_google_map::load_value() acf field google map::load value code ACF 6.0.4
function load_value( $value, $post_id, $field ) {
// Ensure value is an array.
if ( $value ) {
return wp_parse_args(
$value,
array(
'address' => '',
'lat' => 0,
'lng' => 0,
)
);
}
// Return default.
return false;
}