wp-bootstrap / wp-bootstrap-navwalker

A custom WordPress nav walker class to fully implement the Twitter Bootstrap 4.0+ navigation style (v3-branch available for Bootstrap 3) in a custom theme using the WordPress built in menu manager.
https://wp-bootstrap.github.io/wp-bootstrap-navwalker/
GNU General Public License v3.0
3.37k stars 1.94k forks source link

Add rel="noopener noreferrer" to target="_blank" #444

Closed IanDelMar closed 4 years ago

IanDelMar commented 5 years ago

Added to class Walker_Nav_Menu in WP 5.2

Fixes issue #425

pattonwebz commented 5 years ago

Did core recently add this as well to the walker and is the method in this PR the same method that they used?

Also should we enforce these values in as well when users have a custom 'rel' defined?

IanDelMar commented 5 years ago

It is the same method: https://core.trac.wordpress.org/changeset/45141/.

I read about concerns that some affiliate links won't monetize if rel="noopener noreferrer" is set. I don't know whether that is actually the case and was not interested enough to dig deeper. However, not adding rel="noopener noreferrer" when a custom rel is defined, would give users who would like to add affiliate links to their menu and are concerned about them not working the option to prevent the rel="noopener noreferrer".

IanDelMar commented 4 years ago

@pattonwebz closes #425.