Changeset 5309
- Timestamp:
- 04/10/2017 08:44:33 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/widgets/class-contributors.php
r5121 r5309 28 28 public function widget( $args, $instance ) { 29 29 $post = get_post(); 30 $contributors = get_the_terms( 2, 'plugin_contributors' ); 30 31 31 if ( $contributors = get_the_terms( $post, 'plugin_contributors' )) {32 if ( $contributors ) { 32 33 $contributors = (array) wp_list_pluck( $contributors, 'name' ); 33 34 $contributors = array_map( function( $user_nicename ) { 34 35 return get_user_by( 'slug', $user_nicename ); 35 36 }, $contributors ); 36 } else { 37 $contributors = array_filter( $contributors ); 38 } 39 40 if ( ! $contributors ) { 37 41 return; 38 42 }
Note: See TracChangeset
for help on using the changeset viewer.