the_/get_the_ split. Patch from Owen Taylor.

git-svn-id: https://develop.svn.wordpress.org/trunk@1962 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2004-12-15 23:15:17 +00:00
parent 928966d6ce
commit 592eae2cdd
1 changed files with 62 additions and 18 deletions

View File

@ -1,6 +1,5 @@
<?php <?php
function get_the_author($idmode = '') {
function the_author($idmode = '', $echo = true) {
global $authordata; global $authordata;
if (empty($idmode)) { if (empty($idmode)) {
$idmode = $authordata->user_idmode; $idmode = $authordata->user_idmode;
@ -14,61 +13,106 @@ function the_author($idmode = '', $echo = true) {
if ($idmode == 'namelf') $id = $authordata->user_lastname.' '.$authordata->user_firstname; if ($idmode == 'namelf') $id = $authordata->user_lastname.' '.$authordata->user_firstname;
if (!$idmode) $id = $authordata->user_nickname; if (!$idmode) $id = $authordata->user_nickname;
if ($echo) echo $id;
return $id; return $id;
} }
function the_author_description() { function the_author($idmode = '', $echo = true) {
if ($echo) echo get_the_author($idmode);
return get_the_author($idmode);
}
function get_the_author_description() {
global $authordata; global $authordata;
echo $authordata->user_description; return $authordata->user_description;
}
function the_author_description() {
echo get_the_author_description();
}
function get_the_author_login() {
global $id,$authordata; return $authordata->user_login;
} }
function the_author_login() { function the_author_login() {
global $id,$authordata; echo $authordata->user_login; echo get_the_author_login();
} }
function get_the_author_firstname() {
global $id,$authordata; return $authordata->user_firstname;
}
function the_author_firstname() { function the_author_firstname() {
global $id,$authordata; echo $authordata->user_firstname; echo get_the_author_firstname();
} }
function get_the_author_lastname() {
global $id,$authordata; return $authordata->user_lastname;
}
function the_author_lastname() { function the_author_lastname() {
global $id,$authordata; echo $authordata->user_lastname; echo get_the_author_lastname();
} }
function get_the_author_nickname() {
global $id,$authordata; return $authordata->user_nickname;
}
function the_author_nickname() { function the_author_nickname() {
global $id,$authordata; echo $authordata->user_nickname; echo get_the_author_nickname();
} }
function get_the_author_ID() {
global $id,$authordata; return $authordata->ID;
}
function the_author_ID() { function the_author_ID() {
global $id,$authordata; echo $authordata->ID; echo get_the_author_id();
} }
function get_the_author_email() {
global $id,$authordata; return antispambot($authordata->user_email);
}
function the_author_email() { function the_author_email() {
global $id,$authordata; echo antispambot($authordata->user_email); echo get_the_author_email();
} }
function get_the_author_url() {
global $id,$authordata; return $authordata->user_url;
}
function the_author_url() { function the_author_url() {
global $id,$authordata; echo $authordata->user_url; echo get_the_author_url();
} }
function get_the_author_icq() {
global $id,$authordata; return $authordata->user_icq;
}
function the_author_icq() { function the_author_icq() {
global $id,$authordata; echo $authordata->user_icq; echo get_the_author_icq();
} }
function get_the_author_aim() {
global $id,$authordata; return str_replace(' ', '+', $authordata->user_aim);
}
function the_author_aim() { function the_author_aim() {
global $id,$authordata; echo str_replace(' ', '+', $authordata->user_aim); echo get_the_author_aim();
} }
function get_the_author_yim() {
global $id,$authordata; return $authordata->user_yim;
}
function the_author_yim() { function the_author_yim() {
global $id,$authordata; echo $authordata->user_yim; echo get_the_author_yim();
} }
function get_the_author_msn() {
global $id,$authordata; return $authordata->user_msn;
}
function the_author_msn() { function the_author_msn() {
global $id,$authordata; echo $authordata->user_msn; echo get_the_author_msn();
} }
function get_the_author_posts() {
global $id,$post; $posts=get_usernumposts($post->post_author); return $posts;
}
function the_author_posts() { function the_author_posts() {
global $id,$post; $posts=get_usernumposts($post->post_author); echo $posts; echo get_the_author_posts();
} }
/* the_author_posts_link() requires no get_, use get_author_link() */
function the_author_posts_link($idmode='') { function the_author_posts_link($idmode='') {
global $id, $authordata; global $id, $authordata;