HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/ERijn/knijft.eu/wwwroot/wp-content/themes/diverso/core/functions-dashboard.php
<?php                   
/**
 * Define the widgets dashboard
 *
 * @package WordPress
 * @subpackage YIW Themes
 * @since 1.0
 */     
       
/**
 * Add the widgets on dashboard
 * 
 * @since 1.0  
 */            
function yiw_dashboard_widget_setup() {
    wp_add_dashboard_widget( 'yiw_dashboard_news', __( 'News from the support forum' , 'yiw' ), 'yiw_dashboard_forum_news' );
    wp_add_dashboard_widget( 'yiw_news', __( 'News from the YIW Blog' , 'yiw' ), 'yiw_dashboard_news' );  	
	// Globalize the metaboxes array, this holds all the widgets for wp-admin

	global $wp_meta_boxes;
	
	$widgets_on_side = array(
        'yiw_dashboard_news',
        'yiw_news'
    );
	
    foreach( $widgets_on_side as $meta ) {
        $temp = $wp_meta_boxes['dashboard']['normal']['core'][$meta];
        unset($wp_meta_boxes['dashboard']['normal']['core'][$meta]);
        $wp_meta_boxes['dashboard']['side']['core'][$meta] = $temp;
    }
}     
       
/**
 * The widget for forum news
 * 
 * @since 1.0  
 */  
function yiw_dashboard_forum_news() {
	$args = array( 'show_author' => 1, 'show_date' => 1, 'show_summary' => 0, 'items'=>10 );
	wp_widget_rss_output( YIW_RSS_FORUM_URL, $args );
}         
       
/**
 * The widget for blog news
 * 
 * @since 1.0  
 */  
function yiw_dashboard_news() {
	$args = array( 'show_author' => 1, 'show_date' => 1, 'show_summary' => 1, 'items'=>3 );
	wp_widget_rss_output( YIW_RSS_URL, $args );
}