Changeset 54335 for trunk/src/wp-includes/blocks/navigation-submenu.php
- Timestamp:
- 09/27/2022 05:30:41 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/blocks/navigation-submenu.php
r54257 r54335 184 184 $item_url = isset( $attributes['url'] ) ? $attributes['url'] : ''; 185 185 // Start appending HTML attributes to anchor tag. 186 $html .= '<a class="wp-block-navigation-item__content" href="' . esc_url( $item_url ) . '"'; 186 $html .= '<a class="wp-block-navigation-item__content"'; 187 188 // The href attribute on a and area elements is not required; 189 // when those elements do not have href attributes they do not create hyperlinks. 190 // But also The href attribute must have a value that is a valid URL potentially 191 // surrounded by spaces. 192 // see: https://html.spec.whatwg.org/multipage/links.html#links-created-by-a-and-area-elements. 193 if ( ! empty( $item_url ) ) { 194 $html .= ' href="' . esc_url( $item_url ) . '"'; 195 } 187 196 188 197 if ( $is_active ) {
Note: See TracChangeset
for help on using the changeset viewer.