Changeset 6928
- Timestamp:
- 02/20/2008 03:23:34 AM (18 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 3 edited
-
css/dashboard.css (modified) (1 diff)
-
index-extra.php (modified) (1 diff)
-
index.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/css/dashboard.css
r6917 r6928 232 232 clear: both; 233 233 } 234 235 #dashboard_primary a.rsswidget, #dashboard_plugins h5 { 236 font-size: 1.2em; 237 } 238 239 #dashboard_primary span.rss-date { 240 font-size: 1.2em; 241 color: #999; 242 } 243 244 #dashboard_plugins h4 { 245 font-size: 1em; 246 margin: 0 0 .7em; 247 } 248 249 #dashboard_plugins h5 { 250 margin: 0; 251 display: inline; 252 } 253 254 #dashboard_plugins p { 255 margin: 0 0 1em; 256 } -
trunk/wp-admin/index-extra.php
r6810 r6928 100 100 } 101 101 break; 102 103 case 'plugins' : 104 $popular = @fetch_rss( 'http://wordpress.org/extend/plugins/rss/browse/popular/' ); 105 $new = @fetch_rss( 'http://wordpress.org/extend/plugins/rss/browse/new/' ); 106 $updated = @fetch_rss( 'http://wordpress.org/extend/plugins/rss/browse/updated/' ); 107 108 foreach ( array( 'popular' => __('Most Popular'), 'new' => __('Newest Plugins'), 'updated' => __('Recently Updated') ) as $feed => $label ) : 109 if ( !isset($$feed->items) || 0 == count($$feed->items) ) 110 continue; 111 112 $$feed->items = array_slice($$feed->items, 0, 5); 113 $item_key = array_rand($$feed->items); 114 115 // Eliminate some common badly formed plugin descriptions 116 while ( ( null !== $item_key = array_rand($$feed->items) ) && false !== strpos( $$feed->items[$item_key]['description'], 'Plugin Name:' ) ) 117 unset($$feed->items[$item_key]); 118 119 if ( !isset($$feed->items[$item_key]) ) 120 continue; 121 122 $item = $$feed->items[$item_key]; 123 124 // current bbPress feed item titles are: user on "topic title" 125 if ( preg_match( '/"(.*)"/s', $item['title'], $matches ) ) 126 $title = $matches[1]; 127 else // but let's make it forward compatible if things change 128 $title = $item['title']; 129 $title = wp_specialchars( $title ); 130 131 $description = wp_specialchars( strip_tags(html_entity_decode($item['description'], ENT_QUOTES)) ); 132 133 list($link, $frag) = explode( '#', $item['link'] ); 134 135 $link = clean_url($link); 136 $dlink = rtrim($link, '/') . '/download/'; 137 138 ?> 139 140 <h4><?php echo $label; ?></h4> 141 <h5><a href="<?php echo $link; ?>"><?php echo $title; ?></a></h5> <span>(<a href="<?php echo $dlink; ?>"><?php _e( 'Download' ); ?></a>)</span> 142 143 <p><?php echo $description; ?></p> 144 145 <?php 146 147 endforeach; 148 break; 149 102 150 } 103 151 -
trunk/wp-admin/index.php
r6913 r6928 14 14 jQuery('#dashboard_primary div.dashboard-widget-content').not( '.dashboard-widget-control' ).load('index-extra.php?jax=devnews'); 15 15 jQuery('#dashboard_secondary div.dashboard-widget-content').not( '.dashboard-widget-control' ).load('index-extra.php?jax=planetnews'); 16 jQuery('#dashboard_plugins div.dashboard-widget-content').not( '.dashboard-widget-control' ). html( 'TODO');16 jQuery('#dashboard_plugins div.dashboard-widget-content').not( '.dashboard-widget-control' ).load('index-extra.php?jax=plugins'); 17 17 }); 18 18 </script>
Note: See TracChangeset
for help on using the changeset viewer.