Making WordPress.org


Ignore:
Timestamp:
11/21/2014 10:04:40 AM (10 years ago)
Author:
obenland
Message:

WP.org Themes: Bring theme installer goodies to the front-end.

This brings most of the Backbone and Themes API-based functionality
from the admin's theme install screen to the front-end.

There are of course still loads of things to do, but it works
decently enough to share it with the world and give an idea of where
this is headed.

See https://make.wordpress.org/meta/2014/11/20/theme-repository-theme/
See #745.

File:
1 edited

Legend:

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

    r887 r1001  
    1 <?php
    2 global $post;
    3 $theme = new Repo_Theme_Package($post);
    4 ?>
    5 <div <?php post_class('theme'); ?> id="post-<?php the_ID(); ?>">
     1<?php global $theme; ?>
     2<article class="theme">
    63    <div class="theme-screenshot">
    7         <img src="<?php echo $theme->screenshot_url(); ?>" alt="">
     4        <img src="<?php echo esc_url( $theme->screenshot_url ); ?>" alt="">
    85    </div>
    9     <a href="<?php the_permalink(); ?>"><span class="more-details">Theme Details</span></a>
    10     <div class="theme-author">By the TODO Author</div> 
    11     <h3 class="theme-name"><?php the_title(); ?></h3>   
    12 </div>
     6    <a href="/<?php echo $theme->slug; ?>" class="more-details"><?php _ex( 'More Info', 'theme' ); ?></a>
     7    <div class="theme-author"><?php printf( __( 'By %s' ), $theme->author ); ?></div>
     8    <h3 class="theme-name"><?php echo $theme->name; ?></h3>
     9
     10    <div class="theme-actions">
     11        <a class="button button-primary preview install-theme-preview" href="<?php echo esc_url( '//downloads.wordpress.org/theme/' . $theme->slug . '.' . $theme->version . '.zip' ); ?>"><?php esc_html_e( 'Download' ); ?></a>
     12    </div>
     13</article>
Note: See TracChangeset for help on using the changeset viewer.