]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/author-template.php
WordPress 4.7.1-scripts
[autoinstalls/wordpress.git] / wp-includes / author-template.php
index 915805fcb9271a5f57adcbd60991259164e83580..b2b6ea3159e791fc1d666589b83fe3fa9667828f 100644 (file)
@@ -188,7 +188,12 @@ function the_author_meta( $field = '', $user_id = false ) {
  */
 function get_the_author_link() {
        if ( get_the_author_meta('url') ) {
-               return '<a href="' . esc_url( get_the_author_meta('url') ) . '" title="' . esc_attr( sprintf(__("Visit %s&#8217;s website"), get_the_author()) ) . '" rel="author external">' . get_the_author() . '</a>';
+               return sprintf( '<a href="%1$s" title="%2$s" rel="author external">%3$s</a>',
+                       esc_url( get_the_author_meta('url') ),
+                       /* translators: %s: author's display name */
+                       esc_attr( sprintf( __( 'Visit %s&#8217;s website' ), get_the_author() ) ),
+                       get_the_author()
+               );
        } else {
                return get_the_author();
        }
@@ -250,9 +255,9 @@ function get_the_author_posts_link() {
                return;
        }
 
-       $link = sprintf(
-               '<a href="%1$s" title="%2$s" rel="author">%3$s</a>',
+       $link = sprintf( '<a href="%1$s" title="%2$s" rel="author">%3$s</a>',
                esc_url( get_author_posts_url( $authordata->ID, $authordata->user_nicename ) ),
+               /* translators: %s: author's display name */
                esc_attr( sprintf( __( 'Posts by %s' ), get_the_author() ) ),
                get_the_author()
        );
@@ -412,7 +417,12 @@ function wp_list_authors( $args = '' ) {
                        $return .= '<li>';
                }
 
-               $link = '<a href="' . get_author_posts_url( $author->ID, $author->user_nicename ) . '" title="' . esc_attr( sprintf(__("Posts by %s"), $author->display_name) ) . '">' . $name . '</a>';
+               $link = sprintf( '<a href="%1$s" title="%2$s">%3$s</a>',
+                       get_author_posts_url( $author->ID, $author->user_nicename ),
+                       /* translators: %s: author's display name */
+                       esc_attr( sprintf( __( 'Posts by %s' ), $author->display_name ) ),
+                       $name
+               );
 
                if ( ! empty( $args['feed_image'] ) || ! empty( $args['feed'] ) ) {
                        $link .= ' ';