wp_dashboard_primary_output

The timeline below displays how wordpress function wp_dashboard_primary_output has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 5.4

/**
 * Displays the WordPress events and news feeds.
 *
 * @since 3.8.0
 * @since 4.8.0 Removed popular plugins feed.
 *
 * @param string $widget_id Widget ID.
 * @param array  $feeds     Array of RSS feeds.
 */
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>';
    }
}

WordPress Version: 5.1

/**
 * Display the WordPress events and news feeds.
 *
 * @since 3.8.0
 * @since 4.8.0 Removed popular plugins feed.
 *
 * @param string $widget_id Widget ID.
 * @param array  $feeds     Array of RSS feeds.
 */
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>';
    }
}

WordPress Version: 4.8

/**
 * Display the WordPress news feeds.
 *
 * @since 3.8.0
 * @since 4.8.0 Removed popular plugins feed.
 *
 * @param string $widget_id Widget ID.
 * @param array  $feeds     Array of RSS feeds.
 */
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>";
    }
}

WordPress Version: 3.8

/**
 * Display the WordPress news feeds.
 *
 * @since 3.8.0
 *
 * @param string $widget_id Widget ID.
 * @param array  $feeds     Array of RSS feeds.
 */
function wp_dashboard_primary_output($widget_id, $feeds)
{
    foreach ($feeds as $type => $args) {
        $args['type'] = $type;
        echo '<div class="rss-widget">';
        if ($type === 'plugins') {
            wp_dashboard_plugins_output($args['url'], $args);
        } else {
            wp_widget_rss_output($args['url'], $args);
        }
        echo "</div>";
    }
}