Ticket #12892: get_author_link.diff
| File get_author_link.diff, 1.3 KB (added by , 16 years ago) |
|---|
-
wp-includes/author-template.php
128 128 } 129 129 130 130 /** 131 * Retrieve either author's link or author's name. 132 * 133 * If the author has a home page set, return an HTML link, otherwise just return the 134 * author's name. 135 * 136 * @uses get_the_author_meta() 137 * @uses get_the_author() 138 */ 139 function get_author_link() { 140 if ( get_the_author_meta('url') ) { 141 return '<a href="' . get_the_author_meta('url') . '" title="' . esc_attr( sprintf(__("Visit %s’s website"), get_the_author()) ) . '" rel="external">' . get_the_author() . '</a>'; 142 } else { 143 return get_the_author(); 144 } 145 } 146 147 /** 131 148 * Display either author's link or author's name. 132 149 * 133 150 * If the author has a home page set, echo an HTML link, otherwise just echo the … … 139 156 * @uses the_author() 140 157 */ 141 158 function the_author_link() { 142 if ( get_the_author_meta('url') ) { 143 echo '<a href="' . get_the_author_meta('url') . '" title="' . esc_attr( sprintf(__("Visit %s’s website"), get_the_author()) ) . '" rel="external">' . get_the_author() . '</a>'; 144 } else { 145 the_author(); 146 } 159 echo get_author_link(); 147 160 } 148 161 149 162 /**