PeepSo Documentation

Filter: name parts

Hook
peepso_get_name_parts
Plugin PeepSo Foundation
Since 1.8.2
Status Active
Args
array

Description

This filter is used to gather and order “parts” used to display the user’s name. The default “parts” are: the real name (first name & last name), or username, depending on availability of the data and the settings.

Practical uses of this filter can include: changing the order of the name parts, adding a middle name or a nickname, removing last names from display etc.

When working with this filter, always assume you will have access to one or more parts, never assume a specific number.

For example, admin or user might decide to only show username (by using the “display name style” settings). Sometimes the real name has not been provided. In these cases the username will be available.

Sometimes the real name is used, but last name is missing – then only the first name will be available.

Limitations

Do not use this filter to add rich HTML to name parts. This should be done with actions: peepso_action_render_user_name_before and peepso_action_render_user_name_after.

Examples

Get 10% off and a free eBook!

Subscribe to our newsletter to get a welcome discount:  10% off your first purchase* and receive a  free eBook:

"The Secrets Of Successful Online Communities"

* The discount code can only be used once, on a new purchase, not a renewal or upgrade. Promotions can't be combined.