Index: wp-admin/includes/class-wp-plugin-install-list-table.php
===================================================================
--- wp-admin/includes/class-wp-plugin-install-list-table.php (revision 28803)
+++ wp-admin/includes/class-wp-plugin-install-list-table.php (working copy)
@@ -63,7 +63,7 @@
if ( empty( $tab ) || ( !isset( $tabs[ $tab ] ) && !in_array( $tab, (array) $nonmenu_tabs ) ) )
$tab = key( $tabs );
- $args = array( 'page' => $paged, 'per_page' => $per_page );
+ $args = array( 'page' => $paged, 'per_page' => $per_page, 'fields' => array( 'last_updated' => true, 'downloaded' => true ) );
switch ( $tab ) {
case 'search':
@@ -154,6 +154,28 @@
return $display_tabs;
}
+ /**
+ * Override the parent display() so we can provide a different container.
+ */
+ public function display() {
+ $singular = $this->_args['singular'];
+
+ $this->display_tablenav( 'top' );
+
+?>
+
@@ -211,31 +233,19 @@
$plugin = (array) $plugin;
$title = wp_kses( $plugin['name'], $plugins_allowedtags );
- //Limit description to 400char, and remove any HTML.
- $description = strip_tags( $plugin['description'] );
- if ( strlen( $description ) > 400 )
- $description = mb_substr( $description, 0, 400 ) . '…';
- //remove any trailing entities
- $description = preg_replace( '/&[^;\s]{0,6}$/', '', $description );
- //strip leading/trailing & multiple consecutive lines
- $description = trim( $description );
- $description = preg_replace( "|(\r?\n)+|", "\n", $description );
- //\n =>
- $description = nl2br( $description );
+ //Remove any HTML from the description.
+ $description = strip_tags( $plugin['short_description'] );
$version = wp_kses( $plugin['version'], $plugins_allowedtags );
$name = strip_tags( $title . ' ' . $version );
$author = $plugin['author'];
if ( ! empty( $plugin['author'] ) )
- $author = '
' . sprintf( __( 'By %s' ), $author ) . '.';
+ $author = '
' . sprintf( __( 'By %s' ), $author ) . '';
$author = wp_kses( $author, $plugins_allowedtags );
$action_links = array();
- $action_links[] = '
' . __( 'Details' ) . '';
if ( current_user_can( 'install_plugins' ) || current_user_can( 'update_plugins' ) ) {
$status = install_plugin_install_status( $plugin );
@@ -243,20 +253,36 @@
switch ( $status['status'] ) {
case 'install':
if ( $status['url'] )
- $action_links[] = '
' . __( 'Install Now' ) . '';
+ $action_links[] = '
' . __( 'Install Now' ) . '';
break;
case 'update_available':
if ( $status['url'] )
- $action_links[] = '
' . __( 'Update Now' ) . '';
+ $action_links[] = '
' . __( 'Update Now' ) . '';
break;
case 'latest_installed':
case 'newer_installed':
- $action_links[] = '
' . _x( 'Installed', 'plugin' ) . '';
+ $action_links[] = '
' . _x( 'Installed', 'plugin' ) . '';
break;
}
}
+ $details_link = self_admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $plugin['slug'] .
+ '&TB_iframe=true&width=600&height=550' );
+
/**
+ * Filter the details link for a plugin.
+ *
+ * @since 4.0
+ *
+ * @param array $details_link Link to view the current plugin's details.
+ * @param array $plugin The plugin currently being listed.
+ */
+ $details_link = apply_filters( 'plugin_install_details_link', $details_link, $plugin );
+
+ $action_links[] = '
' . __( 'More Details' ) . '';
+
+ /**
* Filter the install action links for a plugin.
*
* @since 2.7.0
@@ -266,16 +292,40 @@
*/
$action_links = apply_filters( 'plugin_install_action_links', $action_links, $plugin );
?>
-
- >
-
- |
- > |
- >
- $plugin['rating'], 'type' => 'percent', 'number' => $plugin['num_ratings'] ) ); ?>
- |
- > |
-
+
+
+
>
+
' . implode( '', $action_links ) . ''; ?>
+
+
>
+
+
+
+ 1 ) echo sprintf( __( '+ %d more' ), count( $plugin['contributors'] ) -1 ); ?>.
+
+
+
+
+
+
>
+ $plugin['rating'], 'type' => 'percent', 'number' => $plugin['num_ratings'] ) ); ?>
+ ()
+
+
Last updated:') . ' '. sprintf( '%s ago', human_time_diff( strtotime($plugin['last_updated']) ) ); ?>
+
+
+ ' ) )
+ echo __('Untested with your install');
+
+ else if ( ! empty( $plugin['requires'] ) && version_compare( substr( $GLOBALS['wp_version'], 0, strlen( $plugin['requires'] ) ), $plugin['requires'], '<' ) )
+ echo __('Incompatible with your install');
+ else
+ echo __('Compatible with your install');
+ ?>
+
+
+