Make WordPress Core


Ignore:
Timestamp:
07/18/2014 06:07:21 AM (11 years ago)
Author:
helen
Message:

Plugin install cards:

  • Move author attribution to its own line.
  • Use esc_url() where appropriate.
  • Better i18n.
  • min-height for cards for a more even appearance.
  • Show more cards on wide screens.
  • Tighten up spacing below the filter bar.

props ocean90, helen. see #28785.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-plugin-install-list-table.php

    r29218 r29219  
    307307                                '&TB_iframe=true&width=600&height=550' );
    308308
    309             $action_links[] = '<a href="' . esc_attr( $details_link ) . '" class="thickbox" aria-labelledby="' . $plugin['slug'] . '" data-title="' . esc_attr( $name ) . '">' . __( 'More Details' ) . '</a>';
     309            $action_links[] = '<a href="' . esc_url( $details_link ) . '" class="thickbox" aria-labelledby="' . $plugin['slug'] . '" data-title="' . esc_attr( $name ) . '">' . __( 'More Details' ) . '</a>';
    310310
    311311
     
    323323            <div class="plugin-card-top">
    324324                <div class="name column-name"<?php echo $style['name']; ?>>
    325                     <h4><a href="<?php echo esc_attr( $details_link ) ?>" class="thickbox"><?php echo $title; ?></a></h4>
     325                    <h4><a href="<?php echo esc_url( $details_link ) ?>" class="thickbox"><?php echo $title; ?></a></h4>
    326326                    <div class="action-links">
    327327                        <?php
     
    333333                </div>
    334334                <div class="desc column-description"<?php echo $style['description']; ?>>
    335                     <p><?php echo $description ?>
    336                     <span class="authors">
    337                         <?php echo $author; ?>
    338                     </span>
    339                     </p>
     335                    <p><?php echo $description ?></p>
     336                    <p class="authors"><?php echo $author; ?></p>
    340337                </div>
    341338            </div>
     
    345342                    <span class="num-ratings">(<?php echo number_format_i18n( $plugin['num_ratings'] ); ?>)</span>
    346343                </div>
    347                 <div class="column-updated"><?php echo __( '<strong>Last updated:</strong>' ) . ' '. sprintf( '%s ago', human_time_diff( strtotime($plugin['last_updated']) ) ); ?></div>
    348                 <div class="column-downloaded"><?php echo sprintf( __('%s downloads'), number_format_i18n( $plugin['downloaded'] ) ); ?></div>
     344                <div class="column-updated">
     345                    <strong><?php _e( 'Last Updated:' ); ?></strong> <span title="<?php echo esc_attr( $plugin['last_updated'] ); ?>">
     346                        <?php printf( __( '%s ago' ), human_time_diff( strtotime( $plugin['last_updated'] ) ) ); ?>
     347                    </span>
     348                </div>
     349                <div class="column-downloaded">
     350                    <?php echo sprintf( _n( '%s download', '%s downloads', $plugin['downloaded'] ), number_format_i18n( $plugin['downloaded'] ) ); ?>
     351                </div>
    349352                <div class="column-compatibility">
    350                 <?php
     353                    <?php
    351354                    if ( ! empty( $plugin['tested'] ) && version_compare( substr( $GLOBALS['wp_version'], 0, strlen( $plugin['tested'] ) ), $plugin['tested'], '>' ) ) {
    352355                        echo  __( '<strong>Untested</strong> with your install ');
     
    356359                        echo __( '<strong>Compatible</strong> with your install ');
    357360                    }
    358                 ?>
     361                    ?>
    359362                </div>
    360363            </div>
Note: See TracChangeset for help on using the changeset viewer.