Closed douglas-johnson closed 1 year ago
user_nicename isn't always present for WordPress users
This seems to happen with users who were created when importing posts. Saving the user restores their user_nicename.
Are there any risks to using get_queried_object instead?
I can't find any difference between the result of cata_cap_get_queried_coauthor
and get_queried_object
so it seems we could use the later instead.
On author archives, the function
cata_cap_get_queried_coauthor
gets the coauthor by matching the query varauthor_name
with theuser_nicename
value for the author.However, user_nicename isn't always present for WordPress users.
get_queried_object
seems to fulfill this taks in a more complete way, because WordPress users are found even if they don't have a nicename.Are there any risks to using
get_queried_object
instead?