Changeset 4301 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/widgets/class-contributors.php
- Timestamp:
- 10/27/2016 06:31:28 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/widgets/class-contributors.php
r4278 r4301 29 29 $post = get_post(); 30 30 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 } 35 39 36 40 echo $args['before_widget'];
Note: See TracChangeset
for help on using the changeset viewer.