Changeset 4139
- Timestamp:
- 08/30/2006 06:07:49 PM (19 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 2 edited
-
author-template.php (modified) (4 diffs)
-
deprecated.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/author-template.php
r4057 r4139 81 81 } 82 82 83 function the_author_link() { 84 if (get_the_author_url()) { 85 echo '<a href="' . get_the_author_url() . '" title="' . sprintf(__("Visit %s's website"), get_the_author()) . '" rel="external">' . get_the_author() . '</a>'; 86 } else { 87 the_author(); 88 } 89 } 90 83 91 function get_the_author_icq() { 84 92 global $authordata; … … 127 135 } 128 136 129 /* the_author_posts_link() requires no get_, use get_author_ link() */137 /* the_author_posts_link() requires no get_, use get_author_posts_url() */ 130 138 function the_author_posts_link($idmode='') { 131 139 global $authordata; 132 140 133 echo '<a href="' . get_author_ link(0,$authordata->ID, $authordata->user_nicename) . '" title="' . sprintf(__("Posts by %s"), wp_specialchars(the_author($idmode, false))) . '">' . the_author($idmode, false) . '</a>';134 } 135 136 function get_author_ link($echo = false,$author_id, $author_nicename = '') {141 echo '<a href="' . get_author_posts_url($authordata->ID, $authordata->user_nicename) . '" title="' . sprintf(__("Posts by %s"), wp_specialchars(the_author($idmode, false))) . '">' . the_author($idmode, false) . '</a>'; 142 } 143 144 function get_author_posts_url($author_id, $author_nicename = '') { 137 145 global $wpdb, $wp_rewrite, $post, $cache_userdata; 138 146 $auth_ID = $author_id; … … 154 162 $link = apply_filters('author_link', $link, $author_id, $author_nicename); 155 163 156 if ( $echo )157 echo $link;158 164 return $link; 159 165 } … … 196 202 $link = $name; 197 203 } else { 198 $link = '<a href="' . get_author_ link(0,$author->ID, $author->user_nicename) . '" title="' . sprintf(__("Posts by %s"), wp_specialchars($author->display_name)) . '">' . $name . '</a>';204 $link = '<a href="' . get_author_posts_url($author->ID, $author->user_nicename) . '" title="' . sprintf(__("Posts by %s"), wp_specialchars($author->display_name)) . '">' . $name . '</a>'; 199 205 200 206 if ( (! empty($feed_image)) || (! empty($feed)) ) { -
trunk/wp-includes/deprecated.php
r3941 r4139 478 478 } 479 479 480 // Deprecated. Use get_author_posts_url(). 481 function get_author_link($echo = false, $author_id, $author_nicename = '') { 482 $link = get_author_posts_link($author_id, $author_nicename); 483 484 if ( $echo ) 485 echo $link; 486 return $link; 487 } 488 480 489 ?>
Note: See TracChangeset
for help on using the changeset viewer.