|
@@ -71,14 +71,14 @@ discard block |
|
|
block discarded – undo |
|
71
|
71
|
// Get a SimplePie feed object from the specified feed source. |
|
72
|
72
|
$rss = fetch_feed( $feed ); |
|
73
|
73
|
if (!is_wp_error( $rss ) ) : // Checks that the object is created correctly |
|
74
|
|
- // Figure out how many total items there are, and choose a limit |
|
75
|
|
- $maxitems = $rss->get_item_quantity( 3 ); |
|
|
74
|
+ // Figure out how many total items there are, and choose a limit |
|
|
75
|
+ $maxitems = $rss->get_item_quantity( 3 ); |
|
76
|
76
|
|
|
77
|
|
- // Build an array of all the items, starting with element 0 (first element). |
|
78
|
|
- $rss_items = $rss->get_items( 0, $maxitems ); |
|
|
77
|
+ // Build an array of all the items, starting with element 0 (first element). |
|
|
78
|
+ $rss_items = $rss->get_items( 0, $maxitems ); |
|
79
|
79
|
|
|
80
|
|
- // Get RSS title |
|
81
|
|
- $rss_title = '<a href="'.$rss->get_permalink().'" target="_blank">'.strtoupper( $rss->get_title() ).'</a>'; |
|
|
80
|
+ // Get RSS title |
|
|
81
|
+ $rss_title = '<a href="'.$rss->get_permalink().'" target="_blank">'.strtoupper( $rss->get_title() ).'</a>'; |
|
82
|
82
|
endif; |
|
83
|
83
|
|
|
84
|
84
|
// Display the container |
|
@@ -132,9 +132,9 @@ discard block |
|
|
block discarded – undo |
|
132
|
132
|
function strip_custom_dashboard_widgets() { |
|
133
|
133
|
wp_add_dashboard_widget( 'strip_rss_dashboard_widget', __( 'SILENT COMICS blog', 'strip' ), 'strip_rss_dashboard_widget' ); |
|
134
|
134
|
/** |
|
135
|
|
- * Be sure to drop any other created Dashboard Widgets. |
|
136
|
|
- * in this function and they will all load. |
|
137
|
|
- */ |
|
|
135
|
+ * Be sure to drop any other created Dashboard Widgets. |
|
|
136
|
+ * in this function and they will all load. |
|
|
137
|
+ */ |
|
138
|
138
|
} |
|
139
|
139
|
// removing the dashboard widgets. |
|
140
|
140
|
add_action( 'wp_dashboard_setup', 'disable_default_dashboard_widgets' ); |