Use correct var. Update phpdoc. Props MichaelH, coffee2code. fixes #8776

git-svn-id: http://svn.automattic.com/wordpress/trunk@11142 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2009-04-30 19:55:29 +00:00
parent 30ee53dd96
commit 657826a931
1 changed files with 4 additions and 1 deletions

View File

@ -83,14 +83,16 @@ function the_modified_author() {
* Retrieve the requested data of the author of the current post. * Retrieve the requested data of the author of the current post.
* @link http://codex.wordpress.org/Template_Tags/the_author_meta * @link http://codex.wordpress.org/Template_Tags/the_author_meta
* @since 2.8.0 * @since 2.8.0
* @uses $authordata The current author's DB object (if $user_id not specified).
* @param string $field selects the field of the users record. * @param string $field selects the field of the users record.
* @param int $user_id Optional. User ID.
* @return string The author's field from the current author's DB object. * @return string The author's field from the current author's DB object.
*/ */
function get_the_author_meta($field = '', $user_id = false) { function get_the_author_meta($field = '', $user_id = false) {
if ( ! $user_id ) if ( ! $user_id )
global $authordata; global $authordata;
else else
$authordata = get_userdata( $auth_id ); $authordata = get_userdata( $user_id );
$field = strtolower($field); $field = strtolower($field);
$user_field = "user_$field"; $user_field = "user_$field";
@ -110,6 +112,7 @@ function get_the_author_meta($field = '', $user_id = false) {
* @link http://codex.wordpress.org/Template_Tags/the_author_meta * @link http://codex.wordpress.org/Template_Tags/the_author_meta
* @since 2.8.0 * @since 2.8.0
* @param string $field selects the field of the users record. * @param string $field selects the field of the users record.
* @param int $user_id Optional. User ID.
* @echo string The author's field from the current author's DB object. * @echo string The author's field from the current author's DB object.
*/ */
function the_author_meta($field = '', $user_id = false) { function the_author_meta($field = '', $user_id = false) {