fix: include directory slug in author profile links - #2957
Conversation
There was a problem hiding this comment.
The intended View Profile URLs now receive the listing directory slug, and the new helper works correctly in the tested paths. However, one single-listing author profile entry point remains unfixed.
Directorist_Single_Listing::user_avatar() still calls ATBDP_Permalink::get_user_profile_page_link( $this->author_id ) without passing the listing directory slug. In multi-directory mode, the avatar link therefore resolves to /author-profile/{user}/ instead of /author-profile/{user}/directory/{slug}/. I reproduced this locally with a Business listing.
Please reuse ATBDP_Permalink::get_listing_directory_type_slug( $this->id ) in this method and pass the result to get_user_profile_page_link(), then verify both the profile button and avatar link.
Local functional validation on commit 236c0fa confirmed the intended permalink paths pass; the avatar path above still lacks directory context.
PR Type
What kind of change does this PR introduce?
Description
The author profile link in the Author Info widget did not include the current listing directory type slug, so multi-directory author profile pages could open without the required directory context.
This PR resolves the listing directory type slug from the current listing and passes it to the author profile permalink generator for both the Author Info widget and the single listing Author Info section.
How to Test
business.View Profilelink in the Author Info widget or single listing Author Info section./author-profile/admin/directory/business/.Any linked issues
Fixes #
Checklist