wp-carrington-core
wp-carrington-core copied to clipboard
role-{rolename}.php fix
Problem: role-{rolename}.php
was not working in any context
Solution: Changed parameter within cfct_username_to_id()
to retrieve a user object via the proper username (login) instead of the ID using the get_user_by()
function. Confirmed working in all contexts.
This doesn't appear to work when using default permalinks. Investigating further.
Slug parameter failed in cfct_username_to_id()
when the site is using default permalinks. Updated cfct_choose_general_template_role()
to use post object's author
(ID) variable if one is set and avoiding use of cfct_username_to_id()
, but falling back if no author
is set.
Confirmed functionality of role-{rolename}.php with both default and fancy permalinks and both single- and multi-word usernames. Ready for merge.