Changeset 52061
- Timestamp:
- 11/08/2021 11:05:50 PM (3 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/bookmark-template.php
r49688 r52061 103 103 } 104 104 $rel = $bookmark->link_rel; 105 106 $target = $bookmark->link_target; 107 if ( '' !== $target ) { 108 if ( is_string( $rel ) && '' !== $rel ) { 109 if ( ! str_contains( $rel, 'noopener' ) ) { 110 $rel = trim( $rel ) . ' noopener'; 111 } 112 } else { 113 $rel = 'noopener'; 114 } 115 116 $target = ' target="' . $target . '"'; 117 } 118 105 119 if ( '' !== $rel ) { 106 120 $rel = ' rel="' . esc_attr( $rel ) . '"'; 107 121 } 108 $target = $bookmark->link_target; 109 if ( '' !== $target ) { 110 $target = ' target="' . $target . '"'; 111 } 122 112 123 $output .= '<a href="' . $the_link . '"' . $rel . $title . $target . '>'; 113 124
Note: See TracChangeset
for help on using the changeset viewer.