Ticket #30355: get_author_posts_link.diff
| File get_author_posts_link.diff, 1.8 KB (added by , 11 years ago) |
|---|
-
author-template.php
211 211 } 212 212 213 213 /** 214 * Displayan HTML link to the author page of the author of the current post.214 * Get an HTML link to the author page of the author of the current post. 215 215 * 216 * Does just echo get_author_posts_url() function, like the others do. The 217 * reason for this, is that another function is used to help in printing the 218 * link to the author's posts. 216 * Returns an HTML-formatted link using get_author_posts_url(). 219 217 * 220 * @link http://codex.wordpress.org/Template_Tags/ the_author_posts_link221 * @since 1.2.0218 * @link http://codex.wordpress.org/Template_Tags/get_author_posts_link 219 * @since 4.1.0 222 220 * @param string $deprecated Deprecated. 223 221 */ 224 function the_author_posts_link($deprecated = '') {222 function get_author_posts_link($deprecated = '') { 225 223 if ( !empty( $deprecated ) ) 226 224 _deprecated_argument( __FUNCTION__, '2.1' ); 227 225 228 226 global $authordata; 229 if ( ! is_object( $authordata ) )227 if ( ! is_object( $authordata ) ) 230 228 return false; 231 229 $link = sprintf( 232 230 '<a href="%1$s" title="%2$s" rel="author">%3$s</a>', … … 242 240 * 243 241 * @param string $link HTML link. 244 242 */ 245 echoapply_filters( 'the_author_posts_link', $link );243 return apply_filters( 'the_author_posts_link', $link ); 246 244 } 247 245 246 248 247 /** 248 * Get an HTML link to the author page of the author of the current post. 249 * 250 * Echoes get_author_posts_link() function. 251 * 252 * @link http://codex.wordpress.org/Template_Tags/the_author_posts_link 253 * @since 1.2.0 254 * @param string $deprecated Deprecated. 255 */ 256 function the_author_posts_link() { 257 echo get_author_posts_link(); 258 } 259 260 /** 249 261 * Retrieve the URL to the author page for the user with the ID provided. 250 262 * 251 263 * @since 2.1.0