Ticket #58157: 58157.diff
File 58157.diff, 1.9 KB (added by , 12 months ago) |
---|
-
src/wp-includes/author-template.php
14 14 * Retrieves the author of the current post. 15 15 * 16 16 * @since 1.5.0 17 * @since 6.3.0 Returns an empty string if the author's display name is unknown. 17 18 * 18 19 * @global WP_User $authordata The current author's data. 19 20 * 20 21 * @param string $deprecated Deprecated. 21 * @return string |null The author's display name.22 * @return string The author's display name, empty string if unknown. 22 23 */ 23 24 function get_the_author( $deprecated = '' ) { 24 25 global $authordata; … … 32 33 * 33 34 * @since 2.9.0 34 35 * 35 * @param string |null$display_name The author's display name.36 * @param string $display_name The author's display name. 36 37 */ 37 return apply_filters( 'the_author', is_object( $authordata ) ? $authordata->display_name : null);38 return apply_filters( 'the_author', is_object( $authordata ) ? $authordata->display_name : '' ); 38 39 } 39 40 40 41 /** … … 55 56 * 56 57 * @param string $deprecated Deprecated. 57 58 * @param bool $deprecated_echo Deprecated. Use get_the_author(). Echo the string or return it. 58 * @return string |nullThe author's display name, from get_the_author().59 * @return string The author's display name, from get_the_author(). 59 60 */ 60 61 function the_author( $deprecated = '', $deprecated_echo = true ) { 61 62 if ( ! empty( $deprecated ) ) { … … 226 227 * 227 228 * @global WP_User $authordata The current author's data. 228 229 * 229 * @return string |nullAn HTML link if the author's url exist in user meta,230 * 230 * @return string An HTML link if the author's url exist in user meta, 231 * else the result of get_the_author(). 231 232 */ 232 233 function get_the_author_link() { 233 234 if ( get_the_author_meta( 'url' ) ) {