Changeset 514
- Timestamp:
- 08/24/2010 01:50:58 AM (18 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WordPress/plugin/transposh/wp/transposh_admin.php
r500 r514 286 286 287 287 function on_sidebox_news_content($data) { 288 require_once(ABSPATH . WPINC . '/rss.php');289 290 // ugly hack copy of RSS because of Unicode chars misprinting291 function wp_rss2($url, $num_items = -1) {292 if ($rss = fetch_rss($url)) {293 echo '<ul>';294 295 if ($num_items !== -1) {296 $rss->items = array_slice($rss->items, 0, $num_items);297 }298 299 foreach ((array) $rss->items as $item) {300 printf(301 '<li><a href="%1$s" title="%2$s">%3$s</a></li>',302 //esc_url( $item['link'] ),303 //esc_attr( strip_tags( $item['description'] ) ),304 // TODO - check Switched to 2.7 compatability functions305 clean_url($item['link']),306 attribute_escape(strip_tags($item['description'])),307 htmlentities($item['title'], ENT_COMPAT, 'UTF-8')308 );309 }310 311 echo '</ul>';312 } else {313 _e('An error has occurred, which probably means the feed is down. Try again later.');314 }315 }316 317 288 echo '<div style="margin:6px">'; 318 wp_ rss2('http://feeds2.feedburner.com/transposh', 5);289 wp_widget_rss_output('http://feeds2.feedburner.com/transposh',array('items' => 5)); 319 290 echo '</div>'; 320 291 }
Note: See TracChangeset
for help on using the changeset viewer.
