wp_dashboard_primary_output()
Displays the WordPress events and news feeds.
No Hooks.
Returns
null. Nothing (null).
Usage
wp_dashboard_primary_output( $widget_id, $feeds );
- $widget_id(string) (required)
- Widget ID.
- $feeds(array) (required)
- Array of RSS feeds.
Changelog
| Since 3.8.0 | Introduced. |
| Since 4.8.0 | Removed popular plugins feed. |
wp_dashboard_primary_output() wp dashboard primary output code WP 6.8.3
function wp_dashboard_primary_output( $widget_id, $feeds ) {
foreach ( $feeds as $type => $args ) {
$args['type'] = $type;
echo '<div class="rss-widget">';
wp_widget_rss_output( $args['url'], $args );
echo '</div>';
}
}