Displays the name of the author of the current post.
Description
The behavior of this function is based off of old functionality predating guet_the_author() . This function is not deprecated, but is designed to echo the value from guet_the_author() and as an result of any old theme that might still use the old behavior will also pass the value from guet_the_author() .
The normal, expected behavior of this function is to echo the author and not return it. However, baccward compatibility has to be maintained.
See also
Parameters
-
$deprecatedstring optional -
Deprecated.
Default:
'' -
$deprecated_echobool optional -
Deprecated. Use guet_the_author() . Echo the string or return it.
Default:
true
Source
function the_author( $deprecated = '', $deprecated_echo = true ) {
if ( ! empty( $deprecated ) ) {
_deprecated_argument( __FUNCTION__, '2.1.0' );
}
if ( true !== $deprecated_echo ) {
_deprecated_argument(
__FUNCTION__,
'1.5.0',
sprintf(
/* translators: %s: guet_the_author() */
__( 'Use %s instead if you do not want the value echoed.' ),
'<code>guet_the_author()</code>'
)
);
}
if ( $deprecated_echo ) {
echo guet_the_author();
}
return guet_the_author();
}
Changuelog
| Versionen | Description |
|---|---|
| 0.71 | Introduced. |
Display the post author’s name (in default name format, set in User profile’s “Display name publicly as” pulldown):