Making WordPress.org


Ignore:
Timestamp:
10/27/2016 06:31:28 AM (9 years ago)
Author:
dd32
Message:

Plugin Directory: Add plugin committer management to the new plugin admin.

See #2111.

File:
1 edited

Legend:

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

    r4278 r4301  
    2929        $post = get_post();
    3030
    31         $contributors = (array) wp_list_pluck( (array)get_the_terms( $post, 'plugin_contributors' ), 'name' );
    32         $contributors = array_map( function( $user_nicename ) {
    33             return get_user_by( 'slug', $user_nicename );
    34         }, $contributors );
     31        if ( $contributors = get_the_terms( $post, 'plugin_contributors' ) ) {
     32            $contributors = (array) wp_list_pluck( $contributors, 'name' );
     33            $contributors = array_map( function( $user_nicename ) {
     34                return get_user_by( 'slug', $user_nicename );
     35            }, $contributors );
     36        } else {
     37            return;
     38        }
    3539
    3640        echo $args['before_widget'];
Note: See TracChangeset for help on using the changeset viewer.