mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-11 10:59:07 +01:00
Don't use variable variables in wp_dashboard_plugins_output()
. Variable variables aren't the worst thing about this function.
See #27881. Built from https://develop.svn.wordpress.org/trunk@28742 git-svn-id: http://core.svn.wordpress.org/trunk@28556 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
43bf7f271f
commit
812ea43343
@ -1046,13 +1046,11 @@ function wp_dashboard_plugins_output( $rss, $args = array() ) {
|
||||
|
||||
echo '<ul>';
|
||||
|
||||
foreach ( array(
|
||||
'popular' => __( 'Popular Plugin' )
|
||||
) as $feed => $label ) {
|
||||
if ( is_wp_error($$feed) || !$$feed->get_item_quantity() )
|
||||
foreach ( array( $popular ) as $feed ) {
|
||||
if ( is_wp_error( $feed ) || ! $feed->get_item_quantity() )
|
||||
continue;
|
||||
|
||||
$items = $$feed->get_items(0, 5);
|
||||
$items = $feed->get_items(0, 5);
|
||||
|
||||
// Pick a random, non-installed plugin
|
||||
while ( true ) {
|
||||
@ -1098,11 +1096,10 @@ function wp_dashboard_plugins_output( $rss, $args = array() ) {
|
||||
$description = esc_html( strip_tags( @html_entity_decode( $item->get_description(), ENT_QUOTES, get_option( 'blog_charset' ) ) ) );
|
||||
|
||||
$ilink = wp_nonce_url('plugin-install.php?tab=plugin-information&plugin=' . $slug, 'install-plugin_' . $slug) . '&TB_iframe=true&width=600&height=800';
|
||||
echo "<li class='dashboard-news-plugin'><span>" . __( 'Popular Plugin' ) . ":</span> <a href='$link' class='dashboard-news-plugin-link'>$title</a> <span>(<a href='$ilink' class='thickbox' title='$title'>" . __( 'Install' ) . "</a>)</span></li>";
|
||||
|
||||
echo "<li class='dashboard-news-plugin'><span>$label:</span> <a href='$link' class='dashboard-news-plugin-link'>$title</a> <span>(<a href='$ilink' class='thickbox' title='$title'>" . __( 'Install' ) . "</a>)</span></li>";
|
||||
|
||||
$$feed->__destruct();
|
||||
unset( $$feed );
|
||||
$feed->__destruct();
|
||||
unset( $feed );
|
||||
}
|
||||
|
||||
echo '</ul>';
|
||||
|
Loading…
Reference in New Issue
Block a user