This documentation describes unreleased changes on the main branch.

wp_user_name()

Twig function of the framework; its result is escaped like any value.

{{ wp_user_name(id) }}

The display name of a user, as text. Returns '' if the ID is null or the user does not exist.

<span class="author">{{ wp_user_name(attrs.author) }}</span>
ParameterTypeDefaultDescription
idint|nullrequiredID of the user.

Returns string