Making WordPress.org

Changeset 1151


Ignore:
Timestamp:
01/16/2015 02:19:54 AM (10 years ago)
Author:
obenland
Message:

WP.org Themes: Make author archives and bb views work.

This will send the approriate request to the Themes API for
server-rendered themes.

See #745.

File:
1 edited

Legend:

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

    r1149 r1151  
    1717    'per_page' => 15,
    1818    'fields'   => array_merge( $GLOBALS['theme_field_defaults'], array(
    19         'parent'   => true,
     19        'parent' => true,
    2020    ) ),
    2121);
     
    2323if ( get_query_var( 'tag' ) ) {
    2424    $args['tag'][] = get_query_var( 'tag' );
    25 } else {
    26     $args['browse'] = get_query_var( 'attachment' ) ? get_query_var( 'attachment' ) : 'featured';
     25}
     26elseif ( get_query_var( 'author_name' ) ) {
     27    $args['author'] = get_query_var( 'author_name' );
     28}
     29else {
     30    $args['browse'] = 'featured';
     31
     32    if ( in_array( get_query_var( 'name' ), array( 'featured', 'popular', 'new' ) ) ) {
     33        $args['browse'] = get_query_var( 'name' );
     34    }
    2735}
    2836$themes = themes_api( 'query_themes', $args );
Note: See TracChangeset for help on using the changeset viewer.