Changeset 3496
- Timestamp:
- 06/20/2016 10:03:29 AM (9 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/api/routes/class-plugin.php
r3440 r3496 58 58 $result['version'] = get_post_meta( $post_id, 'version', true ); 59 59 60 if ( get_post_meta( $post_id, 'header_author_uri', true ) ) { 61 $result['author'] = sprintf( '<a href="%s">%s</a>', get_post_meta( $post_id, 'header_author_uri', true ), get_post_meta( $post_id, 'header_author', true ) ); 62 } elseif ( get_post_meta( $post_id, 'header_author', true ) ) { 63 $result['author'] = get_post_meta( $post_id, 'header_author', true ); 64 } else { 65 $result['author'] = get_user_by( 'id', $post->post_author )->display_name; 60 $author = get_user_by( 'id', $post->post_author ); 61 $result['author'] = $author->display_name; 62 if ( $author->user_url ) { 63 $result['author'] = sprintf( '<a href="%s">%s</a>', $author->user_url, $result['author'] ); 66 64 } 67 65 … … 69 67 $result['contributors'] = array(); 70 68 71 $contributors = get_post_meta( $post_id, 'contributors', true ) ?: array( (int) $post->post_author);69 $contributors = get_post_meta( $post_id, 'contributors', true ) ?: array( $post->user_login ); 72 70 foreach ( $contributors as $contributor ) { 73 $user = is_int( $contributor ) ? get_user_by( 'id', $contributor ) :get_user_by( 'slug', $contributor );71 $user = get_user_by( 'slug', $contributor ); 74 72 if ( ! $user ) { 75 73 continue; -
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/standalone/class-plugins-info-api.php
r3368 r3496 221 221 222 222 case 'php' : 223 echo serialize( $response );223 echo serialize( (object) $response ); 224 224 break; 225 225
Note: See TracChangeset
for help on using the changeset viewer.