feat: make rel attribute filterable on company website, Twitter, and apply URL links#2929
feat: make rel attribute filterable on company website, Twitter, and apply URL links#2929masteradhoc wants to merge 6 commits intoAutomattic:trunkfrom
Conversation
|
Imho these are all good changes. However I'm not an internet marketing specialist, not sure how that may affect existing and future uses (I am aware some people are very sensitive about the |
|
@azaozz Thanks for your response! There definately could be a post about it though i think the PR offers a consistent default now. The only thing that for sure could be a do follow is the company website but that was already nofollow and is now filterable just in case for those that want to modify it. |
|
@azaozz @donnchawp i just fixed the merge conflicts here. can we get another review on this one? |
Fixes #1497
Changes Proposed in this Pull Request
relattribute on the company website link (single job listing view) is now controlled by thejob_manager_company_link_relfilter. Default remainsnofollow(no behaviour change).relattribute on the company Twitter link is now controlled by the samejob_manager_company_link_relfilter, withnofollowas the default. Previously this link had norelattribute.relattribute on the apply via URL link is now controlled by a dedicatedjob_manager_application_url_relfilter. Default remainsnofollow(no behaviour change).Testing Instructions
rel="nofollow"— identical to previous behaviour.functions.phpand repeat step 2:Confirm neither the website nor the Twitter link has a
relattribute.Replace with a type-specific override and repeat:
Confirm the website link has no
reland the Twitter link retainsrel="nofollow".Test the apply URL filter:
Confirm the apply link renders without a
relattribute.Test full security attributes:
rel="nofollow noopener noreferrer".Release Notes
relattribute, allowing site owners to control nofollow/dofollow behaviour without overriding templates.New or Updated Hooks and Templates
job_manager_company_link_relrelon company website and Twitter links. Args:$rel(string),$type('website'|'twitter'),$post(WP_Post).job_manager_application_url_relrelon the apply-by-URL link. Args:$rel(string),$apply(object).Modified templates (child theme overrides of these will need updating):
templates/content-single-job_listing-company.phptemplates/job-application-url.phpDeprecated Code
Screenshot / Video