Make WordPress Core

Changeset 28742


Ignore:
Timestamp:
06/11/2014 06:55:00 PM (10 years ago)
Author:
wonderboymusic
Message:

Don't use variable variables in wp_dashboard_plugins_output(). Variable variables aren't the worst thing about this function.

See #27881.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/dashboard.php

    r28633 r28742  
    10471047    echo '<ul>';
    10481048
    1049     foreach ( array(
    1050         'popular' => __( 'Popular Plugin' )
    1051     ) as $feed => $label ) {
    1052         if ( is_wp_error($$feed) || !$$feed->get_item_quantity() )
     1049    foreach ( array( $popular ) as $feed ) {
     1050        if ( is_wp_error( $feed ) || ! $feed->get_item_quantity() )
    10531051            continue;
    10541052
    1055         $items = $$feed->get_items(0, 5);
     1053        $items = $feed->get_items(0, 5);
    10561054
    10571055        // Pick a random, non-installed plugin
     
    10991097
    11001098        $ilink = wp_nonce_url('plugin-install.php?tab=plugin-information&plugin=' . $slug, 'install-plugin_' . $slug) . '&amp;TB_iframe=true&amp;width=600&amp;height=800';
    1101 
    1102         echo "<li class='dashboard-news-plugin'><span>$label:</span> <a href='$link' class='dashboard-news-plugin-link'>$title</a>&nbsp;<span>(<a href='$ilink' class='thickbox' title='$title'>" . __( 'Install' ) . "</a>)</span></li>";
    1103 
    1104         $$feed->__destruct();
    1105         unset( $$feed );
     1099        echo "<li class='dashboard-news-plugin'><span>" . __( 'Popular Plugin' ) . ":</span> <a href='$link' class='dashboard-news-plugin-link'>$title</a>&nbsp;<span>(<a href='$ilink' class='thickbox' title='$title'>" . __( 'Install' ) . "</a>)</span></li>";
     1100
     1101        $feed->__destruct();
     1102        unset( $feed );
    11061103    }
    11071104
Note: See TracChangeset for help on using the changeset viewer.