diff options
author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2006-11-24 16:16:44 +0000 |
---|---|---|
committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2006-11-24 16:16:44 +0000 |
commit | 600b71019494e1c29898a620e58c0d2602f37b74 (patch) | |
tree | 21181d77ad4ebbcd42cd883e509c08a568d29514 /wp-admin/index-extra.php | |
parent | 7935d0bd9ef23d32ae29a95bd6c3ea0b6eab2973 (diff) | |
download | wordpress-mu-600b71019494e1c29898a620e58c0d2602f37b74.tar.gz wordpress-mu-600b71019494e1c29898a620e58c0d2602f37b74.tar.xz wordpress-mu-600b71019494e1c29898a620e58c0d2602f37b74.zip |
WP Merge to 4524
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@810 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-admin/index-extra.php')
-rw-r--r-- | wp-admin/index-extra.php | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/wp-admin/index-extra.php b/wp-admin/index-extra.php new file mode 100644 index 0000000..782e0a7 --- /dev/null +++ b/wp-admin/index-extra.php @@ -0,0 +1,67 @@ +<?php +require_once('admin.php'); +require_once (ABSPATH . WPINC . '/rss.php'); + +switch ( $_GET['jax'] ) { + +case 'incominglinks' : +$rss = @fetch_rss('http://feeds.technorati.com/cosmos/rss/?url='. trailingslashit(get_option('home')) .'&partner=wordpress'); +if ( isset($rss->items) && 1 < count($rss->items) ) { // Technorati returns a 1-item feed when it has no results +?> +<h3><?php _e('Incoming Links'); ?> <cite><a href="http://www.technorati.com/search/<?php echo trailingslashit(get_option('home')); ?>?partner=wordpress"><?php _e('More »'); ?></a></cite></h3> +<ul> +<?php +$rss->items = array_slice($rss->items, 0, 10); +foreach ($rss->items as $item ) { +?> + <li><a href="<?php echo wp_filter_kses($item['link']); ?>"><?php echo wptexturize(wp_specialchars($item['title'])); ?></a></li> +<?php } ?> +</ul> +<?php +} +break; + +case 'devnews' : +$rss = @fetch_rss('http://wordpress.org/development/feed/'); +if ( isset($rss->items) && 0 != count($rss->items) ) { +?> +<h3><?php _e('WordPress Development Blog'); ?></h3> +<?php +$rss->items = array_slice($rss->items, 0, 3); +foreach ($rss->items as $item ) { +?> +<h4><a href='<?php echo wp_filter_kses($item['link']); ?>'><?php echo wp_specialchars($item['title']); ?></a> — <?php printf(__('%s ago'), human_time_diff(strtotime($item['pubdate'], time() ) ) ); ?></h4> +<p><?php echo $item['description']; ?></p> +<?php + } +} +?> + +<?php +break; + +case 'planetnews' : +$rss = @fetch_rss('http://planet.wordpress.org/feed/'); +if ( isset($rss->items) && 0 != count($rss->items) ) { +?> +<h3><?php _e('Other WordPress News'); ?></h3> +<ul> +<?php +$rss->items = array_slice($rss->items, 0, 20); +foreach ($rss->items as $item ) { +$title = wp_specialchars($item['title']); +$author = preg_replace( '|(.+?):.+|s', '$1', $item['title'] ); +$post = preg_replace( '|.+?:(.+)|s', '$1', $item['title'] ); +?> +<li><a href='<?php echo wp_filter_kses($item['link']); ?>'><span class="post"><?php echo $post; ?></span><span class="hidden"> - </span><cite><?php echo $author; ?></cite></a></li> +<?php + } +?> +</ul> +<p class="readmore"><a href="http://planet.wordpress.org/"><?php _e('Read more'); ?> »</a></p> +<?php +} +break; +} + +?>
\ No newline at end of file |