Making WordPress.org


Ignore:
Timestamp:
02/21/2015 08:30:48 AM (10 years ago)
Author:
Otto42
Message:

W.org themes: Add user nicename and displayname to query response in functions.php, change view-template for theme-single.php to display the author information correctly. #745

File:
1 edited

Legend:

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

    r1278 r1293  
    183183    foreach ( $api->themes as &$theme ) {
    184184        $theme->name           = wp_kses( $theme->name,        $themes_allowedtags );
     185
     186        // add in the nicename for the url, and the displayname for the display
     187        $user = get_user_by('login', $theme->author);
     188        $theme->authorurl      = $user->user_nicename;
     189        $theme->authordispname = wp_kses( $user->display_name, $themes_allowedtags );
     190       
    185191        $theme->author         = wp_kses( $theme->author,      $themes_allowedtags );
    186192        $theme->version        = wp_kses( $theme->version,     $themes_allowedtags );
Note: See TracChangeset for help on using the changeset viewer.