WordPress.org

Making WordPress.org


Ignore:
Timestamp:
11/25/2014 08:49:42 PM (7 years ago)
Author:
obenland
Message:

WP.org Themes: Make theme previews work.

  • Consolidates data handling for index and single.
  • Makes Previews play nicely with Modals.
  • Streamlines some UI aspects between Previews and Modals.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/content-single.php

    r1001 r1006  
    1 <?php
    2 include_once ABSPATH . '/wp-admin/includes/theme.php';
    3 $theme = themes_api( 'theme_information', array( 'slug' => get_post()->post_name ) );
    4 ?>
     1<?php global $theme; ?>
    52
    63<div class="theme-backdrop"></div>
    74<div class="theme-wrap">
    85    <div class="theme-header">
     6        <button class="close dashicons dashicons-no"><span class="screen-reader-text"><?php _e( 'Close overlay' ); ?></span></button>
    97        <button class="left dashicons dashicons-no"><span class="screen-reader-text"><?php _e( 'Show previous theme' ); ?></span></button>
    108        <button class="right dashicons dashicons-no"><span class="screen-reader-text"><?php _e( 'Show next theme' ); ?></span></button>
    11         <button class="close dashicons dashicons-no"><span class="screen-reader-text"><?php _e( 'Close overlay' ); ?></span></button>
    129    </div>
    1310    <div class="theme-about">
     
    1613        </div>
    1714
    18         <div class="theme-info">
    19             <h3 class="theme-name"><?php the_title(); ?><span
    20                     class="theme-version"><?php printf( __( 'Version: %s' ), $theme->version ); ?></span>
    21             </h3>
    22             <h4 class="theme-author"><?php printf( __( 'By %s' ), $theme->author ); ?></h4>
     15        <div class="theme-info hentry">
     16            <h3 class="theme-name entry-title"><?php the_title(); ?></h3>
     17            <span class="theme-version"><?php printf( __( 'Version: %s' ), $theme->version ); ?></span>
     18            <h4 class="theme-author"><?php printf( __( 'By %s' ), '<span class="author">' . $theme->author . '</span>' ); ?></h4>
    2319
    24             <p class="theme-description"><?php the_content(); ?></p>
     20            <p class="theme-description entry-summary"><?php the_content(); ?></p>
    2521
    2622            <div class="rating rating-<?php echo round( $theme->rating, -1 ); ?>">
     
    3531
    3632            <div class="theme-stats">
    37                 <div><strong><?php _e( 'Last updated:' ); ?></strong> <?php echo $theme->last_updated; ?></div>
     33                <div><strong><?php _e( 'Last updated:' ); ?></strong> <span class="updated"><?php echo $theme->last_updated; ?></span></div>
    3834                <div><strong><?php _e( 'Downloads:' ); ?></strong> <?php echo $theme->downloaded; ?></div>
    3935                <div><a href="<?php echo esc_url( $theme->homepage ); ?>"><?php _e( 'Theme Homepage &raquo;' ); ?></a></div>
    4036            </div>
    4137
    42                 <p class="theme-tags">
    43                     <span><?php _e( 'Tags:' ); ?></span>
    44                     <?php echo implode( ', ', $theme->tags ); ?>
    45                 </p>
    46         </div>
     38            <p class="theme-tags">
     39                <span><?php _e( 'Tags:' ); ?></span>
     40                <?php echo implode( ', ', $theme->tags ); ?>
     41            </p>
     42        </div>å
    4743    </div>
    4844
Note: See TracChangeset for help on using the changeset viewer.