Skip to content

Commit cadcfaf

Browse files
committed
Add featured image at top level of feed when available and return self link over home link
1 parent c28e99b commit cadcfaf

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

includes/feed-mf2.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,17 @@
1515
'properties' => array(
1616
'name' => array( get_bloginfo( 'name' ) ),
1717
'summary' => array( get_bloginfo( 'description' ) ),
18-
'url' => array( site_url( '/' ) ),
18+
'url' => array( get_self_link() ),
1919
),
2020
),
2121
),
2222
);
2323

24+
$featured = get_site_icon_url();
25+
if ( ! empty( $featured ) ) {
26+
$items['items'][0]['properties']['featured'] = array( $featured );
27+
}
28+
2429
while ( have_posts() ) {
2530
the_post();
2631
$item = new Mf2_Feed_Entry( get_the_ID() );

0 commit comments

Comments
 (0)