Changeset 5204
- Timestamp:
- 03/30/2017 04:39:59 AM (8 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
r4900 r5204 68 68 $result['version'] = get_post_meta( $post_id, 'version', true ) ?: '0.0'; 69 69 70 $ author = get_user_by( 'id', $post->post_author );71 $result['author'] = $author->display_name;72 if ( $author->user_url ) {73 $result['author'] = sprintf( '<a href="%s">%s</a>', $author->user_url, $result['author'] );74 } 75 70 $result['author'] = strip_tags( get_post_meta( $post_id, 'header_author', true ) ) ?: get_user_by( 'id', $post->post_author )->display_name; 71 if ( false != ( $author_url = get_post_meta( $post_id, 'header_author_uri', true ) ) ) { 72 $result['author'] = sprintf( '<a href="%s">%s</a>', esc_url_raw( $author_url ), $result['author'] ); 73 } 74 75 // Profile of the original plugin submitter 76 76 $result['author_profile'] = $this->get_user_profile_link( $post->post_author ); 77 77 $result['contributors'] = array(); … … 224 224 $u = get_user_by( 'slug', $user ); 225 225 } 226 } 227 228 if ( ! $u ) { 229 return false; 226 230 } 227 231
Note: See TracChangeset
for help on using the changeset viewer.