Index: wp-admin/includes/plugin-install.php
===================================================================
--- wp-admin/includes/plugin-install.php	(revision 18488)
+++ wp-admin/includes/plugin-install.php	(working copy)
@@ -236,134 +236,160 @@
  * Display plugin information in dialog box form.
  *
  * @since 2.7.0
+ * @param array $data content, title
+ * @param boolean $framed whether to wrap in admin interface
+ * @return array $data filtered data (if called as filter)
  */
-function install_plugin_information() {
-	global $tab;
+function install_plugin_information($data, $framed) {
 
-	$api = plugins_api('plugin_information', array('slug' => stripslashes( $_REQUEST['plugin'] ) ));
+    global $tab;
 
-	if ( is_wp_error($api) )
-		wp_die($api);
+    $api = plugins_api('plugin_information', array('slug' => stripslashes( $_REQUEST['plugin'] ) ));
 
-	$plugins_allowedtags = array('a' => array('href' => array(), 'title' => array(), 'target' => array()),
-								'abbr' => array('title' => array()), 'acronym' => array('title' => array()),
-								'code' => array(), 'pre' => array(), 'em' => array(), 'strong' => array(),
-								'div' => array(), 'p' => array(), 'ul' => array(), 'ol' => array(), 'li' => array(),
-								'h1' => array(), 'h2' => array(), 'h3' => array(), 'h4' => array(), 'h5' => array(), 'h6' => array(),
-								'img' => array('src' => array(), 'class' => array(), 'alt' => array()));
-	//Sanitize HTML
-	foreach ( (array)$api->sections as $section_name => $content )
-		$api->sections[$section_name] = wp_kses($content, $plugins_allowedtags);
-	foreach ( array('version', 'author', 'requires', 'tested', 'homepage', 'downloaded', 'slug') as $key )
-		$api->$key = wp_kses($api->$key, $plugins_allowedtags);
+    if ( is_wp_error($api) )
+        wp_die($api);
 
-	$section = isset($_REQUEST['section']) ? stripslashes( $_REQUEST['section'] ) : 'description'; //Default to the Description tab, Do not translate, API returns English.
-	if ( empty($section) || ! isset($api->sections[ $section ]) )
-		$section = array_shift( $section_titles = array_keys((array)$api->sections) );
+    $plugins_allowedtags = array('a' => array('href' => array(), 'title' => array(), 'target' => array()),
+                                'abbr' => array('title' => array()), 'acronym' => array('title' => array()),
+                                'code' => array(), 'pre' => array(), 'em' => array(), 'strong' => array(),
+                                'div' => array(), 'p' => array(), 'ul' => array(), 'ol' => array(), 'li' => array(),
+                                'h1' => array(), 'h2' => array(), 'h3' => array(), 'h4' => array(), 'h5' => array(), 'h6' => array(),
+                                'img' => array('src' => array(), 'class' => array(), 'alt' => array()));
+    //Sanitize HTML
+    foreach ( (array)$api->sections as $section_name => $content )
+        $api->sections[$section_name] = wp_kses($content, $plugins_allowedtags);
+    foreach ( array('version', 'author', 'requires', 'tested', 'homepage', 'downloaded', 'slug') as $key )
+        $api->$key = wp_kses($api->$key, $plugins_allowedtags);
 
-	iframe_header( __('Plugin Install') );
-	echo "<div id='$tab-header'>\n";
-	echo "<ul id='sidemenu'>\n";
-	foreach ( (array)$api->sections as $section_name => $content ) {
+    $section = isset($_REQUEST['section']) ? stripslashes( $_REQUEST['section'] ) : 'description'; //Default to the Description tab, Do not translate, API returns English.
+    if ( empty($section) || ! isset($api->sections[ $section ]) )
+        $section = array_shift( $section_titles = array_keys((array)$api->sections) );
 
-		$title = $section_name;
-		$title = ucwords(str_replace('_', ' ', $title));
+    $contents = ''; 
 
-		$class = ( $section_name == $section ) ? ' class="current"' : '';
-		$href = add_query_arg( array('tab' => $tab, 'section' => $section_name) );
-		$href = esc_url($href);
-		$san_title = esc_attr(sanitize_title_with_dashes($title));
-		echo "\t<li><a name='$san_title' target='' href='$href'$class>$title</a></li>\n";
-	}
-	echo "</ul>\n";
-	echo "</div>\n";
-	?>
-	<div class="alignright fyi">
-		<?php if ( ! empty($api->download_link) && ( current_user_can('install_plugins') || current_user_can('update_plugins') ) ) : ?>
-		<p class="action-button">
-		<?php
-		$status = install_plugin_install_status($api);
-		switch ( $status['status'] ) {
-			case 'install':
-				if ( $status['url'] )
-					echo '<a href="' . $status['url'] . '" target="_parent">' . __('Install Now') . '</a>';
-				break;
-			case 'update_available':
-				if ( $status['url'] )
-					echo '<a href="' . $status['url'] . '" target="_parent">' . __('Install Update Now') .'</a>';
-				break;
-			case 'newer_installed':
-				echo '<a>' . sprintf(__('Newer Version (%s) Installed'), $status['version']) . '</a>';
-				break;
-			case 'latest_installed':
-				echo '<a>' . __('Latest Version Installed') . '</a>';
-				break;
-		}
-		?>
-		</p>
-		<?php endif; ?>
-		<h2 class="mainheader"><?php /* translators: For Your Information */ _e('FYI') ?></h2>
-		<ul>
-<?php if ( ! empty($api->version) ) : ?>
-			<li><strong><?php _e('Version:') ?></strong> <?php echo $api->version ?></li>
-<?php endif; if ( ! empty($api->author) ) : ?>
-			<li><strong><?php _e('Author:') ?></strong> <?php echo links_add_target($api->author, '_blank') ?></li>
-<?php endif; if ( ! empty($api->last_updated) ) : ?>
-			<li><strong><?php _e('Last Updated:') ?></strong> <span title="<?php echo $api->last_updated ?>"><?php
-							printf( __('%s ago'), human_time_diff(strtotime($api->last_updated)) ) ?></span></li>
-<?php endif; if ( ! empty($api->requires) ) : ?>
-			<li><strong><?php _e('Requires WordPress Version:') ?></strong> <?php printf(__('%s or higher'), $api->requires) ?></li>
-<?php endif; if ( ! empty($api->tested) ) : ?>
-			<li><strong><?php _e('Compatible up to:') ?></strong> <?php echo $api->tested ?></li>
-<?php endif; if ( ! empty($api->downloaded) ) : ?>
-			<li><strong><?php _e('Downloaded:') ?></strong> <?php printf(_n('%s time', '%s times', $api->downloaded), number_format_i18n($api->downloaded)) ?></li>
-<?php endif; if ( ! empty($api->slug) && empty($api->external) ) : ?>
-			<li><a target="_blank" href="http://wordpress.org/extend/plugins/<?php echo $api->slug ?>/"><?php _e('WordPress.org Plugin Page &#187;') ?></a></li>
-<?php endif; if ( ! empty($api->homepage) ) : ?>
-			<li><a target="_blank" href="<?php echo $api->homepage ?>"><?php _e('Plugin Homepage  &#187;') ?></a></li>
-<?php endif; ?>
-		</ul>
-		<?php if ( ! empty($api->rating) ) : ?>
-		<h2><?php _e('Average Rating') ?></h2>
-		<div class="star-holder" title="<?php printf(_n('(based on %s rating)', '(based on %s ratings)', $api->num_ratings), number_format_i18n($api->num_ratings)); ?>">
-			<div class="star star-rating" style="width: <?php echo esc_attr($api->rating) ?>px"></div>
-			<div class="star star5"><img src="<?php echo admin_url('images/star.png?v=20110615'); ?>" alt="<?php _e('5 stars') ?>" /></div>
-			<div class="star star4"><img src="<?php echo admin_url('images/star.png?v=20110615'); ?>" alt="<?php _e('4 stars') ?>" /></div>
-			<div class="star star3"><img src="<?php echo admin_url('images/star.png?v=20110615'); ?>" alt="<?php _e('3 stars') ?>" /></div>
-			<div class="star star2"><img src="<?php echo admin_url('images/star.png?v=20110615'); ?>" alt="<?php _e('2 stars') ?>" /></div>
-			<div class="star star1"><img src="<?php echo admin_url('images/star.png?v=20110615'); ?>" alt="<?php _e('1 star') ?>" /></div>
-		</div>
-		<small><?php printf(_n('(based on %s rating)', '(based on %s ratings)', $api->num_ratings), number_format_i18n($api->num_ratings)); ?></small>
-		<?php endif; ?>
-	</div>
-	<div id="section-holder" class="wrap">
-	<?php
-		if ( !empty($api->tested) && version_compare( substr($GLOBALS['wp_version'], 0, strlen($api->tested)), $api->tested, '>') )
-			echo '<div class="updated"><p>' . __('<strong>Warning:</strong> This plugin has <strong>not been tested</strong> with your current version of WordPress.') . '</p></div>';
+    $contents .= "<div id='$tab-header'>\n";
+    $contents .= "<ul id='sidemenu'>\n";
+    foreach ( (array)$api->sections as $section_name => $content ) {
 
-		else if ( !empty($api->requires) && version_compare( substr($GLOBALS['wp_version'], 0, strlen($api->requires)), $api->requires, '<') )
-			echo '<div class="updated"><p>' . __('<strong>Warning:</strong> This plugin has <strong>not been marked as compatible</strong> with your version of WordPress.') . '</p></div>';
+        $title = $section_name;
+        $title = ucwords(str_replace('_', ' ', $title));
 
-		foreach ( (array)$api->sections as $section_name => $content ) {
-			$title = $section_name;
-			$title[0] = strtoupper($title[0]);
-			$title = str_replace('_', ' ', $title);
+        $class = ( $section_name == $section ) ? ' class="current"' : '';
+        $href = add_query_arg( array('tab' => $tab, 'section' => $section_name) );
+        $href = esc_url($href);
+        $san_title = esc_attr(sanitize_title_with_dashes($title));
+        $contents .= "\t<li><a name='$san_title' target='' href='$href'$class>$title</a></li>\n";
+    }
+    $contents .= "</ul>\n";
+    $contents .= "</div>\n";
+    $contents .= '<div class="alignright fyi">';
 
-			$content = links_add_base_url($content, 'http://wordpress.org/extend/plugins/' . $api->slug . '/');
-			$content = links_add_target($content, '_blank');
+    if ( ! empty($api->download_link) && ( current_user_can('install_plugins') || current_user_can('update_plugins') ) ) {
 
-			$san_title = esc_attr(sanitize_title_with_dashes($title));
+        $contents .= '<p class="action-button">';
+        $status = install_plugin_install_status($api);
+        switch ( $status['status'] ) {
+            case 'install':
+                if ( $status['url'] )
+                    $contents .= '<a href="' . $status['url'] . '" target="_parent">' . __('Install Now') . '</a>';
+                break;
+            case 'update_available':
+                if ( $status['url'] )
+                    $contents .= '<a href="' . $status['url'] . '" target="_parent">' . __('Install Update Now') .'</a>';
+                break;
+            case 'newer_installed':
+                $contents .= '<a>' . sprintf(__('Newer Version (%s) Installed'), $status['version']) . '</a>';
+                break;
+            case 'latest_installed':
+                $contents .= '<a>' . __('Latest Version Installed') . '</a>';
+                break;
+        }
+        $contents .= '</p>';
+        
+    }
+         
+    $contents .= '<h2 class="mainheader">' . /* translators: For Your Information */ __('FYI') . '</h2>';
+    $contents .= '<ul>';
+    if ( ! empty($api->version) ) {
+        $contents .= '<li><strong>' . __('Version:') . '</strong> ' . $api->version . '</li>';
+    }
+    if ( ! empty($api->author) ) {
+        $contents .= '<li><strong>' . __('Author:') . '</strong> ' . links_add_target($api->author, '_blank') . '</li>';
+    }
+    if ( ! empty($api->last_updated) ) {
+        $contents .= '<li><strong>' . __('Last Updated:') . '</strong> <span title="' . $api->last_updated . '">' .
+                        sprintf( __('%s ago'), human_time_diff(strtotime($api->last_updated)) ) . '</span></li>';
+    }
+    if ( ! empty($api->requires) ) {
+        $contents .= '<li><strong>' . __('Requires WordPress Version:') . '</strong> ' . sprintf(__('%s or higher'), $api->requires) . '</li>';
+    }
+    if ( ! empty($api->tested) ) {
+        $contents .= '<li><strong>' . __('Compatible up to:') . '</strong> ' . $api->tested . '</li>';
+    }
+    if ( ! empty($api->downloaded) ) {
+        $contents .= '<li><strong>' . __('Downloaded:') . '</strong> ' . sprintf(_n('%s time', '%s times', $api->downloaded), number_format_i18n($api->downloaded)) . '</li>';
+    }
+    if ( ! empty($api->slug) && empty($api->external) ) {
+        $contents .= '<li><a target="_blank" href="http://wordpress.org/extend/plugins/' . $api->slug . '">' . __('WordPress.org Plugin Page &#187;') . '</a></li>';
+    }
+    if ( ! empty($api->homepage) ) {
+        $contents .= '<li><a target="_blank" href="' . $api->homepage . '">' . __('Plugin Homepage  &#187;') . '</a></li>';
+    }
+    $contents .= '</ul>';
+    
+    if ( ! empty($api->rating) ) {
+    $contents .= '<h2>' . __('Average Rating') . '</h2>';
+    $contents .= '<div class="star-holder" title="' . sprintf(_n('(based on %s rating)', '(based on %s ratings)', $api->num_ratings), number_format_i18n($api->num_ratings)) . '">';
 
-			$display = ( $section_name == $section ) ? 'block' : 'none';
+    $contents .= '<div class="star star-rating" style="width: ' . esc_attr($api->rating) . 'px"></div>';
+    $contents .= '<div class="star star5"><img src="' . admin_url('images/star.png?v=20110615') . '" alt="' . __('5 stars') . '" /></div>';
+    $contents .= '<div class="star star4"><img src="' . admin_url('images/star.png?v=20110615') . '" alt="' . __('4 stars') . '" /></div>';
+    $contents .= '<div class="star star3"><img src="' . admin_url('images/star.png?v=20110615') . '" alt="' . __('3 stars') . '" /></div>';
+    $contents .= '<div class="star star2"><img src="' . admin_url('images/star.png?v=20110615') . '" alt="' . __('2 stars') . '" /></div>';
+    $contents .= '<div class="star star1"><img src="' . admin_url('images/star.png?v=20110615') . '" alt="' . __('1 star') . '" /></div>';
 
-			echo "\t<div id='section-{$san_title}' class='section' style='display: {$display};'>\n";
-			echo "\t\t<h2 class='long-header'>$title</h2>";
-			echo $content;
-			echo "\t</div>\n";
-		}
-	echo "</div>\n";
+    $contents .= '</div>';
+    $contents .= '<small>' . sprintf(_n('(based on %s rating)', '(based on %s ratings)', $api->num_ratings), number_format_i18n($api->num_ratings)) . '</small>';
+    }
+    $contents .= '</div>';
+    $contents .= '<div id="section-holder" class="wrap">';
 
-	iframe_footer();
-	exit;
+    if ( !empty($api->tested) && version_compare( substr($GLOBALS['wp_version'], 0, strlen($api->tested)), $api->tested, '>') )
+        $contents .= '<div class="updated"><p>' . __('<strong>Warning:</strong> This plugin has <strong>not been tested</strong> with your current version of WordPress.') . '</p></div>';
+
+    else if ( !empty($api->requires) && version_compare( substr($GLOBALS['wp_version'], 0, strlen($api->requires)), $api->requires, '<') )
+        $contents .= '<div class="updated"><p>' . __('<strong>Warning:</strong> This plugin has <strong>not been marked as compatible</strong> with your version of WordPress.') . '</p></div>';
+
+    foreach ( (array)$api->sections as $section_name => $content ) {
+        $title = $section_name;
+        $title[0] = strtoupper($title[0]);
+        $title = str_replace('_', ' ', $title);
+
+        $content = links_add_base_url($content, 'http://wordpress.org/extend/plugins/' . $api->slug . '/');
+        $content = links_add_target($content, '_blank');
+
+        $san_title = esc_attr(sanitize_title_with_dashes($title));
+
+        $display = ( $section_name == $section ) ? 'block' : 'none';
+
+        $contents .= "\t<div id='section-{$san_title}' class='section' style='display: {$display};'>\n";
+        $contents .= "\t\t<h2 class='long-header'>$title</h2>";
+        $contents .= $content;
+        $contents .= "\t</div>\n";
+    }
+    $contents .= "</div>\n";
+
+    if($framed) {
+        iframe_header( __('Plugin Install') );
+        echo $contents;
+        iframe_footer();
+        exit;
+    }
+    else {
+    	$data['contents'] = $contents;
+    	$data['title'] = $api->name;
+        return $data;
+    }
 }
-add_action('install_plugins_pre_plugin-information', 'install_plugin_information');
+add_filter('install_plugins_pre_plugin-information', 'install_plugin_information', 10, 2);
+add_action('install_plugins_pre_plugin-information', 'install_plugin_information', 10, 2);
Index: wp-admin/plugin-install.php
===================================================================
--- wp-admin/plugin-install.php	(revision 18488)
+++ wp-admin/plugin-install.php	(working copy)
@@ -6,7 +6,7 @@
  * @subpackage Administration
  */
 // TODO route this pages via a specific iframe handler instead of the do_action below
-if ( !defined( 'IFRAME_REQUEST' ) && isset( $_GET['tab'] ) && ( 'plugin-information' == $_GET['tab'] ) )
+if ( !defined( 'IFRAME_REQUEST' ) && isset( $_GET['tab'] ) && ( 'plugin-information' == $_GET['tab'] ) && ( !isset($_GET['wrapped']) ) )
 	define( 'IFRAME_REQUEST', true );
 
 /** WordPress Administration Bootstrap */
@@ -34,7 +34,13 @@
 
 $body_id = $tab;
 
-do_action('install_plugins_pre_' . $tab); //Used to override the general interface, Eg, install or plugin information.
+if(defined('IFRAME_REQUEST')) {
+	do_action('install_plugins_pre_' . $tab, array(), defined('IFRAME_REQUEST')); //Used to override the general interface, Eg, install or plugin information.
+}
+else {
+	$data = array('contents' => '', 'title' => $title);
+	$data = apply_filters('install_plugins_pre_' . $tab, $data, defined('IFRAME_REQUEST')); //Used to override the general interface, Eg, install or plugin information.
+}
 
 add_contextual_help($current_screen,
 	'<p>' . sprintf(__('Plugins hook into WordPress to extend its functionality with custom features. Plugins are developed independently from WordPress core by thousands of developers all over the world. All plugins in the official <a href="%s" target="_blank">WordPress.org Plugin Directory</a> are compatible with the license WordPress uses. You can find new plugins to install by searching or browsing the Directory right here in your own Plugins section.'), 'http://wordpress.org/extend/plugins/') . '</p>' .
@@ -50,10 +56,10 @@
 ?>
 <div class="wrap">
 <?php screen_icon(); ?>
-<h2><?php echo esc_html( $title ); ?></h2>
+<h2><?php echo esc_html( $data['title'] ); ?></h2>
 
 <?php $wp_list_table->views(); ?>
-
+<?php echo $data['contents']; ?>
 <br class="clear" />
 <?php do_action('install_plugins_' . $tab, $paged); ?>
 </div>
