X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/d3b1ea255664edd2deef17f900a655613d20820d..refs/tags/wordpress-2.9:/wp-includes/author-template.php
diff --git a/wp-includes/author-template.php b/wp-includes/author-template.php
index 19e7b868..51ff8a97 100644
--- a/wp-includes/author-template.php
+++ b/wp-includes/author-template.php
@@ -22,7 +22,7 @@
*/
function get_the_author($deprecated = '') {
global $authordata;
- return apply_filters('the_author', $authordata->display_name);
+ return apply_filters('the_author', is_object($authordata) ? $authordata->display_name : null);
}
/**
@@ -104,7 +104,7 @@ function get_the_author_meta($field = '', $user_id = false) {
else
$value = isset($authordata->$field) ? $authordata->$field : '';
- return apply_filters('get_the_author_' . $field, $value);
+ return apply_filters('get_the_author_' . $field, $value, $user_id);
}
/**
@@ -116,7 +116,7 @@ function get_the_author_meta($field = '', $user_id = false) {
* @echo string The author's field from the current author's DB object.
*/
function the_author_meta($field = '', $user_id = false) {
- echo apply_filters('the_author_' . $field, get_the_author_meta($field, $user_id));
+ echo apply_filters('the_author_' . $field, get_the_author_meta($field, $user_id), $user_id);
}
/**
@@ -132,7 +132,7 @@ function the_author_meta($field = '', $user_id = false) {
*/
function the_author_link() {
if ( get_the_author_meta('url') ) {
- echo '' . get_the_author() . '';
+ echo '' . get_the_author() . '';
} else {
the_author();
}
@@ -178,12 +178,13 @@ function the_author_posts() {
*/
function the_author_posts_link($deprecated = '') {
global $authordata;
- printf(
+ $link = sprintf(
'%3$s',
get_author_posts_url( $authordata->ID, $authordata->user_nicename ),
- sprintf( __( 'Posts by %s' ), esc_attr( get_the_author() ) ),
+ esc_attr( sprintf( __( 'Posts by %s' ), get_the_author() ) ),
get_the_author()
);
+ echo apply_filters( 'the_author_posts_link', $link );
}
/**
@@ -292,7 +293,7 @@ function wp_list_authors($args = '') {
if ( ! $hide_empty )
$link = $name;
} else {
- $link = 'display_name)) . '">' . $name . '';
+ $link = 'display_name) ) . '">' . $name . '';
if ( (! empty($feed_image)) || (! empty($feed)) ) {
$link .= ' ';
@@ -301,8 +302,8 @@ function wp_list_authors($args = '') {
$link .= '';
+ $link .= "';
else
$link .= $name;