wp_dashboard_primary_output()WP 3.8.0

Displays the WordPress events and news feeds.

Хуков нет.

Возвращает

null. Ничего (null).

Использование

wp_dashboard_primary_output( $widget_id, $feeds );
$widget_id(строка) (обязательный)
Widget ID.
$feeds(массив) (обязательный)
Array of RSS feeds.

Список изменений

С версии 3.8.0 Введена.
С версии 4.8.0 Removed popular plugins feed.

Код wp_dashboard_primary_output() WP 6.5.2

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>';
	}
}