# master-addons/1.0.8/inc/classes/utils.php

Master Addons for Elementor – Elementor Addons, Widgets, Mega Menu Builder, Popup Builder, Widget Builder &amp; Template Kits, version 1.0.8. 53 lines.

- Page: https://pluginprobe.com/plugins/master-addons/1.0.8/code/inc/classes/utils.php
- Raw: https://pluginprobe.com/plugins/master-addons/1.0.8/raw/inc/classes/utils.php
- Modified: 2019-08-01T20:54:22+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/master-addons/1.0.8/code/inc/classes/utils.php#L10-L20`.

```php
<?php
	/**
	 * Snippet Name: RSS Feed to dashboard
	 * Snippet URL: https://jeweltheme.com/category/master-addons/feed/
	 */

	add_action('wp_dashboard_setup', 'ma_el_dashboard_widgets');

	function ma_el_array_flatten($array) {
		if (!is_array($array)) {
			return false;
		}
		$result = array();
		foreach ($array as $key => $value) {
			if (is_array($value)) {
				$result = array_merge($result, array_values($value));
			} else {
				$result[$key] = $value;
			}
		}
		return $result;
	}

	function ma_el_dashboard_widgets() {
		global $wp_meta_boxes;
		unset(
			$wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins'],
			$wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary'],
			$wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']
		);

		// add a custom dashboard widget
		wp_add_dashboard_widget(
			'dashboard_custom_feed',
			'News from siteXY',
			'dashboard_custom_feed_output' );
	}

	function dashboard_custom_feed_output() {
		echo '<div class="rss-widget">';
		wp_widget_rss_output(array(
			'url' => 'https://jeweltheme.com/feed',
			'title' => 'Whats up at siteXY',
			'items' => 4,
			'show_summary' => 1,
			'show_author' => 0,
			'show_date' => 1
		));
		echo "</div>";
	}



```
