Browse Source

Merge 611696099f into a4cda273d3

pull/93/merge
Vika 3 weeks ago
committed by GitHub
parent
commit
1440fc743e
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
1 changed files with 10 additions and 0 deletions
  1. +10
    -0
      lib/XRay/Formats/Mf2.php

+ 10
- 0
lib/XRay/Formats/Mf2.php View File

@ -348,6 +348,16 @@ class Mf2 extends Format {
$hcard[$p] = $v;
}
}
// If we have a geo property, it overrides p-latitude and p-longitude
if(array_key_exists('geo', $mf2) &&
self::isMicroformat($mf2['geo'][0]) &&
in_array('h-geo', $mf2['geo'][0]['type']) &&
array_key_exists($mf2['geo'][0]['properties']) &&
$lat=self::getPlaintext($mf2['geo'][0], 'latitude') &&
$lon=self::getPlaintext($mf2['geo'][0], 'longitude')) {
$hcard['latitude'] = $lat;
$hcard['longitude'] = $lon;
}
return $hcard;
}
}

Loading…
Cancel
Save