WordPress.org

Make WordPress Core

Ticket #5931: 5931.diff

File 5931.diff, 3.4 KB (added by mdawaffe, 7 years ago)
  • wp-admin/css/dashboard.css

     
    231231#dashboard-widgets .widget_rss ul li div { 
    232232        clear: both; 
    233233} 
     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} 
  • wp-admin/index-extra.php

     
    9999<?php 
    100100} 
    101101break; 
     102 
     103case '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 
     108foreach ( 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 
     147endforeach; 
     148break; 
     149 
    102150} 
    103151 
    104 ?> 
    105  No newline at end of file 
     152?> 
  • wp-admin/index.php

     
    1313                jQuery('#dashboard_incoming_links div.dashboard-widget-content').not( '.dashboard-widget-control' ).load('index-extra.php?jax=incominglinks'); 
    1414                jQuery('#dashboard_primary div.dashboard-widget-content').not( '.dashboard-widget-control' ).load('index-extra.php?jax=devnews'); 
    1515                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'); 
    1717        }); 
    1818</script> 
    1919<?php