300 | | $link = sprintf( |
301 | | '<a href="%1$s" title="%2$s" rel="author">%3$s</a>', |
302 | | esc_url( get_author_posts_url( $authordata->ID, $authordata->user_nicename ) ), |
303 | | /* translators: %s: Author's display name. */ |
304 | | esc_attr( sprintf( __( 'Posts by %s' ), get_the_author() ) ), |
305 | | get_the_author() |
306 | | ); |
| 300 | $url = get_author_posts_url( $authordata->ID, $authordata->user_nicename ); |
| 301 | if ( empty( $url ) || 'http://' === $url ) { |
| 302 | $link = get_the_author(); |
| 303 | } else { |
| 304 | $link = sprintf( |
| 305 | '<a href="%1$s" title="%2$s" rel="author">%3$s</a>', |
| 306 | esc_url( $url ), |
| 307 | /* translators: %s: Author's display name. */ |
| 308 | esc_attr( sprintf( __( 'Posts by %s' ), get_the_author() ) ), |
| 309 | get_the_author() |
| 310 | ); |
| 311 | } |