#1430 closed defect (bug) (fixed)
get_author_link does not work without $author_nicename defined
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | 1.5.2 |
| Component: | General | Keywords: | |
| Focuses: | Cc: |
Description
There appears to be a typo in get_author_link() function in template-functions-author.php, when it tries to get author's 'nicename' from user cache. Here's the patch (against revision 2621)
Index: wp-includes/template-functions-author.php
===================================================================
--- wp-includes/template-functions-author.php (revision 2621)
+++ wp-includes/template-functions-author.php (working copy)
@@ -131,7 +131,7 @@
$file = get_settings('home') . '/';
$link = $file . '?author=' . $auth_ID;
} else {
- if ('' == $author_nicename) $author_nicename = $cache_userdata[$author_id]->author_nicename;
+ if ('' == $author_nicename) $author_nicename = $cache_userdata[$author_id]->user_nicename;
$link = str_replace('%author%', $author_nicename, $link);
$link = get_settings('home') . trailingslashit($link);
}
Change History (3)
Note: See
TracTickets for help on using
tickets.
(In [2626]) Fix for get_author_link, fixes #1430