[wp-trac] [WordPress Trac] #42254: Duplicate news entries in Events & News dashboard widget

WordPress Trac noreply at wordpress.org
Tue Oct 17 20:30:37 UTC 2017


#42254: Duplicate news entries in Events & News dashboard widget
----------------------------------------+-----------------------------
 Reporter:  iandunn                     |       Owner:
     Type:  defect (bug)                |      Status:  new
 Priority:  low                         |   Milestone:  Future Release
Component:  Administration              |     Version:  4.8
 Severity:  minor                       |  Resolution:
 Keywords:  needs-patch good-first-bug  |     Focuses:
----------------------------------------+-----------------------------

Comment (by birgire):

 Each feed is fetched and displayed separately with
 [https://core.trac.wordpress.org/browser/tags/4.8.2/src/wp-
 admin/includes/dashboard.php#L1367 [src]]:

 {{{
 foreach ( $feeds as $type => $args ) {
     $args['type'] = $type;
     echo '<div class="rss-widget">';
     wp_widget_rss_output( $args['url'], $args );
     echo "</div>";
 }
 }}}

 where {{{wp_widget_rss_output()}}} contains the {{{fetch_feed}}} and the
 display part. See:

 https://developer.wordpress.org/reference/functions/wp_widget_rss_output/

 To be able to display unique feed items, it looks like one would have to
 skip the handy  {{{wp_widget_rss_output()}}} for a custom version of it to
 handle the combined feed items and display.

 Alternative is output buffering to mod the HTML - not keen on that one.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/42254#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list