mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-29 07:37:44 +02:00
Avoid unnecesary call to get_userdata in get_permalink function. Props xknown. fixes #5414
git-svn-id: http://svn.automattic.com/wordpress/trunk@6352 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
7c033fd82c
commit
9a9521e01e
@ -82,8 +82,12 @@ function get_permalink($id = 0) {
|
|||||||
$category = get_category_parents($parent, FALSE, '/', TRUE) . $category;
|
$category = get_category_parents($parent, FALSE, '/', TRUE) . $category;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$author = '';
|
||||||
|
if ( strpos($permalink, '%author%') !== false ) {
|
||||||
$authordata = get_userdata($post->post_author);
|
$authordata = get_userdata($post->post_author);
|
||||||
$author = $authordata->user_nicename;
|
$author = $authordata->user_nicename;
|
||||||
|
}
|
||||||
|
|
||||||
$date = explode(" ",date('Y m d H i s', $unixtime));
|
$date = explode(" ",date('Y m d H i s', $unixtime));
|
||||||
$rewritereplace =
|
$rewritereplace =
|
||||||
array(
|
array(
|
||||||
|
Loading…
Reference in New Issue
Block a user