Changeset 55262
- Timestamp:
- 02/07/2023 02:33:44 PM (22 months ago)
- Location:
- trunk
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/post-template.php
r55094 r55262 1667 1667 } 1668 1668 1669 $link_html = "<a href='" . esc_url( $url ) . "'>$link_text</a>"; 1669 /** 1670 * Filters the list of attachment link attributes. 1671 * 1672 * @since 6.2.0 1673 * 1674 * @param array $attributes An array of attributes for the link markup, 1675 * keyed on the attribute name. 1676 * @param int $id Post ID. 1677 */ 1678 $attributes = apply_filters( 'wp_get_attachment_link_attributes', array( 'href' => $url ), $_post->ID ); 1679 1680 $link_attributes = ''; 1681 foreach ( $attributes as $name => $value ) { 1682 $value = 'href' === $name ? esc_url( $value ) : esc_attr( $value ); 1683 $link_attributes .= ' ' . esc_attr( $name ) . "='" . $value . "'"; 1684 } 1685 1686 $link_html = "<a$link_attributes>$link_text</a>"; 1670 1687 1671 1688 /**
Note: See TracChangeset
for help on using the changeset viewer.