This could be reduced to a one-liner in the calling functions, but it's intentionally a separate function because it's called from multiple functions, and having it abstracted keeps the logic consistent and DRY, which is less prone to errors.
Parameters
$locationarray
Should contain 'latitude' and 'longitude' indexes.
Signature, return type and hooks compared across 5 parsed releases.
About this page
Parsed data
Generated from the wordpress-develop 6.8.8 tag, from src/wp-admin/includes/class-wp-community-events.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.