forked from GNUsocial/gnu-social
allow <Property> elements in <Link> in XRD
This commit is contained in:
parent
d5466ac87e
commit
eab8d752e8
10
lib/xrd.php
10
lib/xrd.php
@ -130,14 +130,24 @@ class XRD
|
||||
|
||||
foreach ($this->links as $link) {
|
||||
$titles = array();
|
||||
$properties = array();
|
||||
if (isset($link['title'])) {
|
||||
$titles = $link['title'];
|
||||
unset($link['title']);
|
||||
}
|
||||
if (isset($link['property'])) {
|
||||
$properties = $link['property'];
|
||||
unset($link['property']);
|
||||
}
|
||||
$xs->elementStart('Link', $link);
|
||||
foreach ($titles as $title) {
|
||||
$xs->element('Title', null, $title);
|
||||
}
|
||||
foreach ($properties as $property) {
|
||||
$xs->element('Property',
|
||||
array('type' => $property['type']),
|
||||
$property['value']);
|
||||
}
|
||||
$xs->elementEnd('Link');
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user