Making WordPress.org

Changeset 4198


Ignore:
Timestamp:
10/07/2016 05:41:24 AM (5 years ago)
Author:
dd32
Message:

Plugin Directory: Base the [developers] shortcode off of Contributors rather than Contributors+Committers.
This is required after r4197.

See #1724

File:
1 edited

Legend:

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

    r3510 r4198  
    1616    static function display() {
    1717        $post         = get_post();
    18         $committers   = Tools::get_plugin_committers( $post->post_name );
    19         $contributors = get_post_meta( $post->ID, 'contributors', true );
    20         $contributors = array_unique( array_merge( $committers, $contributors ) );
     18
     19        if ( $contributors = get_the_terms( $post->ID, 'plugin_contributors' ) ) {
     20            $contributors = wp_list_pluck( $contributors, 'slug' );
     21        } else {
     22            $contributors = array();
     23            if ( $author = get_user_by( 'id', $post->post_author ) ) {
     24                $contributors[] = $author->user_nicename;
     25            }
     26        }
    2127        sort( $contributors, SORT_NATURAL );
    2228
    2329        $output = '<ul class="plugin-developers">';
    2430        foreach ( $contributors as $contributor_slug ) {
    25             $contributor = get_user_by( 'login', $contributor_slug );
     31            $contributor = get_user_by( 'slug', $contributor_slug );
    2632            if ( ! $contributor ) {
    2733                continue;
Note: See TracChangeset for help on using the changeset viewer.