- <tr>
- <td class="name column-name"<?php echo $style['name']; ?>><strong><?php echo $title; ?></strong>
- <div class="action-links"><?php if ( !empty( $action_links ) ) echo implode( ' | ', $action_links ); ?></div>
- </td>
- <td class="vers column-version"<?php echo $style['version']; ?>><?php echo $version; ?></td>
- <td class="vers column-rating"<?php echo $style['rating']; ?>>
- <?php wp_star_rating( array( 'rating' => $plugin['rating'], 'type' => 'percent', 'number' => $plugin['num_ratings'] ) ); ?>
- </td>
- <td class="desc column-description"<?php echo $style['description']; ?>><?php echo $description, $author; ?></td>
- </tr>
+ <div class="plugin-card plugin-card-<?php echo sanitize_html_class( $plugin['slug'] ); ?>">
+ <div class="plugin-card-top">
+ <div class="name column-name">
+ <h3>
+ <a href="<?php echo esc_url( $details_link ); ?>" class="thickbox open-plugin-details-modal">
+ <?php echo $title; ?>
+ <img src="<?php echo esc_attr( $plugin_icon_url ) ?>" class="plugin-icon" alt="">
+ </a>
+ </h3>
+ </div>
+ <div class="action-links">
+ <?php
+ if ( $action_links ) {
+ echo '<ul class="plugin-action-buttons"><li>' . implode( '</li><li>', $action_links ) . '</li></ul>';
+ }
+ ?>
+ </div>
+ <div class="desc column-description">
+ <p><?php echo $description; ?></p>
+ <p class="authors"><?php echo $author; ?></p>
+ </div>
+ </div>
+ <div class="plugin-card-bottom">
+ <div class="vers column-rating">
+ <?php wp_star_rating( array( 'rating' => $plugin['rating'], 'type' => 'percent', 'number' => $plugin['num_ratings'] ) ); ?>
+ <span class="num-ratings" aria-hidden="true">(<?php echo number_format_i18n( $plugin['num_ratings'] ); ?>)</span>
+ </div>
+ <div class="column-updated">
+ <strong><?php _e( 'Last Updated:' ); ?></strong> <?php printf( __( '%s ago' ), human_time_diff( $last_updated_timestamp ) ); ?>
+ </div>
+ <div class="column-downloaded">
+ <?php
+ if ( $plugin['active_installs'] >= 1000000 ) {
+ $active_installs_text = _x( '1+ Million', 'Active plugin installs' );
+ } else {
+ $active_installs_text = number_format_i18n( $plugin['active_installs'] ) . '+';
+ }
+ printf( __( '%s Active Installs' ), $active_installs_text );
+ ?>
+ </div>
+ <div class="column-compatibility">
+ <?php
+ if ( ! empty( $plugin['tested'] ) && version_compare( substr( $GLOBALS['wp_version'], 0, strlen( $plugin['tested'] ) ), $plugin['tested'], '>' ) ) {
+ echo '<span class="compatibility-untested">' . __( 'Untested with your version of WordPress' ) . '</span>';
+ } elseif ( ! empty( $plugin['requires'] ) && version_compare( substr( $GLOBALS['wp_version'], 0, strlen( $plugin['requires'] ) ), $plugin['requires'], '<' ) ) {
+ echo '<span class="compatibility-incompatible">' . __( '<strong>Incompatible</strong> with your version of WordPress' ) . '</span>';
+ } else {
+ echo '<span class="compatibility-compatible">' . __( '<strong>Compatible</strong> with your version of WordPress' ) . '</span>';
+ }
+ ?>
+ </div>
+ </div>
+ </div>