<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[1489] sites/trunk/wordpress.org/public_html/wp-content: Theme Directory: Morph the Theme directory theme into a API front-end rather than a WordPress Theme.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="http://meta.trac.wordpress.org/changeset/1489">1489</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"http://meta.trac.wordpress.org/changeset/1489","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>dd32</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2015-04-20 02:17:13 +0000 (Mon, 20 Apr 2015)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Theme Directory: Morph the Theme directory theme into a API front-end rather than a WordPress Theme.
This commit alters the directory to only rely upon the WordPress Query Vars, it doesn't actually use the WordPress posts query to get it's posts, rather it pulls it directly from the API.
This is part of the process of bringing the Theme Directory to rosetta/locallised sites, where the theme data won't live in the localised sites database.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentpluginsthemedirectorythemedirectoryphp">sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory/theme-directory.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgthemesfunctionsphp">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/functions.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgthemesheaderphp">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/header.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgthemesindexphp">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/index.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgthemesjsthemejs">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/js/theme.js</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgthemesjsthememinjs">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/js/theme.min.js</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgthemesstylecss">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/style.css</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgthemesviewtemplatesthemesinglephp">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/view-templates/theme-single.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgthemesviewtemplatesthemephp">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/view-templates/theme.php</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgthemesrssphp">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/rss.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgthemesthemesinglephp">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/theme-single.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgthemesthemephp">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/theme.php</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgthemescontentsinglephp">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/content-single.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgthemescontentphp">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/content.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentpluginsthemedirectorythemedirectoryphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory/theme-directory.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory/theme-directory.php 2015-04-18 16:45:18 UTC (rev 1488)
+++ sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory/theme-directory.php 2015-04-20 02:17:13 UTC (rev 1489)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -73,7 +73,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'description' => __( 'A package', 'wporg-themes' ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'supports' => array( 'title', 'editor', 'author', 'custom-fields', 'page-attributes' ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'taxonomies' => array( 'category', 'post_tag', 'type' ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'public' => true,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'public' => false,
</ins><span class="cx" style="display: block; padding: 0 10px"> 'show_in_nav_menus' => false,
</span><span class="cx" style="display: block; padding: 0 10px"> 'has_archive' => true,
</span><span class="cx" style="display: block; padding: 0 10px"> 'rewrite' => false,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -115,55 +115,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> add_action( 'init', 'wporg_themes_init' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Adjusts query to account for custom views.
- *
- * @param WP_Query $wp_query
- * @return WP_Query
- */
-function wporg_themes_set_up_query( $wp_query ) {
- if ( is_admin() || in_array( $wp_query->get( 'pagename' ), array( 'upload', 'commercial', 'getting-started' ) ) || in_array( $wp_query->get( 'post_type' ), array( 'nav_menu_item', 'theme_shop' ) ) ) {
- return $wp_query;
- }
-
- $wp_query->set( 'post_type', 'repopackage' );
-
- if ( $wp_query->is_home() && ! $wp_query->get( 'browse' ) ) {
- $wp_query->set( 'browse', 'featured' );
- }
-
- if ( $wp_query->get( 'browse' ) ) {
- switch ( $wp_query->get( 'browse' ) ) {
- case 'featured':
- $wp_query->set( 'paged', 1 );
- $wp_query->set( 'posts_per_page', 15 );
- $wp_query->set( 'post__in', (array) wp_cache_get( 'browse-featured', 'theme-info' ) );
- break;
-
- case 'popular':
- add_filter( 'posts_clauses', 'wporg_themes_popular_posts_clauses' );
- break;
-
- case 'new':
- // Nothing to do here.
- break;
-
- }
-
- // Only return themes that were updated in the last two years for all 'browse' requests.
- $wp_query->set( 'date_query', array(
- array(
- 'column' => 'post_modified_gmt',
- 'after' => '-2 years',
- ),
- ) );
-
- }
-
- return $wp_query;
-}
-add_filter( 'pre_get_posts', 'wporg_themes_set_up_query' );
-
-/**
</del><span class="cx" style="display: block; padding: 0 10px"> * Filter the permalink for the Packages to be /post_name/
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $link The generated permalink
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -180,41 +131,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> add_filter( 'post_type_link', 'wporg_themes_package_link', 10, 2 );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Adjusts the amount of found posts when browsing featured themes.
- *
- * @param string $found_posts
- * @param WP_Query $wp_query
- * @return string
- */
-function wporg_themes_found_posts( $found_posts, $wp_query ) {
- if ( $wp_query->is_main_query() && 'featured' === $wp_query->get( 'browse' ) ) {
- $found_posts = $wp_query->get( 'posts_per_page' );
- }
-
- return $found_posts;
-}
-add_filter( 'found_posts', 'wporg_themes_found_posts', 10, 2 );
-
-/**
- * Filters SQL clauses, to set up a query for the most popular themes based on downloads.
- *
- * @param array $clauses
- * @return array
- */
-function wporg_themes_popular_posts_clauses( $clauses ) {
- global $wpdb;
-
- $week = gmdate( 'Y-m-d', strtotime( 'last week' ) );
- $clauses['where'] .= " AND s.stamp >= '{$week}'";
- $clauses['groupby'] = "{$wpdb->posts}.ID";
- $clauses['join'] = "JOIN bb_themes_stats AS s ON ( {$wpdb->posts}.post_name = s.slug )";
- $clauses['orderby'] = 'week_downloads DESC';
- $clauses['fields'] .= ', SUM(s.downloads) AS week_downloads';
-
- return $clauses;
-}
-
-/**
</del><span class="cx" style="display: block; padding: 0 10px"> * Checks if ther current users is a super admin before allowing terms to be added.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $term The term to add or update.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -610,54 +526,70 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @return array
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function wporg_themes_prepare_themes_for_js() {
- global $wp_query;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function wporg_themes_get_themes_for_query() {
+ static $result = null;
+ if ( $result ) {
+ return $result;
+ }
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- include_once API_WPORGPATH . 'themes/info/1.0/class-themes-api.php';
- $api = new Themes_API( 'get_result' );
- $api->fields = array_merge( $api->fields, array(
- 'description' => true,
- 'sections' => false,
- 'tested' => true,
- 'requires' => true,
- 'rating' => true,
- 'ratings' => true,
- 'downloaded' => true,
- 'downloadlink' => true,
- 'last_updated' => true,
- 'homepage' => true,
- 'tags' => true,
- 'num_ratings' => true,
- 'parent' => true,
- 'theme_url' => true,
- 'extended_author' => true,
- 'photon_screenshots' => true,
- ) );
-
- $themes = array_map( array( $api, 'fill_theme' ), $wp_query->posts );
-
</del><span class="cx" style="display: block; padding: 0 10px"> $request = array();
</span><span class="cx" style="display: block; padding: 0 10px"> if ( get_query_var( 'browse' ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $request['browse'] = get_query_var( 'browse' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- } else if ( $wp_query->is_tag() ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ } else if ( get_query_var( 'tag' ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $request['tag'] = (array) explode( '+', get_query_var( 'tag' ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- }
- else if ( $wp_query->is_search() ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ } else if ( get_query_var( 's' ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $request['search'] = get_query_var( 's' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- }
- else if ( $wp_query->is_author() ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ } else if ( get_query_var( 'author' ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $request['author'] = get_user_by( 'id', get_query_var( 'author' ) )->user_nicename;
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ } else if ( get_query_var( 'name' ) || get_query_var( 'pagename' ) ) {
+ $request['theme'] = basename( get_query_var( 'name' ) ?: get_query_var( 'pagename' ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- else if ( $wp_query->is_singular( 'repopackage' ) ) {
- $request['theme'] = get_query_var( 'name' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ if ( get_query_var( 'paged' ) ) {
+ $request['page'] = (int)get_query_var( 'paged' );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- return array(
- 'themes' => $themes,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( empty( $request ) ) {
+ $request['browse'] = 'featured';
+ }
+
+ $request['fields'] = array(
+ 'description' => true,
+ 'sections' => false,
+ 'tested' => true,
+ 'requires' => true,
+ 'downloaded' => true,
+ 'downloadlink' => true,
+ 'last_updated' => true,
+ 'homepage' => true,
+ 'theme_url' => true,
+ 'parent' => true,
+ 'tags' => true,
+ 'rating' => true,
+ 'ratings' => true,
+ 'num_ratings' => true,
+ 'extended_author' => true,
+ 'photon_screenshots' => true,
+ );
+
+ $api_result = wporg_themes_query_api( 'query_themes', $request );
+
+ unset( $request['fields'] );
+
+ return $result = array(
+ 'themes' => $api_result->themes,
</ins><span class="cx" style="display: block; padding: 0 10px"> 'request' => $request,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'total' => (int) $wp_query->found_posts,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'total' => (int) $api_result->info['results'],
+ 'pages' => (int) $api_result->info['pages'],
</ins><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function wporg_themes_prepare_themes_for_js() {
+ return wporg_themes_get_themes_for_query();
+}
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Makes a query against api.wordpress.org/themes/info/1.0/ without making a HTTP call
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgthemescontentsinglephp"></a>
<div class="delfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Deleted: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/content-single.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/content-single.php 2015-04-18 16:45:18 UTC (rev 1488)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/content-single.php 2015-04-20 02:17:13 UTC (rev 1489)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,141 +0,0 @@
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-<?php
-$slug = get_post()->post_name;
-$theme = wporg_themes_query_api( 'theme_information', array( 'slug' => $slug, 'fields' => array( 'ratings' => true ) ) );
-?>
-<div class="theme-navigation">
- <a class="close" rel="home" href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php _e( 'Return to Themes List', 'wporg-themes' ); ?></a>
- <div class="navigation post-navigation">
- <button class="left dashicons dashicons-no disabled"><span class="screen-reader-text"><?php _e( 'Show previous theme', 'wporg-themes' ); ?></span></button>
- <button class="right dashicons dashicons-no disabled"><span class="screen-reader-text"><?php _e( 'Show next theme', 'wporg-themes' ); ?></span></button>
- </div>
-</div>
-<div class="theme-wrap">
- <div class="theme-about hentry" itemscope itemtype="http://schema.org/CreativeWork">
-
- <?php if ( strtotime( '-2 years' ) > get_post_modified_time() ) : ?>
- <div class="theme-notice notice notice-warning">
- <p><?php _e( 'This theme <strong>hasn’t been updated in over 2 years</strong>. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.', 'wporg-themes' ); ?></p>
- </div><!-- .theme-info -->
- <?php endif; ?>
-
- <div>
- <h3 class="theme-name entry-title" itemprop="name"><?php the_title(); ?></h3>
- <h4 class="theme-author">
- <?php printf( _x( 'By %s', 'theme author', 'wporg-themes' ), sprintf( '<a href="https://wordpress.org/themes/author/%s/"><span class="author" itemprop="author">%s</span></a>', get_the_author_meta( 'nicename' ), esc_html( get_the_author() ) ) ); ?>
- </h4>
- </div>
-
- <div class="theme-head">
- <div class="theme-actions clear">
- <a href="<?php echo esc_url( '//wp-themes.com/' . $slug ); ?>" class="button button-secondary alignleft"><?php _e( 'Preview', 'wporg-themes' ); ?></a>
- <a href="<?php echo esc_url( '//downloads.wordpress.org/theme/' . $slug . '.' . $theme->version . '.zip' ); ?>" class="button button-primary alignright"><?php _e( 'Download', 'wporg-themes' ); ?></a>
- </div>
-
- <?php
- if ( ! empty( get_post()->post_parent ) ) :
- $parent = get_post( get_post()->post_parent );
- ?>
- <div class="theme-notice notice notice-info">
- <p class="parent-theme"><?php printf( __( 'This is a child theme of %s.', 'wporg-themes' ), sprintf( '<a href="%1$s">%2$s</a>', get_permalink( $parent->ID ), $parent->post_title ) ); ?></p>
- </div>
- <?php endif; ?>
-
- <div class="theme-meta-info">
- <p class="updated"><?php printf( __( 'Last updated: %s', 'wporg-themes' ), '<strong>' . date_i18n( get_option( 'date_format' ), strtotime( $theme->last_updated ) ) . '</strong>' ); ?></p>
- <?php
- $theme_url = wporg_themes_get_version_meta( get_the_ID(), '_theme_url', $theme->version );
- if ( ! empty( $theme_url ) ) :
- ?>
- <a href="<?php echo esc_url( $theme_url ); ?>"><?php _e( 'Theme Homepage', 'wporg-themes' ); ?></a>
- <?php endif; ?>
- </div>
- </div><!-- .theme-head -->
-
- <div class="theme-info">
- <div class="screenshot"><?php the_post_thumbnail( '1142' ); ?></div>
-
- <div class="theme-description entry-summary" itemprop="description"><?php the_content(); ?></div>
-
- <div class="theme-tags">
- <?php the_tags( '<h4>' . __( 'Tags:', 'wporg-themes' ) . '</h4>' ); ?>
- </div><!-- .theme-tags -->
-
- <div class="theme-downloads">
- <h4><?php _e( 'Downloads', 'wporg-themes' ); ?></h4>
-
- <div id="theme-download-stats-<?php echo esc_attr( $slug ); ?>" class="chart"></div>
- <p class="total-downloads"><?php printf( __( 'Total downloads: %s', 'wporg-themes' ), '<strong>' . number_format_i18n( $theme->downloaded ) . '</strong>' ); ?></p>
- </div><!-- .theme-downloads -->
- </div><!-- .theme-info -->
-
- <div class="theme-meta">
- <div class="theme-ratings" itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
- <meta itemprop="ratingCount" content="<?php echo esc_attr( $theme->num_ratings ); ?>"/>
- <h4><?php _e( 'Ratings', 'wporg-themes' ); ?></h4>
-
- <?php if ( ! empty( $theme->ratings ) ) : ?>
- <div class="rating rating-<?php echo esc_attr( round( $theme->rating / 10, 0) * 10 ); ?>">
- <span class="one"></span>
- <span class="two"></span>
- <span class="three"></span>
- <span class="four"></span>
- <span class="five"></span>
- <p class="description"><?php printf( __( '%s out of 5 stars.', 'wporg-themes' ), '<span itemprop="ratingValue">' . number_format_i18n( round($theme->rating / 20 / 0.5)*0.5, 1 ) . '</span>' ); ?></p>
- </div>
- <?php else : ?>
- <div class="rating">
- <div class="ratings"><?php _e( 'This theme has not been rated yet.', 'wporg-themes' ); ?></div>
- </div>
- <?php endif; ?>
-
- <?php if ( ! empty( $theme->ratings ) && ! empty( $theme->num_ratings ) ) : ?>
- <ul>
- <?php
- foreach ( $theme->ratings as $key => $rate_count ) :
- // Hack to have descending key/value pairs.
- $key = 6 - $key;
- ?>
- <li class="counter-container">
- <a href="//wordpress.org/support/view/theme-reviews/<?php echo esc_attr( $slug ); ?>?filter=<?php echo $key; ?>" title="<?php echo esc_attr( sprintf( _n( 'Click to see reviews that provided a rating of %d star', 'Click to see reviews that provided a rating of %d stars', $key, 'wporg-themes' ), $key ) ); ?>">
- <span class="counter-label"><?php printf( _n( '%d star', '%d stars', $key, 'wporg-themes' ), $key ); ?></span>
- <span class="counter-back">
- <span class="counter-bar" style="width: <?php echo 100 * ( $theme->ratings[ $key ] / $theme->num_ratings ); ?>%;"></span>
- </span>
- <span class="counter-count"><?php echo $theme->ratings[ $key ]; ?></span>
- </a>
- </li>
- <?php endforeach; ?>
- </ul>
- <?php endif; ?>
-
- <a class="button button-secondary" href="https://wordpress.org/support/view/theme-reviews/<?php echo esc_attr( $slug ); ?>#postform"><?php _e( 'Add your review', 'wporg-themes' ); ?></a>
- </div><!-- .theme-rating -->
-
- <div class="theme-support">
- <h4><?php _e( 'Support', 'wporg-themes' ); ?></h4>
- <p><?php _e( 'Got something to say? Need help?', 'wporg-themes' ); ?></p>
- <a href="//wordpress.org/support/theme/<?php echo esc_attr( $slug ); ?>" class="button button-secondary"><?php _e( 'View support forum', 'wporg-themes' ); ?></a>
- </div><!-- .theme-support -->
-
- <div class="theme-devs">
- <h4><?php _e( 'Development', 'wporg-themes' ); ?></h4>
- <h5><?php _e( 'Subscribe', 'wporg-themes' ); ?></h5>
- <ul class="unmarked-list">
- <li>
- <a href="//themes.trac.wordpress.org/log/<?php echo esc_attr( $slug ); ?>?limit=100&mode=stop_on_copy&format=rss">
- <img src="//s.w.org/style/images/feedicon.png" />
- <?php _e( 'Development Log', 'wporg-themes' ); ?>
- </a>
- </li>
- </ul>
-
- <h5><?php _e( 'Browse the Code', 'wporg-themes' ); ?></h5>
- <ul class="unmarked-list">
- <li><a href="//themes.trac.wordpress.org/log/<?php echo esc_attr( $slug ); ?>/" rel="nofollow"><?php _e( 'Development Log', 'wporg-themes' ); ?></a></li>
- <li><a href="//themes.svn.wordpress.org/<?php echo esc_attr( $slug ); ?>/" rel="nofollow"><?php _e( 'Subversion Repository', 'wporg-themes' ); ?></a></li>
- <li><a href="//themes.trac.wordpress.org/browser/<?php echo esc_attr( $slug ); ?>/" rel="nofollow"><?php _e( 'Browse in Trac', 'wporg-themes' ); ?></a></li>
- </ul>
- </div><!-- .theme-devs -->
- </div><!-- .theme-meta -->
- </div>
-</div>
</del></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgthemescontentphp"></a>
<div class="delfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Deleted: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/content.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/content.php 2015-04-18 16:45:18 UTC (rev 1488)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/content.php 2015-04-20 02:17:13 UTC (rev 1489)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,19 +0,0 @@
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-<?php
-$post = get_post();
-$theme = new WPORG_Themes_Repo_Package( $post );
-?>
-<article id="post-<?php echo $post->post_name; ?>" class="theme hentry">
- <a class="url" href="<?php the_permalink(); ?>" rel="bookmark">
- <div class="theme-screenshot">
- <?php the_post_thumbnail( '572' ); ?>
- </div>
- <span class="more-details"><?php _ex( 'More Info', 'theme' ); ?></span>
- <div class="theme-author">
- <?php printf( _x( 'By %s', 'theme author', 'wporg-themes' ), '<span class="author vcard">' . esc_html( get_the_author() ) . '</span>' ); ?>
- </div>
- <h3 class="theme-name entry-title"><?php the_title(); ?></h3>
- </a>
- <div class="theme-actions">
- <a class="button button-primary preview install-theme-preview" href="<?php echo esc_url( '//downloads.wordpress.org/theme/' . $post->post_name . '.' . $theme->latest_version() . '.zip' ); ?>"><?php _e( 'Download', 'wporg-themes' ); ?></a>
- </div>
-</article>
</del></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgthemesfunctionsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/functions.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/functions.php 2015-04-18 16:45:18 UTC (rev 1488)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/functions.php 2015-04-20 02:17:13 UTC (rev 1489)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -18,13 +18,13 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> load_theme_textdomain( 'wporg-themes' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- add_theme_support( 'automatic-feed-links' );
-
</del><span class="cx" style="display: block; padding: 0 10px"> add_theme_support( 'html5', array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption'
</span><span class="cx" style="display: block; padding: 0 10px"> ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- add_filter('redirect_canonical','__return_false');
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // No need for canonical lookups
+ remove_action( 'template_redirect', 'redirect_canonical' );
+ remove_action( 'template_redirect', 'wp_old_slug_redirect' );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> add_action( 'after_setup_theme', 'wporg_themes_setup' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -44,15 +44,15 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! is_singular( 'page' ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> wp_enqueue_script( 'google-jsapi', '//www.google.com/jsapi', array( 'jquery' ), null, true );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wp_enqueue_script( 'wporg-theme', get_template_directory_uri() . "/js/theme{$suffix}.js", array( 'wp-backbone' ), '1', true );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_enqueue_script( 'wporg-theme', get_template_directory_uri() . "/js/theme{$suffix}.js", array( 'wp-backbone' ), '2', true );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> wp_localize_script( 'wporg-theme', '_wpThemeSettings', array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'themes' => false,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'query' => wporg_themes_prepare_themes_for_js(),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'query' => wporg_themes_get_themes_for_query(),
</ins><span class="cx" style="display: block; padding: 0 10px"> 'settings' => array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'title' => __( 'WordPress › %s « Free WordPress Themes', 'wporg-themes' ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'isMobile' => wp_is_mobile(),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'postsPerPage' => get_option( 'posts_per_page', 15 ),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'postsPerPage' => 24,
</ins><span class="cx" style="display: block; padding: 0 10px"> 'path' => trailingslashit( parse_url( home_url(), PHP_URL_PATH ) ),
</span><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'l10n' => array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -73,6 +73,10 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // No Jetpack styles needed.
</span><span class="cx" style="display: block; padding: 0 10px"> add_filter( 'jetpack_implode_frontend_css', '__return_false' );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ // No dashicons needed.
+ wp_deregister_style( 'dashicons' );
+ wp_register_style( 'dashicons', '' );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> add_action( 'wp_enqueue_scripts', 'wporg_themes_scripts' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -87,7 +91,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return array The filtered body class list.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wporg_themes_body_class( $classes ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( is_singular( 'repopackage' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ if ( ! is_page() && get_query_var( 'name' ) && ! is_404() ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $classes[] = 'modal-open';
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -100,40 +105,45 @@
</span><span class="cx" style="display: block; padding: 0 10px"> add_filter( 'body_class', 'wporg_themes_body_class' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Create a nicely formatted and more specific title element text for output
- * in head of document, based on current view.
- *
- * @global int $paged WordPress archive pagination page count.
- * @global int $page WordPress paginated post page count.
- *
- * @param string $title Default title text for current view.
- * @param string $sep Optional separator.
- * @return string The filtered title.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Prevent the default posts queries running, allowing pages to bypass
+ * We do this as the themes are pulled from an API.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function wporg_themes_wp_title( $title, $sep ) {
- global $paged, $page;
-
- if ( is_feed() ) {
- return $title;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function wporg_themes_prevent_posts_query( $query, $wp_query ) {
+ if ( is_admin() || ! $wp_query->is_main_query() || $wp_query->get( 'pagename' ) ) {
+ return $query;
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $wp_query->set( 'no_found_rows', true );
+ return ''; // Don't make a query
+}
+add_filter( 'posts_request', 'wporg_themes_prevent_posts_query', 10, 2 );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Add the site name.
- $title .= get_bloginfo( 'name', 'display' );
-
- // Add the site description for the home/front page.
- $site_description = get_bloginfo( 'description', 'display' );
- if ( $site_description && ( is_home() || is_front_page() ) ) {
- $title = "$title $sep $site_description";
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/**
+ * Prevent 404 responses when we've got a theme via the API.
+ */
+function wporg_themes_prevent_404() {
+ global $wp_query;
+ if ( ! is_404() ) {
+ return;
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $themes = wporg_themes_get_themes_for_query();
+ if ( $themes['total'] ) {
+ $wp_query->is_404 = false;
+ status_header( 200 );
+ }
+}
+add_filter( 'template_redirect', 'wporg_themes_prevent_404' );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Add a page number if necessary.
- if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) {
- $title = "$title $sep " . sprintf( __( 'Page %s', 'wporg-themes' ), max( $paged, $page ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/**
+ * Overrides feeds to use a custom RSS2 feed which contains the current requests themes.
+ */
+function wporg_themes_custom_feed() {
+ if ( ! is_feed() ) {
+ return;
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
- return $title;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ include __DIR__ . '/rss.php';
+ die();
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-add_filter( 'wp_title', 'wporg_themes_wp_title', 10, 2 );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+add_filter( 'template_redirect', 'wporg_themes_custom_feed' );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Include view templates in the footer.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -144,15 +154,3 @@
</span><span class="cx" style="display: block; padding: 0 10px"> get_template_part( 'view-templates/theme-single' );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> add_action( 'wp_footer', 'wporg_themes_view_templates' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-add_action('wp_enqueue_scripts','wporg_themes_disable_dashicons');
-function wporg_themes_disable_dashicons() {
- // Remove it only if the global header is used. (not e.g. chat.wordpress.org)
- if ( ! function_exists( 'global_wp_menu' ) ) {
- return;
- }
-
- // remove it, then reregister it as empty to maintain the dependencies but not load it a second time
- wp_deregister_style('dashicons');
- wp_register_style('dashicons','');
-}
</del></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgthemesheaderphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/header.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/header.php 2015-04-18 16:45:18 UTC (rev 1488)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/header.php 2015-04-20 02:17:13 UTC (rev 1489)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -12,7 +12,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> <div id="headline">
</span><span class="cx" style="display: block; padding: 0 10px"> <div class="wrapper">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <h2 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php _e( 'Theme Directory', 'wporg-themes' ) ?></a></h2>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <h2 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php _e( 'Theme Directory', 'wporg-themes' ); ?></a></h2>
</ins><span class="cx" style="display: block; padding: 0 10px"> </div>
</span><span class="cx" style="display: block; padding: 0 10px"> </div>
</span><span class="cx" style="display: block; padding: 0 10px"> <nav id="site-navigation" class="main-navigation" role="navigation">
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgthemesindexphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/index.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/index.php 2015-04-18 16:45:18 UTC (rev 1488)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/index.php 2015-04-20 02:17:13 UTC (rev 1489)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -11,22 +11,23 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @package wporg-themes
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+$themes = wporg_themes_get_themes_for_query();
+
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( ! function_exists( 'get_theme_feature_list' ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> include ABSPATH . 'wp-admin/includes/theme.php';
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> get_header();
</span><span class="cx" style="display: block; padding: 0 10px"> ?>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><span class="cx" style="display: block; padding: 0 10px"> <div id="themes" class="wrap">
</span><span class="cx" style="display: block; padding: 0 10px"> <div class="wp-filter">
</span><span class="cx" style="display: block; padding: 0 10px"> <div class="filter-count">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <span class="count theme-count"><?php echo $GLOBALS['wp_query']->found_posts; ?></span>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <span class="count theme-count"><?php echo number_format_i18n( $themes['total'] ); ?></span>
</ins><span class="cx" style="display: block; padding: 0 10px"> </div>
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> <ul class="filter-links">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <li><a href="<?php echo esc_url( home_url( 'browse/featured/' ) ); ?>" data-sort="featured"><?php _ex( 'Featured', 'themes', 'wporg-themes' ); ?></a></li>
- <li><a href="<?php echo esc_url( home_url( 'browse/popular/' ) ); ?>" data-sort="popular"><?php _ex( 'Popular', 'themes', 'wporg-themes' ); ?></a></li>
- <li><a href="<?php echo esc_url( home_url( 'browse/new/' ) ); ?>" data-sort="new"><?php _ex( 'Latest', 'themes', 'wporg-themes' ); ?></a></li>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <li><a href="<?php echo esc_url( home_url( 'browse/featured/' ) ); ?>" data-sort="featured" <?php if ( (is_front_page() && !get_query_var('browse') ) || 'featured' == get_query_var('browse') ) { echo 'class="current"'; } ?>><?php _ex( 'Featured', 'themes', 'wporg-themes' ); ?></a></li>
+ <li><a href="<?php echo esc_url( home_url( 'browse/popular/' ) ); ?>" data-sort="popular" <?php if ( 'popular' == get_query_var('browse') ) { echo 'class="current"'; } ?>><?php _ex( 'Popular', 'themes', 'wporg-themes' ); ?></a></li>
+ <li><a href="<?php echo esc_url( home_url( 'browse/new/' ) ); ?>" data-sort="new" <?php if ( 'new' == get_query_var('browse') ) { echo 'class="current"'; } ?>><?php _ex( 'Latest', 'themes', 'wporg-themes' ); ?></a></li>
</ins><span class="cx" style="display: block; padding: 0 10px"> </ul>
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> <a class="drawer-toggle" href="#"><?php _e( 'Feature Filter', 'wporg-themes' ); ?></a>
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -45,7 +46,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <a href="#"><?php _e( 'Edit', 'wporg-themes' ); ?></a>
</span><span class="cx" style="display: block; padding: 0 10px"> </div>
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <?php foreach( get_theme_feature_list() as $feature_name => $features ) : ?>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <?php foreach ( get_theme_feature_list() as $feature_name => $features ) : ?>
</ins><span class="cx" style="display: block; padding: 0 10px"> <div class="filter-group">
</span><span class="cx" style="display: block; padding: 0 10px"> <h4><?php echo esc_html( $feature_name ); ?></h4>
</span><span class="cx" style="display: block; padding: 0 10px"> <ol class="feature-group">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -61,20 +62,30 @@
</span><span class="cx" style="display: block; padding: 0 10px"> </div>
</span><span class="cx" style="display: block; padding: 0 10px"> </div><!-- .wp-filter -->
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <div class="theme-browser content-filterable">
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <div class="theme-browser content-filterable <?php if ( ! $themes['themes'] ) { echo 'no-results'; } ?>">
</ins><span class="cx" style="display: block; padding: 0 10px"> <div class="themes">
</span><span class="cx" style="display: block; padding: 0 10px"> <?php
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- while ( have_posts() ) :
- the_post();
- get_template_part( 'content', is_single() ? 'single' : 'index' );
- endwhile;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( get_query_var('name') && !is_404() ) {
+ $theme = reset( $themes['themes'] );
+ include __DIR__ . '/theme-single.php';
+ } else {
+ foreach ( $themes['themes'] as $theme ) {
+ include __DIR__ . '/theme.php';
+ }
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- the_posts_navigation( array(
- 'prev_text' => __( 'Next', 'wporg-themes' ),
- 'next_text' => __( 'Previous', 'wporg-themes' ),
- ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // Add the navigation between pages
+ if ( $themes['pages'] > 1 ) {
+ echo '<nav class="posts-navigation">';
+ echo paginate_links( array(
+ 'total' => $themes['pages'],
+ 'mid_size' => 3,
+ ) );
+ echo '</nav>';
+ }
+ }
</ins><span class="cx" style="display: block; padding: 0 10px"> ?>
</span><span class="cx" style="display: block; padding: 0 10px"> </div>
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> <p class="no-themes"><?php _e( 'No themes found. Try a different search.', 'wporg-themes' ); ?></p>
</span><span class="cx" style="display: block; padding: 0 10px"> </div>
</span><span class="cx" style="display: block; padding: 0 10px"> <div class="theme-install-overlay"></div>
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgthemesjsthemejs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/js/theme.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/js/theme.js 2015-04-18 16:45:18 UTC (rev 1488)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/js/theme.js 2015-04-20 02:17:13 UTC (rev 1489)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -17,7 +17,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> themes.utils = {
</span><span class="cx" style="display: block; padding: 0 10px"> title: function ( item ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- document.title = $( '<div/>' ).html( themes.data.settings.title.replace( '%s', item ) ).text();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ document.title = $( '<div/>' ).html( themes.data.settings.title.replace( '%s', $( '<div/>' ).text(item).html() ) ).text();
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> };
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -215,7 +215,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> var collection = this;
</span><span class="cx" style="display: block; padding: 0 10px"> instance = instance || 0;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Themes per instance are set at 15
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // Themes per instance are set at 24
</ins><span class="cx" style="display: block; padding: 0 10px"> collection = _( collection.rest( themes.data.settings.postsPerPage * instance ) );
</span><span class="cx" style="display: block; padding: 0 10px"> collection = _( collection.first( themes.data.settings.postsPerPage ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -336,7 +336,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> tested: true,
</span><span class="cx" style="display: block; padding: 0 10px"> requires: true,
</span><span class="cx" style="display: block; padding: 0 10px"> downloaded: true,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- downloadLink: true,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ downloadlink: true,
</ins><span class="cx" style="display: block; padding: 0 10px"> last_updated: true,
</span><span class="cx" style="display: block; padding: 0 10px"> homepage: true,
</span><span class="cx" style="display: block; padding: 0 10px"> theme_url: true,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -398,6 +398,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> var data = this.model.toJSON();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> data.permalink = themes.data.settings.path + themes.router.baseUrl( data.slug );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ data.path = themes.data.settings.path;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Render themes using the html template
</span><span class="cx" style="display: block; padding: 0 10px"> this.$el.html( this.html( data ) ).attr({
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -490,10 +491,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> data.is_outdated = updated.setYear(updated.getYear() + 1902).valueOf() < new Date().valueOf();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Make tags click-able and separated by a comma.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- data.tags = _.map( data.tags, function( tag ) {
- return '<a href="' + themes.data.settings.path + themes.router.baseUrl( 'tags/' + tag.toLowerCase().replace( ' ', '-' ) ) + '">' + tag + '</a>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ data.tags = _.map( data.tags, function( tag, slug ) {
+ return '<a href="' + themes.data.settings.path + themes.router.baseUrl( 'tags/' + slug ) + '">' + tag + '</a>';
</ins><span class="cx" style="display: block; padding: 0 10px"> }).join( ', ' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ data.path = themes.data.settings.path;
+
</ins><span class="cx" style="display: block; padding: 0 10px"> this.$el.html( this.html( data ) );
</span><span class="cx" style="display: block; padding: 0 10px"> // Set up navigation events
</span><span class="cx" style="display: block; padding: 0 10px"> this.navigation();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1473,12 +1476,12 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> themes.Router = Backbone.Router.extend({
</span><span class="cx" style="display: block; padding: 0 10px"> routes: {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'browse/:sort/' : 'sort',
- 'tags/:tag/' : 'tag',
- 'search/:query/' : 'search',
- 'author/:author/': 'author',
- ':slug/' : 'preview',
- '' : 'sort'
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'browse/:sort(/)' : 'sort',
+ 'tags/:tag(/)' : 'tag',
+ 'search/:query(/)' : 'search',
+ 'author/:author(/)': 'author',
+ ':slug(/)' : 'preview',
+ '' : 'sort'
</ins><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> baseUrl: function( url ) {
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgthemesjsthememinjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/js/theme.min.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/js/theme.min.js 2015-04-18 16:45:18 UTC (rev 1488)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/js/theme.min.js 2015-04-20 02:17:13 UTC (rev 1489)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1 +1 @@
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-window.wp=window.wp||{},function(e){var t,i=wp.themes=wp.themes||{};i.data=_wpThemeSettings,t=i.data.l10n,_.extend(i,{model:{},view:{},routes:{},router:{},template:wp.template}),i.utils={title:function(t){document.title=e("<div/>").html(i.data.settings.title.replace("%s",t)).text()}},i.Model=Backbone.Model.extend({initialize:function(){var e;this.set({id:this.get("slug")||this.get("id")}),this.has("sections")&&(e=this.get("sections").description,this.set({description:e}))}}),i.view.Appearance=wp.Backbone.View.extend({el:"#themes .theme-browser",window:e(window),page:0,initialize:function(e){_.bindAll(this,"scroller"),this.SearchView=e.SearchView?e.SearchView:i.view.Search,this.window.bind("scroll",_.throttle(this.scroller,300))},render:function(){this.view=new i.view.Themes({collection
:this.collection,parent:this}),this.search(),this.view.render(),this.$el.find(".themes").remove(),this.$el.append(this.view.el).addClass("rendered")},searchContainer:"",search:function(){var i,s=this;i=new this.SearchView({collection:s.collection,parent:this}),i.render(),this.searchContainer.append(e.parseHTML('<label class="screen-reader-text" for="wp-filter-search-input">'+t.search+"</label>")).append(i.el)},scroller:function(){var e,t,i=this;e=this.window.scrollTop()+i.window.height(),t=i.$el.offset().top+i.$el.outerHeight(!1)-i.window.height(),t=Math.round(.9*t),e>t&&this.trigger("theme:scroll")}}),i.Collection=Backbone.Collection.extend({model:i.Model,terms:"",queries:[],currentQuery:{page:1,request:{}},count:!1,loadingThemes:!1,doSearch:function(e){this.terms!==e&&(this.terms=e,this.terms.length>0&&this.search(this.terms),""===this.terms&&
this.reset(i.data.themes),this.trigger("update"))},search:function(t){var s,r,o,n,a,l;this.reset(i.data.themes,{silent:!0}),t=t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),t=t.replace(/ /g,")(?=.*"),s=new RegExp("^(?=.*"+t+").+","i"),r=this.filter(function(e){return n=e.get("name").replace(/(<([^>]+)>)/gi,""),a=e.get("description").replace(/(<([^>]+)>)/gi,""),l=e.get("author").replace(/(<([^>]+)>)/gi,""),o=_.union(n,e.get("id"),a,l,e.get("tags")),s.test(e.get("author"))&&t.length>2&&e.set("displayAuthor",!0),s.test(o)}),0===r.length?this.trigger("query:empty"):e("body").removeClass("no-results"),this.reset(r)},paginate:function(e){var t=this;return e=e||0,t=_(t.rest(i.data.settings.postsPerPage*e)),t=_(t.first(i.data.settings.postsPerPage))},query:fu
nction(t){var i,s,r,o=this.queries,n=this;if(this.currentQuery.request=t,i=_.find(o,function(e){return _.isEqual(e.request,t)}),s=_.has(t,"page"),s||(this.currentQuery.page=1),i||s){if(s)return this.apiCall(t,s).done(function(e){n.add(e.themes),n.trigger("query:success",e.info.results),n.loadingThemes=!1}).fail(function(){n.trigger("query:fail")});0===i.themes.length?n.trigger("query:empty"):e("body").removeClass("no-results"),_.isNumber(i.total)&&(this.count=i.total),this.reset(i.themes),i.total||(this.count=this.length),this.trigger("update"),this.trigger("query:success",this.count)}else i=this.apiCall(t).done(function(e){e.themes&&(n.reset(e.themes),r=e.info.results,o.push({themes:e.themes,request:t,total:r})),n.trigger("update"),n.trigger("query:success",r),e.themes&&0===e.themes.length&&n.trigger("query:empty")}).fail(function(){n.trigger
("query:fail")})},apiCall:function(t,s){var r={type:"POST",url:"https://api.wordpress.org/themes/info/1.1/",jsonp:"callback",dataType:"jsonp",data:{action:"query_themes",request:_.extend({per_page:i.data.settings.postsPerPage,fields:{description:!0,sections:!1,tested:!0,requires:!0,downloaded:!0,downloadLink:!0,last_updated:!0,homepage:!0,theme_url:!0,parent:!0,tags:!0,rating:!0,ratings:!0,num_ratings:!0,extended_author:!0,photon_screenshots:!0}},t)},beforeSend:function(){s||e("body").addClass("loading-content").removeClass("no-results")}};return e.Deferred(function(t){e.ajax(r).done(function(e){t.resolveWith(this,[e])}).fail(function(){t.rejectWith(this,arguments)})}).promise()}}),i.view.Theme=wp.Backbone.View.extend({className:"theme",state:"grid",html:wp.themes.template("theme"),events:{click:"expand",keydown:"expand",touchend:"expand&qu
ot;,keyup:"addFocus",touchmove:"preventExpand"},touchDrag:!1,render:function(){var e=this.model.toJSON();e.permalink=i.data.settings.path+i.router.baseUrl(e.slug),this.$el.html(this.html(e)).attr({tabindex:0,"aria-describedby":e.id+"-action "+e.id+"-name"})},addFocus:function(){var t=e(":focus").hasClass("theme")?e(":focus"):e(":focus").parents(".theme");e(".theme.focus").removeClass("focus"),t.addClass("focus")},expand:function(t){var s=this;return t=t||window.event,!0===t.metaKey&&"click"===t.type||"keydown"===t.type&&13!==t.which&&32!==t.which?void 0:this.touchDrag===!0?this.touchDrag=!1:void(e(t.target).is(".theme-actions a")||(i.focusedTheme=this.$el,this.trigger("theme:expand",s.model.cid),t.preventDefault()))},preventExpand:function(){this.touchDrag=!0}}),i.view.Details=wp.Backbone.Vie
w.extend({className:"theme-overlay",events:{click:"collapse","click .left":"previousTheme","click .right":"nextTheme","click .theme-actions .button-secondary":"preview","keydown .theme-actions .button-secondary":"preview","touchend .theme-actions .button-secondary":"preview"},html:i.template("theme-single"),render:function(){var e=this.model.toJSON(),t=new Date;t.setUTCFullYear(e.last_updated.substring(0,4),e.last_updated.substring(5,7)-1,e.last_updated.substring(8,10)),e.last_updated=t.toLocaleDateString(!1,{day:"numeric",month:"long",year:"numeric"}),e.is_outdated=t.setYear(t.getYear()+1902).valueOf()<(new Date).valueOf(),e.tags=_.map(e.tags,function(e){return'<a href="'+i.data.settings.path+i.router.baseUrl("tags/"+e.toLowerCase().replace(" ","-"))+'">'+e+"</a>&qu
ot;}).join(", "),this.$el.html(this.html(e)),this.navigation(),this.screenshotCheck(this.$el),this.containFocus(this.$el),this.renderDownloadsGraph()},preview:function(t){var s,r,o=this;return this.touchDrag===!0?this.touchDrag=!1:void(e(t.target).hasClass("button-primary")||("keydown"!==t.type||13===t.which||32===t.which)&&("keydown"===t.type&&13!==t.which&&e(":focus").hasClass("button")||(t=t||window.event,t.preventDefault(),i.focusedTheme=this.$el,r=new i.view.Preview({model:this.model}),r.render(),this.setNavButtonsState(),r.$el.addClass(i.data.settings.isMobile?"wp-full-overlay collapsed":"wp-full-overlay expanded"),e(".theme-install-overlay").append(r.el),this.listenTo(r,"theme:next",function(){return this.trigger("theme:next"),s=o.model,_.isUndefined(o.current)||(s=o.current),o.current=o.model.collection.at(o.model.collection.indexOf(s)+1),_.is
Undefined(o.current)?(o.options.parent.parent.trigger("theme:end"),o.current=s):(r.model=o.current,r.render(),this.setNavButtonsState(),void e(".next-theme").focus())}).listenTo(r,"theme:previous",function(){this.trigger("theme:previous"),s=o.model,0!==o.model.collection.indexOf(o.current)&&(_.isUndefined(o.current)||(s=o.current),o.current=o.model.collection.at(o.model.collection.indexOf(s)-1),_.isUndefined(o.current)||(r.model=o.current,r.render(),this.setNavButtonsState(),e(".previous-theme").focus()))}),this.listenTo(r,"preview:close",function(){o.current=o.model}))))},setNavButtonsState:function(){var t=e(".theme-install-overlay"),i=_.isUndefined(this.current)?this.model:this.current;0===this.model.collection.indexOf(i)&&t.find(".previous-theme").addClass("disabled"),_.isUndefined(this.model.collection.at(this.model.collection.indexOf(i)+1))&&t.find(".next-them
e").addClass("disabled")},containFocus:function(t){var i,s=window.event;("undefined"==typeof s||1===e(s.target).closest(".theme").length)&&_.delay(function(){e(".theme-wrap a.button-primary:visible").focus()},500),t.on("keydown.wp-themes",function(s){9===s.which&&(i=e(s.target),i.is("button.close")&&s.shiftKey?(t.find(".theme-tags a:last-child").focus(),s.preventDefault()):i.is(".theme-tags a:last-child")&&(t.find("button.close").focus(),s.preventDefault()))})},collapse:function(t){var s,r,o,n,a,l=this,c={};1!==i.data.themes.length&&(t=t||window.event,(e(t.target).is(".close")||27===t.keyCode)&&(e("body").addClass("closing-overlay"),this.$el.fadeOut(1,function(){e("body").removeClass("closing-overlay"),l.closeOverlay(),s=document.body.scrollTop,(r=i.Collection.prototype.currentQuery.request.au
thor)?(i.router.navigate(i.router.baseUrl("author/"+r)),i.utils.title(r)):(o=i.Collection.prototype.currentQuery.request.search)?(i.router.navigate(i.router.baseUrl(i.router.searchPath+o)),i.utils.title(o)):(n=i.view.Installer.prototype.filtersChecked())?(i.router.navigate(i.router.baseUrl("tags/"+n.join("+"))),i.utils.title(_.each(n,function(t,i){n[i]=e('label[for="filter-id-'+t+'"]').text()}).join(", "))):(a=e(".filter-links .current"))&&(a.length||(a=e('.filter-links [data-sort="featured"]'),c={trigger:!0}),i.router.navigate(i.router.baseUrl(i.router.browsePath+a.data("sort")),c),i.utils.title(a.text())),document.body.scrollTop=s,i.focusedTheme&&i.focusedTheme.focus()})))},renderDownloadsGraph:function(){var t=this;e.getJSON("https://api.wordpress.org/stats/themes/1.0/downloads.php?slug="+t.model.get("id")+"&limit=260&callback=?",function(i){var s=
new google.visualization.DataTable,r=0;s.addColumn("string",_wpThemeSettings.l10n.date),s.addColumn("number",_wpThemeSettings.l10n.downloads),e.each(i,function(e,t){s.addRow(),s.setValue(r,0,new Date(e).toLocaleDateString()),s.setValue(r,1,Number(t)),r++}),new google.visualization.ColumnChart(document.getElementById("theme-download-stats-"+t.model.get("id"))).draw(s,{colors:["#253578"],legend:{position:"none"},titlePosition:"in",axisTitlesPosition:"in",chartArea:{height:280,left:35,width:"98%"},hAxis:{textStyle:{color:"black",fontSize:9}},vAxis:{format:"###,###",textPosition:"out",viewWindowMode:"explicit",viewWindow:{min:0}},bar:{groupWidth:s.getNumberOfRows()>100?"100%":null},height:350})})},navigation:function(){this.model.cid===this.model.collection.at(0).cid&&this.$el.find(".left").addClass("disabled"),this.mo
del.cid===this.model.collection.at(this.model.collection.length-1).cid&&this.$el.find(".right").addClass("disabled")},closeOverlay:function(){e("body").removeClass("modal-open"),this.remove(),this.unbind(),this.trigger("theme:collapse")},nextTheme:function(){var e=this;return e.trigger("theme:next",e.model.cid),!1},previousTheme:function(){var e=this;return e.trigger("theme:previous",e.model.cid),!1},screenshotCheck:function(e){var t=new Image;t.src=e.find(".screenshot img").attr("src")}}),i.view.Preview=i.view.Details.extend({className:"wp-full-overlay expanded",el:".theme-install-overlay",events:{"click .close-full-overlay":"close","click .collapse-sidebar":"collapse","click .previous-theme":"previousTheme","click .next-theme":"nextTheme",keyup:"keyEvent"},html:i.template(&quo
t;theme-preview"),render:function(){var t=this.model.toJSON();this.$el.html(this.html(t)),i.router.navigate(i.router.baseUrl(i.router.themePath+this.model.get("id"))),this.$el.fadeIn(200,function(){e("body").addClass("theme-installer-active full-overlay-active"),e(".close-full-overlay").focus()})},close:function(){return this.$el.fadeOut(200,function(){e("body").removeClass("theme-installer-active full-overlay-active"),i.focusedTheme&&i.focusedTheme.focus()}),this.trigger("preview:close"),this.undelegateEvents(),this.unbind(),i.router.navigate(i.router.baseUrl(i.router.themePath+this.model.get("id"))),!1},collapse:function(){return this.$el.toggleClass("collapsed").toggleClass("expanded"),!1},keyEvent:function(){return 27===event.keyCode&&(this.undelegateEvents(),this.close()),39===event.keyCode&&_.once(this.nextTheme()),37===event.keyCode&&this.pr
eviousTheme(),!1}}),i.view.Themes=wp.Backbone.View.extend({className:"themes",$overlay:e("div.theme-overlay"),index:0,count:e(".wp-filter .theme-count"),initialize:function(t){var i=this;this.parent=t.parent,this.setView("grid"),this.listenTo(i.collection,"update",function(){i.parent.page=0,i.render(this)}),this.listenTo(i.collection,"query:success",function(e){i.count.text(_.isNumber(e)?e:i.collection.length)}),this.listenTo(i.collection,"query:empty",function(){e("body").addClass("no-results")}),this.listenTo(this.parent,"theme:scroll",function(){i.renderThemes(i.parent.page)}),this.listenTo(this.parent,"theme:close",function(){i.overlay&&i.overlay.closeOverlay()}),e("body").on("keyup",function(e){i.overlay&&(39===e.keyCode&&i.overlay.nextTheme(),37===e.keyCode&&i.overlay.previousTheme(),27===e.keyCode&&i.overlay.
collapse(e))})},render:function(){this.$el.empty(),1===i.data.themes.length&&(this.singleTheme=new i.view.Details({model:this.collection.models[0]}),this.singleTheme.render(),this.$el.addClass("single-theme"),this.$el.append(this.singleTheme.el)),this.options.collection.size()>0&&this.renderThemes(this.parent.page),this.count.text(this.collection.count?this.collection.count:this.collection.length)},renderThemes:function(t){var s=this;return s.instance=s.collection.paginate(t),0===s.instance.size()?void this.parent.trigger("theme:end"):(t>=1&&e(".add-new-theme").remove(),s.instance.each(function(e){s.theme=new i.view.Theme({model:e,parent:s}),s.theme.render(),s.$el.append(s.theme.el),s.listenTo(s.theme,"theme:expand",s.expand,s)}),void this.parent.page++)},setView:function(e){return e},expand:function(t){var s=this;this.model=s.collection.get(t),i.router.navigate(i.router.baseUrl(i.router.themePath+this.model.id)),
i.utils.title(this.model.attributes.name),this.setView("detail"),e("body").addClass("modal-open"),this.overlay=new i.view.Details({model:s.model}),this.overlay.render(),this.$overlay.html(this.overlay.el),this.listenTo(this.overlay,"theme:next",function(){s.next([s.model.cid]),e(".theme-header").find(".right").focus()}).listenTo(this.overlay,"theme:previous",function(){s.previous([s.model.cid]),e(".theme-header").find(".left").focus()})},next:function(e){var t,i,s=this;t=s.collection.get(e[0]),i=s.collection.at(s.collection.indexOf(t)+1),void 0!==i&&s.theme.trigger("theme:expand",i.cid)},previous:function(e){var t,i,s=this;t=s.collection.get(e[0]),i=s.collection.at(s.collection.indexOf(t)-1),void 0!==i&&s.theme.trigger("theme:expand",i.cid)}}),i.view.Search=wp.Backbone.View.extend({tagName:"input",className:"wp-filter-search",id:"wp-f
ilter-search-input",searching:!1,attributes:{placeholder:t.searchPlaceholder,type:"search"},events:{keyup:"search",search:"search"},initialize:function(e){this.parent=e.parent,this.listenTo(this.parent,"theme:close",function(){this.searching=!1})},search:function(e){("keyup"!==e.type||9!==e.which&&16!==e.which)&&(this.collection=this.options.parent.view.collection,"keyup"===e.type&&27===e.which&&(e.target.value=""),_.debounce(_.bind(this.doSearch,this),300)(e.target.value))},doSearch:_.debounce(function(t){var s={};i.view.Installer.prototype.clearFilters(jQuery.Event("click")),s.search=t,"author:"===t.substring(0,7)&&(s.search="",s.author=t.slice(7)),"tag:"===t.substring(0,4)&&(s.search="",s.tag=[t.slice(4)]),e(".filter-links li > a.current").removeClass("current"),e("body").remov
eClass("show-filters filters-applied"),t?(i.utils.title(t),i.router.navigate(i.router.baseUrl(i.router.searchPath+t),{replace:!0})):(delete s.search,s.browse="featured",i.utils.title(e('.filter-links [data-sort="featured"]').text()),i.router.navigate(i.router.baseUrl(i.router.browsePath+"featured"),{replace:!0})),this.collection.query(s)},300)}),i.view.Installer=i.view.Appearance.extend({el:"#themes",events:{"click .filter-links li > a":"onSort","click .theme-filter":"onFilter","click .drawer-toggle":"moreFilters","click .filter-drawer .apply-filters":"applyFilters",'click .filter-group [type="checkbox"]':"addFilter","click .filter-drawer .clear-filters":"clearFilters","click .filtered-by":"backToFilters"},activeClass:"current",searchContainer:e(".wp-filter .search-form"),r
ender:function(){var s=this;this.search(),this.collection=new i.Collection,this.listenTo(this,"theme:end",function(){s.collection.loadingThemes||(s.collection.loadingThemes=!0,s.collection.currentQuery.page++,_.extend(s.collection.currentQuery.request,{page:s.collection.currentQuery.page}),s.collection.query(s.collection.currentQuery.request))}),this.listenTo(this.collection,"query:success",function(){e("body").removeClass("loading-content"),e(".theme-browser").find("div.error").remove()}),this.listenTo(this.collection,"query:fail",function(){e("body").removeClass("loading-content"),e(".theme-browser").find("div.error").remove(),e(".theme-browser").find("div.themes").before('<div class="error"><p>'+t.error+"</p></div>")}),this.view&&this.view.remove(),this.view=new i.view.Themes({collection:this.collecti
on,parent:this}),this.page=0,this.$el.find(".themes").remove(),this.view.render(),this.$el.find(".theme-browser").append(this.view.el).addClass("rendered")},browse:function(e){this.collection.query({browse:e})},onSort:function(t){var s=e(t.target),r=s.data("sort");t.preventDefault(),e("body").removeClass("filters-applied show-filters"),s.hasClass(this.activeClass)||(this.sort(r),i.router.navigate(i.router.baseUrl(i.router.browsePath+r)))},sort:function(t){var s=e('.filter-links [data-sort="'+t+'"]'),r=this;r.clearSearch(),_.each(e(".filter-group").find(":checkbox").filter(":checked"),function(t){return e(t).prop("checked",!1),r.filtersChecked()}),e(".filter-links li > a, .theme-filter").removeClass(this.activeClass),s.addClass(this.activeClass),i.utils.title(s.text()),this.browse(t)},onFilter:function(t){var i,s=e(t.target),r=s.data("filter");s.hasClas
s(this.activeClass)||(e(".filter-links li > a, .theme-section").removeClass(this.activeClass),s.addClass(this.activeClass),r&&(r=_.union(r,this.filtersChecked()),i={tag:[r]},this.collection.query(i)))},addFilter:function(){this.filtersChecked()},applyFilters:function(t){var s,r=[],o=this.filtersChecked(),n={tag:o},a=e(".filtered-by .tags");t&&t.preventDefault(),e("body").addClass("filters-applied"),e(".filter-links li > a.current").removeClass("current"),a.empty(),_.each(o,function(t){s=e('label[for="filter-id-'+t+'"]').text(),r.push(s),a.append('<span class="tag">'+s+"</span>")}),i.router.navigate(i.router.baseUrl("tags/"+o.join("+"))),i.utils.title(r.join(", ")),this.collection.query(n)},filtersChecked:function(){var t=e(".filter-group").find(":checkbox").filter(":checked"),i=e(".filter-drawer&q
uot;),s=[];return _.each(t,function(t){s.push(e(t).prop("value"))}),0===s.length?(i.find(".apply-filters").prop("disabled",!0).find("span").text(""),i.find(".clear-filters").hide(),e("body").removeClass("filters-applied"),!1):(i.find(".apply-filters").prop("disabled",!1).find("span").text(s.length),i.find(".clear-filters").css("display","inline-block"),s)},moreFilters:function(t){return t.preventDefault(),e("body").hasClass("filters-applied")?this.backToFilters():e("body").hasClass("show-filters")&&this.filtersChecked()?this.addFilter():(this.clearSearch(),void e("body").toggleClass("show-filters"))},clearFilters:function(t){var i=e(".filter-group").find(":checkbox"),s=this;t.preventDefault(),_.each(i.filter(":checked"),function(t){return e(t).prop(
"checked",!1),s.filtersChecked()})},backToFilters:function(t){t&&t.preventDefault(),e("body").removeClass("filters-applied")},clearSearch:function(){e("#wp-filter-search-input").val("")}}),i.Router=Backbone.Router.extend({routes:{"browse/:sort/":"sort","tags/:tag/":"tag","search/:query/":"search","author/:author/":"author",":slug/":"preview","":"sort"},baseUrl:function(e){return 0!==e.length&&(e+="/"),e},themePath:"",browsePath:"browse/",searchPath:"search/",search:function(t){e(".wp-filter-search").val(t)},navigate:function(){Backbone.history._hasPushState&&Backbone.Router.prototype.navigate.apply(this,arguments),"object"==typeof _gaq&&_gaq.push(["_trackPageview",i.data.settings.path+arguments[0]])}}),i.Run={init:f
unction(){this.view=new i.view.Installer({section:"featured",SearchView:i.view.Search}),this.render()},render:function(){this.view.render(),this.routes(),Backbone.history.start({root:i.data.settings.path,pushState:!0,hashChange:!1})},routes:function(){var t=this,s={};i.router=new i.Router,i.router.on("route:preview",function(e){t.view.collection.queries.push(i.data.query),s.theme=e,t.view.collection.query(s),t.view.view.expand(e)}),i.router.on("route:sort",function(e){t.view.collection.queries.push(i.data.query),e||(e="featured"),t.view.sort(e),t.view.trigger("theme:close")}),i.router.on("route:search",function(){t.view.collection.queries.push(i.data.query),e(".wp-filter-search").focus().trigger("keyup"),t.view.trigger("theme:close")}),i.router.on("route:tag",function(s){t.view.collection.queries.push(i.data.query),_.each(s.split("+"),function(t){e("#filter-id-"+t)
.prop("checked",!0)}),e("body").removeClass("show-filters").addClass("show-filters"),t.view.applyFilters(),t.view.trigger("theme:close")}),i.router.on("route:author",function(e){t.view.collection.queries.push(i.data.query),s.author=e,t.view.collection.query(s),i.utils.title(e),t.view.trigger("theme:close")})}},e(function(){i.Run.init()})}(jQuery),function(e){e.load("visualization","1",{packages:["corechart"]})}(google);
</del><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of file
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+window.wp=window.wp||{},function(a){var b,c=wp.themes=wp.themes||{};c.data=_wpThemeSettings,b=c.data.l10n,_.extend(c,{model:{},view:{},routes:{},router:{},template:wp.template}),c.utils={title:function(b){document.title=a("<div/>").html(c.data.settings.title.replace("%s",a("<div/>").text(b).html())).text()}},c.Model=Backbone.Model.extend({initialize:function(){var a;this.set({id:this.get("slug")||this.get("id")}),this.has("sections")&&(a=this.get("sections").description,this.set({description:a}))}}),c.view.Appearance=wp.Backbone.View.extend({el:"#themes .theme-browser",window:a(window),page:0,initialize:function(a){_.bindAll(this,"scroller"),this.SearchView=a.SearchView?a.SearchView:c.view.Search,this.window.bind("scroll",_.throttle(this.scroller,300))},render:function(
){this.view=new c.view.Themes({collection:this.collection,parent:this}),this.search(),this.view.render(),this.$el.find(".themes").remove(),this.$el.append(this.view.el).addClass("rendered")},searchContainer:"",search:function(){var c,d=this;c=new this.SearchView({collection:d.collection,parent:this}),c.render(),this.searchContainer.append(a.parseHTML('<label class="screen-reader-text" for="wp-filter-search-input">'+b.search+"</label>")).append(c.el)},scroller:function(){var a,b,c=this;a=this.window.scrollTop()+c.window.height(),b=c.$el.offset().top+c.$el.outerHeight(!1)-c.window.height(),b=Math.round(.9*b),a>b&&this.trigger("theme:scroll")}}),c.Collection=Backbone.Collection.extend({model:c.Model,terms:"",queries:[],currentQuery:{page:1,request:{}},count:!1,loadingThemes:!1,doSearch:function(a){this.terms!==a&&(this.terms=a,this.terms.length>0&&this.search(this.t
erms),""===this.terms&&this.reset(c.data.themes),this.trigger("update"))},search:function(b){var d,e,f,g,h,i;this.reset(c.data.themes,{silent:!0}),b=b.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),b=b.replace(/ /g,")(?=.*"),d=new RegExp("^(?=.*"+b+").+","i"),e=this.filter(function(a){return g=a.get("name").replace(/(<([^>]+)>)/gi,""),h=a.get("description").replace(/(<([^>]+)>)/gi,""),i=a.get("author").replace(/(<([^>]+)>)/gi,""),f=_.union(g,a.get("id"),h,i,a.get("tags")),d.test(a.get("author"))&&b.length>2&&a.set("displayAuthor",!0),d.test(f)}),0===e.length?this.trigger("query:empty"):a("body").removeClass("no-results"),this.reset(e)},paginate:function(a){var b=this;return a=a||0,b=_(b.rest(c.data.settings.postsPerPage*a)),b=_(b.first
(c.data.settings.postsPerPage))},query:function(b){var c,d,e,f=this.queries,g=this;if(this.currentQuery.request=b,c=_.find(f,function(a){return _.isEqual(a.request,b)}),d=_.has(b,"page"),d||(this.currentQuery.page=1),c||d){if(d)return this.apiCall(b,d).done(function(a){g.add(a.themes),g.trigger("query:success",a.info.results),g.loadingThemes=!1}).fail(function(){g.trigger("query:fail")});0===c.themes.length?g.trigger("query:empty"):a("body").removeClass("no-results"),_.isNumber(c.total)&&(this.count=c.total),this.reset(c.themes),c.total||(this.count=this.length),this.trigger("update"),this.trigger("query:success",this.count)}else c=this.apiCall(b).done(function(a){a.themes&&(g.reset(a.themes),e=a.info.results,f.push({themes:a.themes,request:b,total:e})),g.trigger("update"),g.trigger("query:success",e),a.themes&&0===a.themes.length&&g.trigger("query
:empty")}).fail(function(){g.trigger("query:fail")})},apiCall:function(b,d){var e={type:"POST",url:"https://api.wordpress.org/themes/info/1.1/",jsonp:"callback",dataType:"jsonp",data:{action:"query_themes",request:_.extend({per_page:c.data.settings.postsPerPage,fields:{description:!0,sections:!1,tested:!0,requires:!0,downloaded:!0,downloadlink:!0,last_updated:!0,homepage:!0,theme_url:!0,parent:!0,tags:!0,rating:!0,ratings:!0,num_ratings:!0,extended_author:!0,photon_screenshots:!0}},b)},beforeSend:function(){d||a("body").addClass("loading-content").removeClass("no-results")}};return a.Deferred(function(b){a.ajax(e).done(function(a){b.resolveWith(this,[a])}).fail(function(){b.rejectWith(this,arguments)})}).promise()}}),c.view.Theme=wp.Backbone.View.extend({className:"theme",state:"grid",html:wp.themes.template("theme"),events:{click:"expand",keydown:&q
uot;expand",touchend:"expand",keyup:"addFocus",touchmove:"preventExpand"},touchDrag:!1,render:function(){var a=this.model.toJSON();a.permalink=c.data.settings.path+c.router.baseUrl(a.slug),a.path=c.data.settings.path,this.$el.html(this.html(a)).attr({tabindex:0,"aria-describedby":a.id+"-action "+a.id+"-name"})},addFocus:function(){var b=a(":focus").hasClass("theme")?a(":focus"):a(":focus").parents(".theme");a(".theme.focus").removeClass("focus"),b.addClass("focus")},expand:function(b){var d=this;return b=b||window.event,!0===b.metaKey&&"click"===b.type||"keydown"===b.type&&13!==b.which&&32!==b.which?void 0:this.touchDrag===!0?this.touchDrag=!1:void(a(b.target).is(".theme-actions a")||(c.focusedTheme=this.$el,this.trigger("theme:expand",d.model.cid),b.preventDefault()))},prevent
Expand:function(){this.touchDrag=!0}}),c.view.Details=wp.Backbone.View.extend({className:"theme-overlay",events:{click:"collapse","click .left":"previousTheme","click .right":"nextTheme","click .theme-actions .button-secondary":"preview","keydown .theme-actions .button-secondary":"preview","touchend .theme-actions .button-secondary":"preview"},html:c.template("theme-single"),render:function(){var a=this.model.toJSON(),b=new Date;b.setUTCFullYear(a.last_updated.substring(0,4),a.last_updated.substring(5,7)-1,a.last_updated.substring(8,10)),a.last_updated=b.toLocaleDateString(!1,{day:"numeric",month:"long",year:"numeric"}),a.is_outdated=b.setYear(b.getYear()+1902).valueOf()<(new Date).valueOf(),a.tags=_.map(a.tags,function(a,b){return'<a href="'+c.data.settings.path+c.router.baseUrl("tags/"+b)+'">'+a
+"</a>"}).join(", "),a.path=c.data.settings.path,this.$el.html(this.html(a)),this.navigation(),this.screenshotCheck(this.$el),this.containFocus(this.$el),this.renderDownloadsGraph()},preview:function(b){var d,e,f=this;return this.touchDrag===!0?this.touchDrag=!1:void(a(b.target).hasClass("button-primary")||("keydown"!==b.type||13===b.which||32===b.which)&&("keydown"===b.type&&13!==b.which&&a(":focus").hasClass("button")||(b=b||window.event,b.preventDefault(),c.focusedTheme=this.$el,e=new c.view.Preview({model:this.model}),e.render(),this.setNavButtonsState(),e.$el.addClass(c.data.settings.isMobile?"wp-full-overlay collapsed":"wp-full-overlay expanded"),a(".theme-install-overlay").append(e.el),this.listenTo(e,"theme:next",function(){return this.trigger("theme:next"),d=f.model,_.isUndefined(f.current)||(d=f.current),f.current=f.model.col
lection.at(f.model.collection.indexOf(d)+1),_.isUndefined(f.current)?(f.options.parent.parent.trigger("theme:end"),f.current=d):(e.model=f.current,e.render(),this.setNavButtonsState(),void a(".next-theme").focus())}).listenTo(e,"theme:previous",function(){this.trigger("theme:previous"),d=f.model,0!==f.model.collection.indexOf(f.current)&&(_.isUndefined(f.current)||(d=f.current),f.current=f.model.collection.at(f.model.collection.indexOf(d)-1),_.isUndefined(f.current)||(e.model=f.current,e.render(),this.setNavButtonsState(),a(".previous-theme").focus()))}),this.listenTo(e,"preview:close",function(){f.current=f.model}))))},setNavButtonsState:function(){var b=a(".theme-install-overlay"),c=_.isUndefined(this.current)?this.model:this.current;0===this.model.collection.indexOf(c)&&b.find(".previous-theme").addClass("disabled"),_.isUndefined(this.model.collection.at(this.model.collection
.indexOf(c)+1))&&b.find(".next-theme").addClass("disabled")},containFocus:function(b){var c,d=window.event;("undefined"==typeof d||1===a(d.target).closest(".theme").length)&&_.delay(function(){a(".theme-wrap a.button-primary:visible").focus()},500),b.on("keydown.wp-themes",function(d){9===d.which&&(c=a(d.target),c.is("button.close")&&d.shiftKey?(b.find(".theme-tags a:last-child").focus(),d.preventDefault()):c.is(".theme-tags a:last-child")&&(b.find("button.close").focus(),d.preventDefault()))})},collapse:function(b){var d,e,f,g,h,i=this,j={};1!==c.data.themes.length&&(b=b||window.event,(a(b.target).is(".close")||27===b.keyCode)&&(a("body").addClass("closing-overlay"),this.$el.fadeOut(1,function(){a("body").removeClass("closing-overlay"),i.closeOverlay(),d=document.body.scrollTop,(
e=c.Collection.prototype.currentQuery.request.author)?(c.router.navigate(c.router.baseUrl("author/"+e)),c.utils.title(e)):(f=c.Collection.prototype.currentQuery.request.search)?(c.router.navigate(c.router.baseUrl(c.router.searchPath+f)),c.utils.title(f)):(g=c.view.Installer.prototype.filtersChecked())?(c.router.navigate(c.router.baseUrl("tags/"+g.join("+"))),c.utils.title(_.each(g,function(b,c){g[c]=a('label[for="filter-id-'+b+'"]').text()}).join(", "))):(h=a(".filter-links .current"))&&(h.length||(h=a('.filter-links [data-sort="featured"]'),j={trigger:!0}),c.router.navigate(c.router.baseUrl(c.router.browsePath+h.data("sort")),j),c.utils.title(h.text())),document.body.scrollTop=d,c.focusedTheme&&c.focusedTheme.focus()})))},renderDownloadsGraph:function(){var b=this;a.getJSON("https://api.wordpress.org/stats/themes/1.0/downloads.php?slug="+b.model.get("id")+"&l
imit=260&callback=?",function(c){var d=new google.visualization.DataTable,e=0;d.addColumn("string",_wpThemeSettings.l10n.date),d.addColumn("number",_wpThemeSettings.l10n.downloads),a.each(c,function(a,b){d.addRow(),d.setValue(e,0,new Date(a).toLocaleDateString()),d.setValue(e,1,Number(b)),e++}),new google.visualization.ColumnChart(document.getElementById("theme-download-stats-"+b.model.get("id"))).draw(d,{colors:["#253578"],legend:{position:"none"},titlePosition:"in",axisTitlesPosition:"in",chartArea:{height:280,left:35,width:"98%"},hAxis:{textStyle:{color:"black",fontSize:9}},vAxis:{format:"###,###",textPosition:"out",viewWindowMode:"explicit",viewWindow:{min:0}},bar:{groupWidth:d.getNumberOfRows()>100?"100%":null},height:350})})},navigation:function(){this.model.cid===this.model.collection.at(0).cid&&this.$el.find(".le
ft").addClass("disabled"),this.model.cid===this.model.collection.at(this.model.collection.length-1).cid&&this.$el.find(".right").addClass("disabled")},closeOverlay:function(){a("body").removeClass("modal-open"),this.remove(),this.unbind(),this.trigger("theme:collapse")},nextTheme:function(){var a=this;return a.trigger("theme:next",a.model.cid),!1},previousTheme:function(){var a=this;return a.trigger("theme:previous",a.model.cid),!1},screenshotCheck:function(a){var b=new Image;b.src=a.find(".screenshot img").attr("src")}}),c.view.Preview=c.view.Details.extend({className:"wp-full-overlay expanded",el:".theme-install-overlay",events:{"click .close-full-overlay":"close","click .collapse-sidebar":"collapse","click .previous-theme":"previousTheme","click .next-theme":"nextTheme",
keyup:"keyEvent"},html:c.template("theme-preview"),render:function(){var b=this.model.toJSON();this.$el.html(this.html(b)),c.router.navigate(c.router.baseUrl(c.router.themePath+this.model.get("id"))),this.$el.fadeIn(200,function(){a("body").addClass("theme-installer-active full-overlay-active"),a(".close-full-overlay").focus()})},close:function(){return this.$el.fadeOut(200,function(){a("body").removeClass("theme-installer-active full-overlay-active"),c.focusedTheme&&c.focusedTheme.focus()}),this.trigger("preview:close"),this.undelegateEvents(),this.unbind(),c.router.navigate(c.router.baseUrl(c.router.themePath+this.model.get("id"))),!1},collapse:function(){return this.$el.toggleClass("collapsed").toggleClass("expanded"),!1},keyEvent:function(){return 27===event.keyCode&&(this.undelegateEvents(),this.close()),39===event.keyCode&&_.once(this.
nextTheme()),37===event.keyCode&&this.previousTheme(),!1}}),c.view.Themes=wp.Backbone.View.extend({className:"themes",$overlay:a("div.theme-overlay"),index:0,count:a(".wp-filter .theme-count"),initialize:function(b){var c=this;this.parent=b.parent,this.setView("grid"),this.listenTo(c.collection,"update",function(){c.parent.page=0,c.render(this)}),this.listenTo(c.collection,"query:success",function(a){c.count.text(_.isNumber(a)?a:c.collection.length)}),this.listenTo(c.collection,"query:empty",function(){a("body").addClass("no-results")}),this.listenTo(this.parent,"theme:scroll",function(){c.renderThemes(c.parent.page)}),this.listenTo(this.parent,"theme:close",function(){c.overlay&&c.overlay.closeOverlay()}),a("body").on("keyup",function(a){c.overlay&&(39===a.keyCode&&c.overlay.nextTheme(),37===a.keyCode&&c.overlay.pr
eviousTheme(),27===a.keyCode&&c.overlay.collapse(a))})},render:function(){this.$el.empty(),1===c.data.themes.length&&(this.singleTheme=new c.view.Details({model:this.collection.models[0]}),this.singleTheme.render(),this.$el.addClass("single-theme"),this.$el.append(this.singleTheme.el)),this.options.collection.size()>0&&this.renderThemes(this.parent.page),this.count.text(this.collection.count?this.collection.count:this.collection.length)},renderThemes:function(b){var d=this;return d.instance=d.collection.paginate(b),0===d.instance.size()?void this.parent.trigger("theme:end"):(b>=1&&a(".add-new-theme").remove(),d.instance.each(function(a){d.theme=new c.view.Theme({model:a,parent:d}),d.theme.render(),d.$el.append(d.theme.el),d.listenTo(d.theme,"theme:expand",d.expand,d)}),void this.parent.page++)},setView:function(a){return a},expand:function(b){var d=this;this.model=d.collection.get(b),c.router.navigate(c.ro
uter.baseUrl(c.router.themePath+this.model.id)),c.utils.title(this.model.attributes.name),this.setView("detail"),a("body").addClass("modal-open"),this.overlay=new c.view.Details({model:d.model}),this.overlay.render(),this.$overlay.html(this.overlay.el),this.listenTo(this.overlay,"theme:next",function(){d.next([d.model.cid]),a(".theme-header").find(".right").focus()}).listenTo(this.overlay,"theme:previous",function(){d.previous([d.model.cid]),a(".theme-header").find(".left").focus()})},next:function(a){var b,c,d=this;b=d.collection.get(a[0]),c=d.collection.at(d.collection.indexOf(b)+1),void 0!==c&&d.theme.trigger("theme:expand",c.cid)},previous:function(a){var b,c,d=this;b=d.collection.get(a[0]),c=d.collection.at(d.collection.indexOf(b)-1),void 0!==c&&d.theme.trigger("theme:expand",c.cid)}}),c.view.Search=wp.Backbone.View.extend({tagName:"input",clas
sName:"wp-filter-search",id:"wp-filter-search-input",searching:!1,attributes:{placeholder:b.searchPlaceholder,type:"search"},events:{keyup:"search",search:"search"},initialize:function(a){this.parent=a.parent,this.listenTo(this.parent,"theme:close",function(){this.searching=!1})},search:function(a){("keyup"!==a.type||9!==a.which&&16!==a.which)&&(this.collection=this.options.parent.view.collection,"keyup"===a.type&&27===a.which&&(a.target.value=""),_.debounce(_.bind(this.doSearch,this),300)(a.target.value))},doSearch:_.debounce(function(b){var d={};c.view.Installer.prototype.clearFilters(jQuery.Event("click")),d.search=b,"author:"===b.substring(0,7)&&(d.search="",d.author=b.slice(7)),"tag:"===b.substring(0,4)&&(d.search="",d.tag=[b.slice(4)]),a(".filter-links li > a.current").removeClas
s("current"),a("body").removeClass("show-filters filters-applied"),b?(c.utils.title(b),c.router.navigate(c.router.baseUrl(c.router.searchPath+b),{replace:!0})):(delete d.search,d.browse="featured",c.utils.title(a('.filter-links [data-sort="featured"]').text()),c.router.navigate(c.router.baseUrl(c.router.browsePath+"featured"),{replace:!0})),this.collection.query(d)},300)}),c.view.Installer=c.view.Appearance.extend({el:"#themes",events:{"click .filter-links li > a":"onSort","click .theme-filter":"onFilter","click .drawer-toggle":"moreFilters","click .filter-drawer .apply-filters":"applyFilters",'click .filter-group [type="checkbox"]':"addFilter","click .filter-drawer .clear-filters":"clearFilters","click .filtered-by":"backToFilters"},activeClass:"current",searchCo
ntainer:a(".wp-filter .search-form"),render:function(){var d=this;this.search(),this.collection=new c.Collection,this.listenTo(this,"theme:end",function(){d.collection.loadingThemes||(d.collection.loadingThemes=!0,d.collection.currentQuery.page++,_.extend(d.collection.currentQuery.request,{page:d.collection.currentQuery.page}),d.collection.query(d.collection.currentQuery.request))}),this.listenTo(this.collection,"query:success",function(){a("body").removeClass("loading-content"),a(".theme-browser").find("div.error").remove()}),this.listenTo(this.collection,"query:fail",function(){a("body").removeClass("loading-content"),a(".theme-browser").find("div.error").remove(),a(".theme-browser").find("div.themes").before('<div class="error"><p>'+b.error+"</p></div>")}),this.view&&this.view.remove(),this.
view=new c.view.Themes({collection:this.collection,parent:this}),this.page=0,this.$el.find(".themes").remove(),this.view.render(),this.$el.find(".theme-browser").append(this.view.el).addClass("rendered")},browse:function(a){this.collection.query({browse:a})},onSort:function(b){var d=a(b.target),e=d.data("sort");b.preventDefault(),a("body").removeClass("filters-applied show-filters"),d.hasClass(this.activeClass)||(this.sort(e),c.router.navigate(c.router.baseUrl(c.router.browsePath+e)))},sort:function(b){var d=a('.filter-links [data-sort="'+b+'"]'),e=this;e.clearSearch(),_.each(a(".filter-group").find(":checkbox").filter(":checked"),function(b){return a(b).prop("checked",!1),e.filtersChecked()}),a(".filter-links li > a, .theme-filter").removeClass(this.activeClass),d.addClass(this.activeClass),c.utils.title(d.text()),this.browse(b)},onFilter:function(b){var c,d=a(
b.target),e=d.data("filter");d.hasClass(this.activeClass)||(a(".filter-links li > a, .theme-section").removeClass(this.activeClass),d.addClass(this.activeClass),e&&(e=_.union(e,this.filtersChecked()),c={tag:[e]},this.collection.query(c)))},addFilter:function(){this.filtersChecked()},applyFilters:function(b){var d,e=[],f=this.filtersChecked(),g={tag:f},h=a(".filtered-by .tags");b&&b.preventDefault(),a("body").addClass("filters-applied"),a(".filter-links li > a.current").removeClass("current"),h.empty(),_.each(f,function(b){d=a('label[for="filter-id-'+b+'"]').text(),e.push(d),h.append('<span class="tag">'+d+"</span>")}),c.router.navigate(c.router.baseUrl("tags/"+f.join("+"))),c.utils.title(e.join(", ")),this.collection.query(g)},filtersChecked:function(){var b=a(".filter-group").find(":checkbox").filter(
":checked"),c=a(".filter-drawer"),d=[];return _.each(b,function(b){d.push(a(b).prop("value"))}),0===d.length?(c.find(".apply-filters").prop("disabled",!0).find("span").text(""),c.find(".clear-filters").hide(),a("body").removeClass("filters-applied"),!1):(c.find(".apply-filters").prop("disabled",!1).find("span").text(d.length),c.find(".clear-filters").css("display","inline-block"),d)},moreFilters:function(b){return b.preventDefault(),a("body").hasClass("filters-applied")?this.backToFilters():a("body").hasClass("show-filters")&&this.filtersChecked()?this.addFilter():(this.clearSearch(),void a("body").toggleClass("show-filters"))},clearFilters:function(b){var c=a(".filter-group").find(":checkbox"),d=this;b.preventDefault(),_.each(c.filter(&qu
ot;:checked"),function(b){return a(b).prop("checked",!1),d.filtersChecked()})},backToFilters:function(b){b&&b.preventDefault(),a("body").removeClass("filters-applied")},clearSearch:function(){a("#wp-filter-search-input").val("")}}),c.Router=Backbone.Router.extend({routes:{"browse/:sort(/)":"sort","tags/:tag(/)":"tag","search/:query(/)":"search","author/:author(/)":"author",":slug(/)":"preview","":"sort"},baseUrl:function(a){return 0!==a.length&&(a+="/"),a},themePath:"",browsePath:"browse/",searchPath:"search/",search:function(b){a(".wp-filter-search").val(b)},navigate:function(){Backbone.history._hasPushState&&Backbone.Router.prototype.navigate.apply(this,arguments),"object"==typeof _gaq&&_gaq.push(["_trackPageview&
quot;,c.data.settings.path+arguments[0]])}}),c.Run={init:function(){this.view=new c.view.Installer({section:"featured",SearchView:c.view.Search}),this.render()},render:function(){this.view.render(),this.routes(),Backbone.history.start({root:c.data.settings.path,pushState:!0,hashChange:!1})},routes:function(){var b=this,d={};c.router=new c.Router,c.router.on("route:preview",function(a){b.view.collection.queries.push(c.data.query),d.theme=a,b.view.collection.query(d),b.view.view.expand(a)}),c.router.on("route:sort",function(a){b.view.collection.queries.push(c.data.query),a||(a="featured"),b.view.sort(a),b.view.trigger("theme:close")}),c.router.on("route:search",function(){b.view.collection.queries.push(c.data.query),a(".wp-filter-search").focus().trigger("keyup"),b.view.trigger("theme:close")}),c.router.on("route:tag",function(d){b.view.collection.queries.push(c.data.query),_.each(d.spl
it("+"),function(b){a("#filter-id-"+b).prop("checked",!0)}),a("body").removeClass("show-filters").addClass("show-filters"),b.view.applyFilters(),b.view.trigger("theme:close")}),c.router.on("route:author",function(a){b.view.collection.queries.push(c.data.query),d.author=a,b.view.collection.query(d),c.utils.title(a),b.view.trigger("theme:close")})}},a(function(){c.Run.init()})}(jQuery),function(a){a.load("visualization","1",{packages:["corechart"]})}(google);
</ins></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgthemesrssphp"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/rss.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/rss.php (rev 0)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/rss.php 2015-04-20 02:17:13 UTC (rev 1489)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,40 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true);
+echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>';
+?>
+<rss version="2.0"
+ xmlns:content="http://purl.org/rss/1.0/modules/content/"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:atom="http://www.w3.org/2005/Atom"
+ xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
+>
+
+<channel>
+ <title><?php _e( 'Theme Directory', 'wporg-themes' ); ?></title>
+ <atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" />
+ <link><?php bloginfo_rss('url') ?></link>
+ <description><?php _e( 'Free WordPress Themes', 'wporg-themes' ); ?></description>
+ <lastBuildDate><?php echo gmdate( 'D, d M Y H:i:s +0000' ); ?></lastBuildDate>
+ <language><?php bloginfo_rss( 'language' ); ?></language>
+ <sy:updatePeriod>daily</sy:updatePeriod>
+ <sy:updateFrequency>1</sy:updateFrequency>
+ <?php
+
+ $themes = wporg_themes_get_themes_for_query();
+ foreach ( $themes['themes'] as $theme ) :
+ ?>
+ <item>
+ <title><?php echo esc_html( $theme->name ); ?></title>
+ <link><?php echo home_url( $theme->slug . '/' ); ?></link>
+ <pubDate><?php echo gmdate( 'D, d M Y H:i:s +0000', strtotime( $theme->last_updated ) ); ?></pubDate>
+ <dc:creator><![CDATA[<?php echo esc_html( $theme->author->display_name ); ?>]]></dc:creator>
+ <?php foreach ( $theme->tags as $tag ) : ?>
+ <category><![CDATA[<?php echo esc_html( $tag ); ?>]]></category>
+ <?php endforeach; ?>
+ <guid isPermaLink="true"><?php echo home_url( $theme->slug . '/' ); ?></guid>
+ <description><![CDATA[<?php echo esc_html( $theme->description ); ?>]]></description>
+ <content:encoded><![CDATA[<?php echo esc_html( $theme->description ); ?>]]></content:encoded>
+ </item>
+ <?php endforeach; ?>
+</channel>
+</rss>
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of file
</span><span class="cx" style="display: block; padding: 0 10px">Property changes on: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/rss.php
</span><span class="cx" style="display: block; padding: 0 10px">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: svn:eol-style</h4></div>
<ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+native
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of property
</span><a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgthemesstylecss"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/style.css</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/style.css 2015-04-18 16:45:18 UTC (rev 1488)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/style.css 2015-04-20 02:17:13 UTC (rev 1489)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1552,32 +1552,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> .posts-navigation {
</span><span class="cx" style="display: block; padding: 0 10px"> font-size: 18px;
</span><span class="cx" style="display: block; padding: 0 10px"> overflow: hidden;
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ text-align: center;
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-.posts-navigation .nav-previous {
- float: right;
-}
-
-.posts-navigation .nav-next {
- float: left;
-}
-
</del><span class="cx" style="display: block; padding: 0 10px"> .posts-navigation .nav-links a {
</span><span class="cx" style="display: block; padding: 0 10px"> padding: 8px 10px;
</span><span class="cx" style="display: block; padding: 0 10px"> display: inline-block;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-.posts-navigation .nav-previous a:after {
- content: '\2192';
- margin: 0 -10px 0 5px;
-}
-
-.posts-navigation .nav-next a:before {
- content: '\2190';
- margin: 0 5px 0 -10px;
- vertical-align: middle;
-}
-
</del><span class="cx" style="display: block; padding: 0 10px"> /* Theme notices */
</span><span class="cx" style="display: block; padding: 0 10px"> .notice,
</span><span class="cx" style="display: block; padding: 0 10px"> .error {
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgthemesthemesinglephpfromrev1483sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgthemesviewtemplatesthemesinglephp"></a>
<div class="copfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Copied: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/theme-single.php (from rev 1483, sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/view-templates/theme-single.php)</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/theme-single.php (rev 0)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/theme-single.php 2015-04-20 02:17:13 UTC (rev 1489)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,142 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<div>
+ <div class="theme-navigation">
+ <a class="close" href="<?php echo home_url('/'); ?>"><?php _e( 'Return to Themes List', 'wporg-themes' ); ?></a>
+ <div class="navigation post-navigation">
+ <button class="left dashicons dashicons-no disabled"><span class="screen-reader-text"><?php _e( 'Show previous theme', 'wporg-themes' ); ?></span></button>
+ <button class="right dashicons dashicons-no disabled"><span class="screen-reader-text"><?php _e( 'Show next theme', 'wporg-themes' ); ?></span></button>
+ </div>
+ </div>
+ <div class="theme-wrap">
+ <div class="theme-about hentry" itemscope itemtype="http://schema.org/CreativeWork">
+ <?php if ( time() - strtotime( $theme->last_updated ) > 2 * YEAR_IN_SECONDS ) { ?>
+ <div class="theme-notice notice notice-warning">
+ <p><?php _e( 'This theme <strong>hasn’t been updated in over 2 years</strong>. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.', 'wporg-themes' ); ?></p>
+ </div><!-- .theme-notice -->
+ <?php } ?>
+
+ <div>
+ <h3 class="theme-name entry-title" itemprop="name"><?php echo esc_html( $theme->name ); ?></h3>
+ <h4 class="theme-author"><?php printf( _x( 'By %s', 'theme author', 'wporg-themes' ), '<a href="https://wordpress.org/themes/author/' . $theme->author->user_nicename . '/"><span class="author" itemprop="author">' . esc_html( $theme->author->display_name ) . '</span></a>' ); ?></h4>
+ </div>
+
+ <div class="theme-head">
+ <div class="theme-actions clear">
+ <a href="<?php echo esc_url( $theme->preview_url ); ?>" class="button button-secondary alignleft"><?php _e( 'Preview', 'wporg-themes' ); ?></a>
+ <a href="<?php echo esc_url( $theme->download_link); ?>" class="button button-primary alignright"><?php _e( 'Download', 'wporg-themes' ); ?></a>
+ </div>
+
+ <?php if ( !empty( $theme->parent ) ) { ?>
+ <div class="theme-notice notice notice-info">
+ <p class="parent"><?php printf( __( 'This is a child theme of %s.', 'wporg-themes' ), sprintf( '<a href="%1$s">%2$s</a>', home_url( $theme->parent['slug'] . '/' ), esc_html( $theme->parent['name'] ) ) ); ?></p>
+ </div>
+ <?php } ?>
+
+ <div class="theme-meta-info">
+ <p class="updated"><?php printf( __( 'Last updated: %s', 'wporg-themes' ), '<strong>' . date_i18n( 'F j, Y', strtotime( $theme->last_updated ) ) . '</strong>' ); ?></p>
+ <?php if ( $theme->theme_url ) { ?>
+ <a href="<?php echo esc_url( $theme->theme_url ); ?>"><?php _e( 'Theme Homepage', 'wporg-themes' ); ?></a>
+ <?php } ?>
+ </div>
+ </div><!-- .theme-head -->
+
+ <div class="theme-info">
+ <?php if ( $theme->screenshot_url ) { ?>
+ <div class="screenshot"><img src="<?php echo esc_url( $theme->screenshot_url ); ?>?w=1142&strip=all" alt=""/></div>
+ <?php } else { ?>
+ <div class="screenshot blank"></div>
+ <?php } ?>
+
+ <div class="theme-description entry-summary" itemprop="description"><p><?php echo esc_html( $theme->description ); ?></p></div>
+
+ <?php if ( $theme->tags ) { ?>
+ <div class="theme-tags">
+ <h4><?php _e( 'Tags:', 'wporg-themes' ); ?></h4>
+ <?php
+ $tag_links = array();
+ foreach ( $theme->tags as $slug => $tagname ) {
+ $tag_links[] = sprintf(
+ "<a href='%s'>%s</a>",
+ esc_url( home_url( "/tags/$slug/" ) ),
+ esc_html( $tagname )
+ );
+ }
+ echo implode( ', ', $tag_links );
+ ?>
+ </div><!-- .theme-tags -->
+ <?php } ?>
+
+ <div class="theme-downloads">
+ <p class="total-downloads"><?php printf( __( 'Total downloads: %s', 'wporg-themes' ), '<strong>' . number_format_i18n( $theme->downloaded ) . '</strong>' ); ?></p>
+ </div><!-- .theme-downloads -->
+ </div>
+
+ <div class="theme-meta">
+ <div class="theme-ratings" itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
+ <meta itemprop="ratingCount" content="<?php echo $theme->num_ratings; ?>"/>
+ <h4><?php _e( 'Ratings', 'wporg-themes' ); ?></h4>
+
+ <?php if ( $theme->rating ) { ?>
+ <div class="rating rating-<?php echo round( $theme->rating / 10 ) * 10; ?>">
+ <span class="one"></span>
+ <span class="two"></span>
+ <span class="three"></span>
+ <span class="four"></span>
+ <span class="five"></span>
+ <p class="description"><?php printf( __( '%s out of 5 stars.', 'wporg-themes' ), '<span itemprop="ratingValue">' . round( $theme->rating / 20 / 0.5 )*0.5 . '</span>' ); ?></p>
+ </div>
+ <?php } else { ?>
+ <div class="rating">
+ <div class="ratings"><?php _e( 'This theme has not been rated yet.', 'wporg-themes' ); ?></div>
+ </div>
+ <?php } ?>
+
+ <?php if ( $theme->ratings ) { ?>
+ <ul>
+ <?php foreach ( range( 5, 1 ) as $stars ) :
+ $rating_bar_width = $theme->num_ratings ? 100 * $theme->ratings[$stars] / $theme->num_ratings : 0;
+ ?>
+ <li class="counter-container">
+ <a href="//wordpress.org/support/view/theme-reviews/<?php echo $theme->slug; ?>?filter=<?php echo $stars; ?>" title="<?php echo esc_attr( sprintf( _n( 'Click to see reviews that provided a rating of %d star', 'Click to see reviews that provided a rating of %d stars', $stars, 'wporg-themes' ), $stars ) ); ?>">
+ <span class="counter-label"><?php printf( _n( '%d star', '%d stars', $stars, 'wporg-themes' ), $stars ); ?></span>
+ <span class="counter-back">
+ <span class="counter-bar" style="width: <?php echo $rating_bar_width; ?>%;"></span>
+ </span>
+ <span class="counter-count"><?php echo $theme->ratings[$stars]; ?></span>
+ </a>
+ </li>
+ <?php endforeach; ?>
+ </ul>
+ <?php } ?>
+
+ <a class="button button-secondary" href="https://wordpress.org/support/view/theme-reviews/<?php echo $theme->slug; ?>#postform"><?php _e( 'Add your review', 'wporg-themes' ); ?></a>
+ </div><!-- .theme-rating -->
+
+ <div class="theme-support">
+ <h4><?php _e( 'Support', 'wporg-themes' ); ?></h4>
+ <p><?php _e( 'Got something to say? Need help?', 'wporg-themes' ); ?></p>
+ <a href="//wordpress.org/support/theme/<?php echo $theme->slug; ?>" class="button button-secondary"><?php _e( 'View support forum', 'wporg-themes' ); ?></a>
+ </div><!-- .theme-support -->
+
+ <div class="theme-devs">
+ <h4><?php _e( 'Development', 'wporg-themes' ); ?></h4>
+ <h5><?php _e( 'Subscribe', 'wporg-themes' ); ?></h5>
+ <ul class="unmarked-list">
+ <li>
+ <a href="//themes.trac.wordpress.org/log/<?php echo $theme->slug; ?>?limit=100&mode=stop_on_copy&format=rss">
+ <img src="//s.w.org/style/images/feedicon.png" />
+ <?php _e( 'Development Log', 'wporg-themes' ); ?>
+ </a>
+ </li>
+ </ul>
+
+ <h5><?php _e( 'Browse the Code', 'wporg-themes' ); ?></h5>
+ <ul class="unmarked-list">
+ <li><a href="//themes.trac.wordpress.org/log/<?php echo $theme->slug; ?>/" rel="nofollow"><?php _e( 'Development Log', 'wporg-themes' ); ?></a></li>
+ <li><a href="//themes.svn.wordpress.org/<?php echo $theme->slug; ?>/" rel="nofollow"><?php _e( 'Subversion Repository', 'wporg-themes' ); ?></a></li>
+ <li><a href="//themes.trac.wordpress.org/browser/<?php echo $theme->slug; ?>/" rel="nofollow"><?php _e( 'Browse in Trac', 'wporg-themes' ); ?></a></li>
+ </ul>
+ </div><!-- .theme-devs -->
+ </div>
+ </div>
+ </div>
+</div>
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of file
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgthemesthemephpfromrev1483sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgthemesviewtemplatesthemephp"></a>
<div class="copfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Copied: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/theme.php (from rev 1483, sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/view-templates/theme.php)</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/theme.php (rev 0)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/theme.php 2015-04-20 02:17:13 UTC (rev 1489)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,17 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<article id="post-<?php echo esc_attr( $theme->slug ); ?>" class="theme hentry">
+ <a class="url" href="<?php echo home_url( $theme->slug . '/' ); ?>" rel="bookmark" tabindex="-1">
+ <?php if ( $theme->screenshot_url ) { ?>
+ <div class="theme-screenshot">
+ <img src="<?php echo esc_url( $theme->screenshot_url ); ?>?w=572&strip=all" alt="" />
+ </div>
+ <?php } else { ?>
+ <div class="theme-screenshot blank"></div>
+ <?php } ?>
+ <span class="more-details"><?php _ex( 'More Info', 'theme', 'wporg-themes' ); ?></span>
+ <div class="theme-author"><?php printf( _x( 'By %s', 'theme author', 'wporg-themes' ), '<span class="author">' . esc_html( $theme->author->display_name ) . '</span>' ); ?></div>
+ <h3 class="theme-name entry-title"><?php echo esc_html( $theme->name ); ?></h3>
+ </a>
+ <div class="theme-actions">
+ <a class="button button-primary preview install-theme-preview" href="<?php echo esc_url( $theme->download_link ); ?>"><?php esc_html_e( 'Download', 'wporg-themes' ); ?></a>
+ </div>
+</article>
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of file
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgthemesviewtemplatesthemesinglephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/view-templates/theme-single.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/view-templates/theme-single.php 2015-04-18 16:45:18 UTC (rev 1488)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/view-templates/theme-single.php 2015-04-20 02:17:13 UTC (rev 1489)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -16,18 +16,18 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> <div>
</span><span class="cx" style="display: block; padding: 0 10px"> <h3 class="theme-name entry-title" itemprop="name">{{{ data.name }}}</h3>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <h4 class="theme-author"><?php printf( _x( 'By %s', 'theme author', 'wporg-themes' ), '<a href="https://wordpress.org/themes/author/{{ data.author.user_nicename }}/"><span class="author" itemprop="author">{{{ data.author.display_name }}}</span></a>' ); ?></h4>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <h4 class="theme-author"><?php printf( _x( 'By %s', 'theme author', 'wporg-themes' ), '<a href="{{{ data.path }}}author/{{ data.author.user_nicename }}/"><span class="author" itemprop="author">{{{ data.author.display_name }}}</span></a>' ); ?></h4>
</ins><span class="cx" style="display: block; padding: 0 10px"> </div>
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> <div class="theme-head">
</span><span class="cx" style="display: block; padding: 0 10px"> <div class="theme-actions clear">
</span><span class="cx" style="display: block; padding: 0 10px"> <a href="{{{ data.preview_url }}}" class="button button-secondary alignleft"><?php _e( 'Preview', 'wporg-themes' ); ?></a>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <a href="//downloads.wordpress.org/theme/{{ data.slug }}.{{ data.version }}.zip" class="button button-primary alignright"><?php _e( 'Download', 'wporg-themes' ); ?></a>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <a href="{{ data.download_link }}" class="button button-primary alignright"><?php _e( 'Download', 'wporg-themes' ); ?></a>
</ins><span class="cx" style="display: block; padding: 0 10px"> </div>
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> <# if ( data.parent ) { #>
</span><span class="cx" style="display: block; padding: 0 10px"> <div class="theme-notice notice notice-info">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <p class="parent"><?php printf( __( 'This is a child theme of %s.', 'wporg-themes' ), sprintf( '<a href="/themes/%1$s/">%2$s</a>', '{{{ data.parent.slug }}}', '{{{ data.parent.name }}}' ) ); ?></p>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <p class="parent"><?php printf( __( 'This is a child theme of %s.', 'wporg-themes' ), sprintf( '<a href="%1$s">%2$s</a>', '{{{ data.path }}}{{{ data.parent.slug }}}/', '{{{ data.parent.name }}}' ) ); ?></p>
</ins><span class="cx" style="display: block; padding: 0 10px"> </div>
</span><span class="cx" style="display: block; padding: 0 10px"> <# } #>
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgthemesviewtemplatesthemephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/view-templates/theme.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/view-templates/theme.php 2015-04-18 16:45:18 UTC (rev 1488)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/view-templates/theme.php 2015-04-20 02:17:13 UTC (rev 1489)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -12,6 +12,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <h3 class="theme-name entry-title">{{{ data.name }}}</h3>
</span><span class="cx" style="display: block; padding: 0 10px"> </a>
</span><span class="cx" style="display: block; padding: 0 10px"> <div class="theme-actions">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <a class="button button-primary preview install-theme-preview" href="//downloads.wordpress.org/theme/{{ data.slug }}.{{ data.version }}.zip"><?php esc_html_e( 'Download', 'wporg-themes' ); ?></a>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <a class="button button-primary preview install-theme-preview" href="{{ data.download_link }}"><?php esc_html_e( 'Download', 'wporg-themes' ); ?></a>
</ins><span class="cx" style="display: block; padding: 0 10px"> </div>
</span><span class="cx" style="display: block; padding: 0 10px"> </script>
</span></span></pre>
</div>
</div>
</body>
</html>