Changeset 4197 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/api/routes/class-plugin.php
- Timestamp:
- 10/07/2016 04:44:39 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/api/routes/class-plugin.php
r3888 r4197 68 68 $result['contributors'] = array(); 69 69 70 $contributors = get_post_meta( $post_id, 'contributors', true ) ?: array( $post->user_login ); 70 if ( $contributors = get_the_terms( $post->ID, 'plugin_contributors' ) ) { 71 $contributors = wp_list_pluck( $contributors, 'slug' ); 72 } else { 73 $contributors = array(); 74 if ( $author = get_user_by( 'id', $post->post_author ) ) { 75 $contributors[] = $author->user_nicename; 76 } 77 } 71 78 foreach ( $contributors as $contributor ) { 72 79 $user = get_user_by( 'slug', $contributor );
Note: See TracChangeset
for help on using the changeset viewer.