Ticket #25229: author-template.3.patch
File author-template.3.patch, 3.0 KB (added by , 11 years ago) |
---|
-
wp-includes/author-template.php
26 26 if ( !empty( $deprecated ) ) 27 27 _deprecated_argument( __FUNCTION__, '2.1' ); 28 28 29 /** 30 * The display name of the current post's author. 31 * 32 * @since 2.9.0 33 * 34 * @param string $authordata->display_name The author's display name. 35 */ 29 36 return apply_filters('the_author', is_object($authordata) ? $authordata->display_name : null); 30 37 } 31 38 … … 71 78 function get_the_modified_author() { 72 79 if ( $last_id = get_post_meta( get_post()->ID, '_edit_last', true) ) { 73 80 $last_user = get_userdata($last_id); 81 82 /** 83 * The display name of author who last edited the current post. 84 * 85 * @since 2.8.0 86 * 87 * @param string $last_user->display_name The author's display name. 88 */ 74 89 return apply_filters('the_modified_author', $last_user->display_name); 75 90 } 76 91 } … … 108 123 109 124 $value = isset( $authordata->$field ) ? $authordata->$field : ''; 110 125 126 /** 127 * The value of the requested user metadata. 128 * 129 * The filter name is dynamic and depends on the $field parameter of the function. 130 * 131 * @since 2.8.0 132 * 133 * @param string The value of the metadata. 134 * @param int The user ID. 135 */ 111 136 return apply_filters( 'get_the_author_' . $field, $value, $user_id ); 112 137 } 113 138 … … 120 145 * @echo string The author's field from the current author's DB object. 121 146 */ 122 147 function the_author_meta($field = '', $user_id = false) { 148 /** 149 * The value of the requested user metadata. 150 * 151 * The filter name is dynamic and depends on the $field parameter of the function. 152 * 153 * @since 2.8.0 154 * 155 * @param string The value of the metadata. 156 * @param int The user ID. 157 */ 123 158 echo apply_filters('the_author_' . $field, get_the_author_meta($field, $user_id), $user_id); 124 159 } 125 160 … … 204 239 esc_attr( sprintf( __( 'Posts by %s' ), get_the_author() ) ), 205 240 get_the_author() 206 241 ); 242 243 /** 244 * The link to the author page of the author of the current post. 245 * 246 * @since 2.9.0 247 * 248 * @param string HTML link. 249 */ 207 250 echo apply_filters( 'the_author_posts_link', $link ); 208 251 } 209 252 … … 232 275 $link = home_url( user_trailingslashit( $link ) ); 233 276 } 234 277 278 /** 279 * The URL to the author's page. 280 * 281 * @since 2.1.0 282 * 283 * @param string $link The URL to the author's page. 284 * @param int $author_id The ID of an author. 285 * @param string $author_nicename Optional. The author's nice name. 286 */ 235 287 $link = apply_filters('author_link', $link, $author_id, $author_nicename); 236 288 237 289 return $link; … … 378 430 set_transient( 'is_multi_author', $is_multi_author ); 379 431 } 380 432 433 /** 434 * Whether the site has more than one author with published posts. 435 * 436 * @since 3.2.0 437 * 438 * @param bool $is_multi_author Whether $is_multi_author should evaluate as true. 439 */ 381 440 return apply_filters( 'is_multi_author', (bool) $is_multi_author ); 382 441 } 383 442