Making WordPress.org


Ignore:
Timestamp:
04/20/2015 02:17:13 AM (9 years ago)
Author:
dd32
Message:

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.

File:
1 edited

Legend:

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

    r1481 r1489  
    1717            <div>
    1818                <h3 class="theme-name entry-title" itemprop="name">{{{ data.name }}}</h3>
    19                 <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>
     19                <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>
    2020            </div>
    2121
     
    2323                <div class="theme-actions clear">
    2424                    <a href="{{{ data.preview_url }}}" class="button button-secondary alignleft"><?php _e( 'Preview', 'wporg-themes' ); ?></a>
    25                     <a href="//downloads.wordpress.org/theme/{{ data.slug }}.{{ data.version }}.zip" class="button button-primary alignright"><?php _e( 'Download', 'wporg-themes' ); ?></a>
     25                    <a href="{{ data.download_link }}" class="button button-primary alignright"><?php _e( 'Download', 'wporg-themes' ); ?></a>
    2626                </div>
    2727
    2828                <# if ( data.parent ) { #>
    2929                <div class="theme-notice notice notice-info">
    30                     <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>
     30                    <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>
    3131                </div>
    3232                <# } #>
Note: See TracChangeset for help on using the changeset viewer.