diff --git a/wp-admin/css/dashboard.css b/wp-admin/css/dashboard.css index 6e08f192f4..ba7895b9ce 100644 --- a/wp-admin/css/dashboard.css +++ b/wp-admin/css/dashboard.css @@ -231,3 +231,26 @@ div.dashboard-widget-content .comment-meta { #dashboard-widgets .widget_rss ul li div { clear: both; } + +#dashboard_primary a.rsswidget, #dashboard_plugins h5 { + font-size: 1.2em; +} + +#dashboard_primary span.rss-date { + font-size: 1.2em; + color: #999; +} + +#dashboard_plugins h4 { + font-size: 1em; + margin: 0 0 .7em; +} + +#dashboard_plugins h5 { + margin: 0; + display: inline; +} + +#dashboard_plugins p { + margin: 0 0 1em; +} diff --git a/wp-admin/index-extra.php b/wp-admin/index-extra.php index 0842dd5fe2..f032ccfde0 100644 --- a/wp-admin/index-extra.php +++ b/wp-admin/index-extra.php @@ -99,6 +99,54 @@ $post = preg_replace( '|.+?:(.+)|s', '$1', $item['title'] ); __('Most Popular'), 'new' => __('Newest Plugins'), 'updated' => __('Recently Updated') ) as $feed => $label ) : + if ( !isset($$feed->items) || 0 == count($$feed->items) ) + continue; + + $$feed->items = array_slice($$feed->items, 0, 5); + $item_key = array_rand($$feed->items); + + // Eliminate some common badly formed plugin descriptions + while ( ( null !== $item_key = array_rand($$feed->items) ) && false !== strpos( $$feed->items[$item_key]['description'], 'Plugin Name:' ) ) + unset($$feed->items[$item_key]); + + if ( !isset($$feed->items[$item_key]) ) + continue; + + $item = $$feed->items[$item_key]; + + // current bbPress feed item titles are: user on "topic title" + if ( preg_match( '/"(.*)"/s', $item['title'], $matches ) ) + $title = $matches[1]; + else // but let's make it forward compatible if things change + $title = $item['title']; + $title = wp_specialchars( $title ); + + $description = wp_specialchars( strip_tags(html_entity_decode($item['description'], ENT_QUOTES)) ); + + list($link, $frag) = explode( '#', $item['link'] ); + + $link = clean_url($link); + $dlink = rtrim($link, '/') . '/download/'; + +?> + +

+
() + +

+ + \ No newline at end of file +?> diff --git a/wp-admin/index.php b/wp-admin/index.php index 1e382f010b..445b4e089a 100644 --- a/wp-admin/index.php +++ b/wp-admin/index.php @@ -13,7 +13,7 @@ function index_js() { jQuery('#dashboard_incoming_links div.dashboard-widget-content').not( '.dashboard-widget-control' ).load('index-extra.php?jax=incominglinks'); jQuery('#dashboard_primary div.dashboard-widget-content').not( '.dashboard-widget-control' ).load('index-extra.php?jax=devnews'); jQuery('#dashboard_secondary div.dashboard-widget-content').not( '.dashboard-widget-control' ).load('index-extra.php?jax=planetnews'); - jQuery('#dashboard_plugins div.dashboard-widget-content').not( '.dashboard-widget-control' ).html( 'TODO' ); + jQuery('#dashboard_plugins div.dashboard-widget-content').not( '.dashboard-widget-control' ).load('index-extra.php?jax=plugins'); });