PluginProbe
Master Addons for Elementor – Elementor Addons, Widgets, Mega Menu Builder, Popup Builder, Widget Builder & Template Kits / 1.0.8
Master Addons for Elementor – Elementor Addons, Widgets, Mega Menu Builder, Popup Builder, Widget Builder & Template Kits v1.0.8
3.2.2 3.2.3 3.2.1 3.2.0 3.1.9 3.1.8 3.1.7 3.1.6 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.9 trunk 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.1.3 1.1.4 1.1.5 All 174 releases
master-addons / inc / classes / utils.php

utils.php in Master Addons for Elementor – Elementor Addons, Widgets, Mega Menu Builder, Popup Builder, Widget Builder & Template Kits 1.0.8, at inc/classes/utils.php

53 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Snippet Name: RSS Feed to dashboard
4 * Snippet URL: https://jeweltheme.com/category/master-addons/feed/
5 */
6
7 add_action('wp_dashboard_setup', 'ma_el_dashboard_widgets');
8
9 function ma_el_array_flatten($array) {
10 if (!is_array($array)) {
11 return false;
12 }
13 $result = array();
14 foreach ($array as $key => $value) {
15 if (is_array($value)) {
16 $result = array_merge($result, array_values($value));
17 } else {
18 $result[$key] = $value;
19 }
20 }
21 return $result;
22 }
23
24 function ma_el_dashboard_widgets() {
25 global $wp_meta_boxes;
26 unset(
27 $wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins'],
28 $wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary'],
29 $wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']
30 );
31
32 // add a custom dashboard widget
33 wp_add_dashboard_widget(
34 'dashboard_custom_feed',
35 'News from siteXY',
36 'dashboard_custom_feed_output' );
37 }
38
39 function dashboard_custom_feed_output() {
40 echo '<div class="rss-widget">';
41 wp_widget_rss_output(array(
42 'url' => 'https://jeweltheme.com/feed',
43 'title' => 'Whats up at siteXY',
44 'items' => 4,
45 'show_summary' => 1,
46 'show_author' => 0,
47 'show_date' => 1
48 ));
49 echo "</div>";
50 }
51
52
53