scrap community json+ld data

dev
gravel 2 years ago
parent 33711557aa
commit cf8c91f492
Signed by: gravel
GPG Key ID: C0538F3C906B308F

@ -33,31 +33,9 @@
); );
}, $rooms), }, $rooms),
); );
$json_ld_data_rooms = array(
'@context' => 'https://schema.org/',
'@graph' => array_map(function(CommunityRoom $room) {
$values = array(
'@type' => 'EntryPoint',
'@id' => $room->get_join_url(),
'additionalType' => 'VirtualLocation',
'name' => $room->name,
'description' => $room->description,
'url' => $SITE_CANONICAL_URL . $room->get_details_url(),
'image' => $SITE_CANONICAL_URL . '/' . room_icon($room, '64x64')
);
return array_filter($values, function ($value) {
return $value != null;
});
}, $rooms),
)
?> ?>
<script type="application/ld+json"> <script type="application/ld+json">
<?=json_encode($json_ld_data)?> <?=json_encode($json_ld_data)?>
</script> </script>
<script type="application/ld+json">
<?=json_encode($json_ld_data_rooms)?>
</script>

Loading…
Cancel
Save