DiscipleTools / DiscipleTools/disciple-tools-theme
Merge location_grid and location_grid_meta into one field
- Dominant language
- PHP
- Stars
- 48
- Forks
- 66
- PR merge metrics
- No merged PRs in 30d
Description
the `location` field
- uses the predefined `dt_location_grid` table to list options
- saves the grid_id in the postmeta table for records and usermeta for users.
the `location_meta` field
- uses the mapbox or the google geocoding api to list options
- finds the corresponding location_grid and saves the grid_id in the postmeta table for records and usermeta for users.
- saves the extra meta in the `dt_location_grid_meta` table (lat, lng, level, label, etc)
The location_meta field requires the location field. So in essence the location_meta in an extension of the location field. These could be considered the same field with different UI and workflows.
We ran into blocks In trying to let the admin create a location_meta field on custom post types. See [pr](https://github.com/DiscipleTools/disciple-tools-theme/pull/2446).
A custom location_meta requires a custom location_grid and we'd like to not have to create 2 fields to make this work.
So can we build out the `location` field to have 2 modes: normal, or with a geolocation key.
Contributor guide
Assessment
This issue has not been assessed yet.