Making WordPress.org

Changeset 3253


Ignore:
Timestamp:
05/25/2016 06:36:16 PM (9 years ago)
Author:
obenland
Message:

Plugin Directory: Developer shortcode improvements.

  • Includes now all contributors.
  • Fixed an issue where utf-8 strings were not displayed correctly.
  • Fixed an issue where contributors where not found by their slug.

See #1719.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/shortcodes/class-developers.php

    r3222 r3253  
    1414     */
    1515    static function display() {
    16         $post       = get_post();
    17         $committers = Tools::get_plugin_committers( $post->post_name );
     16        $post         = get_post();
     17        $committers   = Tools::get_plugin_committers( $post->post_name );
     18        $contributors = get_post_meta( $post->ID, 'contributors', true );
     19        $contributors = array_unique( array_merge( $committers, $contributors ) );
     20        sort( $contributors, SORT_NATURAL );
    1821
    1922        $output = '<ul class="plugin-developers">';
    20         foreach ( $committers as $committer_slug ) {
    21             $committer = get_user_by( 'slug', $committer_slug );
     23        foreach ( $contributors as $contributor_slug ) {
     24            $contributor = get_user_by( 'login', $contributor_slug );
    2225
    23             $output .= '<li>' . get_avatar( $committer->ID, 32 ) . $committer->display_name . '</li>';
     26            $output .= '<li>' . get_avatar( $contributor->ID, 32 ) . utf8_encode( $contributor->display_name ) . '</li>';
    2427        }
    2528        $output .= '</ul>';
Note: See TracChangeset for help on using the changeset viewer.