Making WordPress.org

Changeset 10722


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

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

Fixes #2521.

Location:
sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory
Files:
2 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 {
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory/class-wporg-themes-upload.php

    r10721 r10722  
    904904                $post_meta = array(
    905905                        '_theme_url'    => $this->theme->get( 'ThemeURI' ),
     906                        '_author'       => $this->theme->get( 'Author' ),
    906907                        '_author_url'   => $this->theme->get( 'AuthorURI' ),
    907908                        '_requires'     => $this->sanitize_version_like_field( $this->theme->get( 'RequiresWP' ), 'requires' ),
Note: See TracChangeset for help on using the changeset viewer.