]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/author-template.php
Wordpress 2.9-scripts
[autoinstalls/wordpress.git] / wp-includes / author-template.php
index 908e233543816c9e4633023a465823aa4c79a38a..51ff8a97ae50069832743d2a6d87b3ca268ca1cf 100644 (file)
@@ -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);
 }
 
 /**
@@ -178,12 +178,13 @@ function the_author_posts() {
  */
 function the_author_posts_link($deprecated = '') {
        global $authordata;
-       printf(
+       $link = sprintf(
                '<a href="%1$s" title="%2$s">%3$s</a>',
                get_author_posts_url( $authordata->ID, $authordata->user_nicename ),
                esc_attr( sprintf( __( 'Posts by %s' ), get_the_author() ) ),
                get_the_author()
        );
+       echo apply_filters( 'the_author_posts_link', $link );
 }
 
 /**