PluginProbe
Wp-Insert / 1.7.6
Wp-Insert v1.7.6
trunk 1.0 1.1 1.2 1.2.1 1.2.2 1.3.0 1.3.1 1.3.3 1.4 1.5.0 1.5.1 1.5.2 1.5.3 1.6.0 1.6.1 1.6.2 1.7 1.7.1 1.7.2 1.7.3 1.7.4 1.7.5 1.7.6 2.0 All 63 releases
wp-insert / includes / dashboardwidget.php

dashboardwidget.php in Wp-Insert 1.7.6, at includes/dashboardwidget.php

24 lines 799 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 add_action('wp_dashboard_setup', 'wp_insert_add_dashboard_widgets' );
3 function wp_insert_dashboard_widget_function() {
4 include_once(ABSPATH . WPINC . '/feed.php');
5 $rss = fetch_feed('http://www.wp-insert.smartlogix.co.in/feed/');
6 if (!is_wp_error( $rss ) ) :
7 $maxitems = $rss->get_item_quantity(10);
8 $rss_items = $rss->get_items(0, $maxitems);
9 endif;
10 ?>
11 <ul>
12 <?php if ($maxitems == 0) echo '<li>No items.</li>';
13 else
14 foreach ($rss_items as $item) : ?>
15 <li><a href='<?php echo $item->get_permalink(); ?>'><?php echo $item->get_title(); ?></a></li>
16 <?php endforeach; ?>
17 </ul>
18 <?php
19 }
20
21 function wp_insert_add_dashboard_widgets() {
22 wp_add_dashboard_widget('wp_insert_dashboard_widget', 'Wp-Insert News', 'wp_insert_dashboard_widget_function');
23 }
24 ?>