the_author

The timeline below displays how wordpress function the_author has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.3

/**
 * Displays the name of the author of the current post.
 *
 * The behavior of this function is based off of old functionality predating
 * get_the_author(). This function is not deprecated, but is designed to echo
 * the value from get_the_author() and as an result of any old theme that might
 * still use the old behavior will also pass the value from get_the_author().
 *
 * The normal, expected behavior of this function is to echo the author and not
 * return it. However, backward compatibility has to be maintained.
 *
 * @since 0.71
 *
 * @see get_the_author()
 * @link https://developer.wordpress.org/reference/functions/the_author/
 *
 * @param string $deprecated      Deprecated.
 * @param bool   $deprecated_echo Deprecated. Use get_the_author(). Echo the string or return it.
 * @return string The author's display name, from get_the_author().
 */
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: get_the_author() */
            __('Use %s instead if you do not want the value echoed.'),
            '<code>get_the_author()</code>'
        ));
    }
    if ($deprecated_echo) {
        echo get_the_author();
    }
    return get_the_author();
}

WordPress Version: 6.1

/**
 * Displays the name of the author of the current post.
 *
 * The behavior of this function is based off of old functionality predating
 * get_the_author(). This function is not deprecated, but is designed to echo
 * the value from get_the_author() and as an result of any old theme that might
 * still use the old behavior will also pass the value from get_the_author().
 *
 * The normal, expected behavior of this function is to echo the author and not
 * return it. However, backward compatibility has to be maintained.
 *
 * @since 0.71
 *
 * @see get_the_author()
 * @link https://developer.wordpress.org/reference/functions/the_author/
 *
 * @param string $deprecated      Deprecated.
 * @param bool   $deprecated_echo Deprecated. Use get_the_author(). Echo the string or return it.
 * @return string|null The author's display name, from get_the_author().
 */
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: get_the_author() */
            __('Use %s instead if you do not want the value echoed.'),
            '<code>get_the_author()</code>'
        ));
    }
    if ($deprecated_echo) {
        echo get_the_author();
    }
    return get_the_author();
}

WordPress Version: 5.5

/**
 * Display the name of the author of the current post.
 *
 * The behavior of this function is based off of old functionality predating
 * get_the_author(). This function is not deprecated, but is designed to echo
 * the value from get_the_author() and as an result of any old theme that might
 * still use the old behavior will also pass the value from get_the_author().
 *
 * The normal, expected behavior of this function is to echo the author and not
 * return it. However, backward compatibility has to be maintained.
 *
 * @since 0.71
 *
 * @see get_the_author()
 * @link https://developer.wordpress.org/reference/functions/the_author/
 *
 * @param string $deprecated      Deprecated.
 * @param bool   $deprecated_echo Deprecated. Use get_the_author(). Echo the string or return it.
 * @return string|null The author's display name, from get_the_author().
 */
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: get_the_author() */
            __('Use %s instead if you do not want the value echoed.'),
            '<code>get_the_author()</code>'
        ));
    }
    if ($deprecated_echo) {
        echo get_the_author();
    }
    return get_the_author();
}

WordPress Version: 5.3

/**
 * Display the name of the author of the current post.
 *
 * The behavior of this function is based off of old functionality predating
 * get_the_author(). This function is not deprecated, but is designed to echo
 * the value from get_the_author() and as an result of any old theme that might
 * still use the old behavior will also pass the value from get_the_author().
 *
 * The normal, expected behavior of this function is to echo the author and not
 * return it. However, backward compatibility has to be maintained.
 *
 * @since 0.71
 * @see get_the_author()
 * @link https://developer.wordpress.org/reference/functions/the_author/
 *
 * @param string $deprecated      Deprecated.
 * @param bool   $deprecated_echo Deprecated. Use get_the_author(). Echo the string or return it.
 * @return string|null The author's display name, from get_the_author().
 */
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: get_the_author() */
            __('Use %s instead if you do not want the value echoed.'),
            '<code>get_the_author()</code>'
        ));
    }
    if ($deprecated_echo) {
        echo get_the_author();
    }
    return get_the_author();
}

WordPress Version: 5.2

/**
 * Display the name of the author of the current post.
 *
 * The behavior of this function is based off of old functionality predating
 * get_the_author(). This function is not deprecated, but is designed to echo
 * the value from get_the_author() and as an result of any old theme that might
 * still use the old behavior will also pass the value from get_the_author().
 *
 * The normal, expected behavior of this function is to echo the author and not
 * return it. However, backward compatibility has to be maintained.
 *
 * @since 0.71
 * @see get_the_author()
 * @link https://codex.wordpress.org/Template_Tags/the_author
 *
 * @param string $deprecated      Deprecated.
 * @param bool   $deprecated_echo Deprecated. Use get_the_author(). Echo the string or return it.
 * @return string|null The author's display name, from get_the_author().
 */
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',
            /* translators: %s: get_the_author() */
            sprintf(__('Use %s instead if you do not want the value echoed.'), '<code>get_the_author()</code>')
        );
    }
    if ($deprecated_echo) {
        echo get_the_author();
    }
    return get_the_author();
}

WordPress Version: 4.6

/**
 * Display the name of the author of the current post.
 *
 * The behavior of this function is based off of old functionality predating
 * get_the_author(). This function is not deprecated, but is designed to echo
 * the value from get_the_author() and as an result of any old theme that might
 * still use the old behavior will also pass the value from get_the_author().
 *
 * The normal, expected behavior of this function is to echo the author and not
 * return it. However, backward compatibility has to be maintained.
 *
 * @since 0.71
 * @see get_the_author()
 * @link https://codex.wordpress.org/Template_Tags/the_author
 *
 * @param string $deprecated Deprecated.
 * @param string $deprecated_echo Deprecated. Use get_the_author(). Echo the string or return it.
 * @return string|null The author's display name, from get_the_author().
 */
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',
            /* translators: %s: get_the_author() */
            sprintf(__('Use %s instead if you do not want the value echoed.'), '<code>get_the_author()</code>')
        );
    }
    if ($deprecated_echo) {
        echo get_the_author();
    }
    return get_the_author();
}

WordPress Version: 4.4

/**
 * Display the name of the author of the current post.
 *
 * The behavior of this function is based off of old functionality predating
 * get_the_author(). This function is not deprecated, but is designed to echo
 * the value from get_the_author() and as an result of any old theme that might
 * still use the old behavior will also pass the value from get_the_author().
 *
 * The normal, expected behavior of this function is to echo the author and not
 * return it. However, backwards compatibility has to be maintained.
 *
 * @since 0.71
 * @see get_the_author()
 * @link https://codex.wordpress.org/Template_Tags/the_author
 *
 * @param string $deprecated Deprecated.
 * @param string $deprecated_echo Deprecated. Use get_the_author(). Echo the string or return it.
 * @return string|null The author's display name, from get_the_author().
 */
function the_author($deprecated = '', $deprecated_echo = true)
{
    if (!empty($deprecated)) {
        _deprecated_argument(__FUNCTION__, '2.1');
    }
    if (true !== $deprecated_echo) {
        _deprecated_argument(
            __FUNCTION__,
            '1.5',
            /* translators: %s: get_the_author() */
            sprintf(__('Use %s instead if you do not want the value echoed.'), '<code>get_the_author()</code>')
        );
    }
    if ($deprecated_echo) {
        echo get_the_author();
    }
    return get_the_author();
}

WordPress Version: 4.3

/**
 * Display the name of the author of the current post.
 *
 * The behavior of this function is based off of old functionality predating
 * get_the_author(). This function is not deprecated, but is designed to echo
 * the value from get_the_author() and as an result of any old theme that might
 * still use the old behavior will also pass the value from get_the_author().
 *
 * The normal, expected behavior of this function is to echo the author and not
 * return it. However, backwards compatibility has to be maintained.
 *
 * @since 0.71
 * @see get_the_author()
 * @link https://codex.wordpress.org/Template_Tags/the_author
 *
 * @param string $deprecated Deprecated.
 * @param string $deprecated_echo Deprecated. Use get_the_author(). Echo the string or return it.
 * @return string|null The author's display name, from get_the_author().
 */
function the_author($deprecated = '', $deprecated_echo = true)
{
    if (!empty($deprecated)) {
        _deprecated_argument(__FUNCTION__, '2.1');
    }
    if ($deprecated_echo !== true) {
        _deprecated_argument(__FUNCTION__, '1.5', __('Use <code>get_the_author()</code> instead if you do not want the value echoed.'));
    }
    if ($deprecated_echo) {
        echo get_the_author();
    }
    return get_the_author();
}

WordPress Version: 4.2

/**
 * Display the name of the author of the current post.
 *
 * The behavior of this function is based off of old functionality predating
 * get_the_author(). This function is not deprecated, but is designed to echo
 * the value from get_the_author() and as an result of any old theme that might
 * still use the old behavior will also pass the value from get_the_author().
 *
 * The normal, expected behavior of this function is to echo the author and not
 * return it. However, backwards compatibility has to be maintained.
 *
 * @since 0.71
 * @see get_the_author()
 * @link https://codex.wordpress.org/Template_Tags/the_author
 *
 * @param string $deprecated Deprecated.
 * @param string $deprecated_echo Deprecated. Use get_the_author(). Echo the string or return it.
 * @return string The author's display name, from get_the_author().
 */
function the_author($deprecated = '', $deprecated_echo = true)
{
    if (!empty($deprecated)) {
        _deprecated_argument(__FUNCTION__, '2.1');
    }
    if ($deprecated_echo !== true) {
        _deprecated_argument(__FUNCTION__, '1.5', __('Use <code>get_the_author()</code> instead if you do not want the value echoed.'));
    }
    if ($deprecated_echo) {
        echo get_the_author();
    }
    return get_the_author();
}

WordPress Version: 3.7

/**
 * Display the name of the author of the current post.
 *
 * The behavior of this function is based off of old functionality predating
 * get_the_author(). This function is not deprecated, but is designed to echo
 * the value from get_the_author() and as an result of any old theme that might
 * still use the old behavior will also pass the value from get_the_author().
 *
 * The normal, expected behavior of this function is to echo the author and not
 * return it. However, backwards compatibility has to be maintained.
 *
 * @since 0.71
 * @see get_the_author()
 * @link http://codex.wordpress.org/Template_Tags/the_author
 *
 * @param string $deprecated Deprecated.
 * @param string $deprecated_echo Deprecated. Use get_the_author(). Echo the string or return it.
 * @return string The author's display name, from get_the_author().
 */
function the_author($deprecated = '', $deprecated_echo = true)
{
    if (!empty($deprecated)) {
        _deprecated_argument(__FUNCTION__, '2.1');
    }
    if ($deprecated_echo !== true) {
        _deprecated_argument(__FUNCTION__, '1.5', __('Use <code>get_the_author()</code> instead if you do not want the value echoed.'));
    }
    if ($deprecated_echo) {
        echo get_the_author();
    }
    return get_the_author();
}