Location
Get the latitude and longitude for a given address.
Value
Returns { address: string, lat: number, lng: number }
$location = json_decode(fx_get_meta('id'), true);
$location_address = $location['address'];
$location_lat = $location['lat'];
$location_lng = $location['lng'];
Example
'id' => [
'type' => 'location',
'buttonText' => 'Enter your address',
'className' => 'my-class-name',
],
Props
buttonText
Alternate text for the enter location button
type: string
defaultValue: 'Enter location'
className
Metabox class name
type: string
title
Metabox title
type: string