// If we get to this point, then the random plugin isn't installed and we can stop the while().
break;
} // Eliminate some common badly formed plugin descriptions.
while ( ( null !==
$item_key =
array_rand($items) ) &&
str_contains( $items[$item_key]->
get_description(), 'Plugin Name:'
) ) unset($items[$item_key]);
if ( !
isset($items[$item_key]) ) continue;
$raw_title =
$item->
get_title();
$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> ' .
esc_html( $raw_title ) .
' <a href="' .
$ilink . '" class="thickbox open-plugin-details-modal" aria-label="' .
/* translators: %s: Plugin name. */
esc_attr( sprintf( _x( 'Install %s', 'plugin'
),
$raw_title ) ) . '">(' .
__( 'Install'
) . ')</a></li>';
$feed->
__destruct();
unset( $feed );
}