Index: wp-admin/css/list-tables.css
===================================================================
--- wp-admin/css/list-tables.css (revision 28755)
+++ wp-admin/css/list-tables.css (working copy)
@@ -1215,6 +1215,83 @@
margin: 2.5em 0 8px;
}
+/* Plugin card table view */
+.plugin-card {
+ float: left;
+ margin: 0 8px 16px;
+ width: 48.5%;
+ width: -webkit-calc( 50% - 8px );
+ width: calc( 50% - 8px );
+ background-color: #fff;
+ border: 1px solid #dedede;
+ box-sizing: border-box;
+}
+@media screen and ( max-width: 782px ) {
+ .plugin-card {
+ margin-left: 0;
+ margin-right: 0;
+ width: 100%;
+ }
+}
+.plugin-card:nth-child(odd) {
+ clear: both;
+ margin-left: 0;
+}
+.plugin-card:nth-child(even) {
+ margin-right: 0
+}
+.plugin-card-top {
+ padding: 20px 20px 10px;
+}
+div.action-links,
+.plugin-action-buttons {
+ margin: 0; /* Override existing margins */
+}
+.plugin-card h4 {
+ float: left;
+ margin: 0 0 12px;
+ font-size: 18px;
+}
+.plugin-card .desc {
+ clear: left;
+}
+.plugin-action-buttons {
+ float: right;
+ margin-left: 2em;
+ margin-bottom: 1em;
+ text-align: right;
+}
+.plugin-action-buttons li {
+ margin-bottom: 10px;
+}
+.plugin-card-bottom {
+ clear: both;
+ padding: 12px 20px;
+ background-color: #fafafa;
+ border-top: 1px solid #dedede;
+ overflow: hidden;
+}
+.plugin-card-bottom .star-rating {
+ display: inline;
+}
+.plugin-card .column-rating {
+ line-height: 23px;
+}
+.plugin-card .column-rating,
+.plugin-card .column-updated {
+ margin-bottom: 4px;
+}
+.plugin-card .column-rating,
+.plugin-card .column-downloaded {
+ float: left;
+ clear: left;
+}
+.plugin-card .column-updated,
+.plugin-card .column-compatibility {
+ float: right;
+ clear: right;
+}
+
/* ms */
/* Background Color for Site Status */
.wp-list-table .site-deleted {
Index: wp-admin/includes/class-wp-plugin-install-list-table.php
===================================================================
--- wp-admin/includes/class-wp-plugin-install-list-table.php (revision 28755)
+++ 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,17 +233,8 @@
$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 );
@@ -228,14 +241,11 @@
$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,19 +253,23 @@
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;
}
}
+ $action_links[] = '
' . __( 'More Details' ) . '';
+
/**
* Filter the install action links for a plugin.
*
@@ -266,16 +280,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');
+ ?>
+
+
+