Changeset 37035 for trunk/src/wp-admin/includes/ajax-actions.php
- Timestamp:
- 03/18/2016 08:04:19 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/ajax-actions.php
r36472 r37035 2576 2576 } 2577 2577 2578 $rel = '';2579 2578 $url = empty( $attachment['url'] ) ? '' : $attachment['url']; 2580 if ( strpos( $url, 'attachment_id') || get_attachment_link( $id ) == $url ) { 2581 $rel = 'attachment wp-att-' . $id; 2582 } 2579 $rel = ( strpos( $url, 'attachment_id') || get_attachment_link( $id ) == $url ); 2583 2580 2584 2581 remove_filter( 'media_send_to_editor', 'image_media_send_to_editor' ); … … 2601 2598 } else { 2602 2599 $html = isset( $attachment['post_title'] ) ? $attachment['post_title'] : ''; 2600 $rel = $rel ? ' rel="attachment wp-att-' . $id . '"' : ''; // Hard-coded string, $id is already sanitized 2601 2603 2602 if ( ! empty( $url ) ) { 2604 $html = '<a href="' . esc_url( $url ) . '"' . 'rel="' . esc_attr( $rel ). '">' . $html . '</a>';2603 $html = '<a href="' . esc_url( $url ) . '"' . $rel . '">' . $html . '</a>'; 2605 2604 } 2606 2605 }
Note: See TracChangeset
for help on using the changeset viewer.