Making WordPress.org


Ignore:
Timestamp:
02/25/2021 06:48:39 AM (4 years ago)
Author:
dd32
Message:

Theme Directory: Include the Theme Author Name & URL in the extended_author object in API responses.

Fixes #2521.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory/class-themes-api.php

    r10635 r10722  
    682682        if ( $this->fields['extended_author'] ) {
    683683            $phil->author = (object) array(
     684                // WordPress.org user details.
    684685                'user_nicename' => $author->user_nicename,
    685686                'profile'       => 'https://profiles.wordpress.org/' . $author->user_nicename,
    686687                'avatar'        => 'https://secure.gravatar.com/avatar/' . md5( $author->user_email ) . '?s=96&d=monsterid&r=g',
    687688                'display_name'  => $author->display_name ?: $author->user_nicename,
     689
     690                // Theme headers details.
     691                'author'        => wporg_themes_get_version_meta( $theme->ID, '_author', $phil->version ),
     692                'author_url'    => wporg_themes_get_version_meta( $theme->ID, '_author_url', $phil->version ),
    688693            );
    689694        } else {
Note: See TracChangeset for help on using the changeset viewer.