Changeset 62494
- Timestamp:
- 06/12/2026 01:44:50 AM (4 weeks ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
-
wp-admin/includes/media.php (modified) (1 diff)
-
wp-includes/media.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/media.php
r62400 r62494 3388 3388 </div> 3389 3389 <div class="misc-pub-section misc-pub-download"> 3390 <a href="<?php echo esc_ attr( $att_url ); ?>" download><?php _e( 'Download file' ); ?></a>3390 <a href="<?php echo esc_url( $att_url ); ?>" download><?php _e( 'Download file' ); ?></a> 3391 3391 </div> 3392 3392 <div class="misc-pub-section misc-pub-filename"> -
trunk/src/wp-includes/media.php
r62455 r62494 4574 4574 'title' => $attachment->post_title, 4575 4575 'filename' => wp_basename( get_attached_file( $attachment->ID ) ), 4576 'url' => $attachment_url,4576 'url' => esc_url_raw( $attachment_url ), 4577 4577 'link' => get_attachment_link( $attachment->ID ), 4578 4578 'alt' => get_post_meta( $attachment->ID, '_wp_attachment_image_alt', true ), … … 4680 4680 'height' => $downsize[2], 4681 4681 'width' => $downsize[1], 4682 'url' => $downsize[0],4682 'url' => esc_url_raw( $downsize[0] ), 4683 4683 'orientation' => $downsize[2] > $downsize[1] ? 'portrait' : 'landscape', 4684 4684 ); … … 4696 4696 'height' => $height, 4697 4697 'width' => $width, 4698 'url' => $base_url . $size_meta['file'],4698 'url' => esc_url_raw( $base_url . $size_meta['file'] ), 4699 4699 'orientation' => $height > $width ? 'portrait' : 'landscape', 4700 4700 ); … … 4704 4704 if ( 'image' === $type ) { 4705 4705 if ( ! empty( $meta['original_image'] ) ) { 4706 $response['originalImageURL'] = wp_get_original_image_url( $attachment->ID ); 4706 $original_image_url = wp_get_original_image_url( $attachment->ID ); 4707 $response['originalImageURL'] = $original_image_url ? esc_url_raw( $original_image_url ) : ''; 4707 4708 $response['originalImageName'] = wp_basename( wp_get_original_image_path( $attachment->ID ) ); 4708 4709 } 4709 4710 4710 $sizes['full'] = array( 'url' => $attachment_url);4711 $sizes['full'] = array( 'url' => esc_url_raw( $attachment_url ) ); 4711 4712 4712 4713 if ( isset( $meta['height'], $meta['width'] ) ) { … … 4719 4720 } elseif ( $meta['sizes']['full']['file'] ) { 4720 4721 $sizes['full'] = array( 4721 'url' => $base_url . $meta['sizes']['full']['file'],4722 'url' => esc_url_raw( $base_url . $meta['sizes']['full']['file'] ), 4722 4723 'height' => $meta['sizes']['full']['height'], 4723 4724 'width' => $meta['sizes']['full']['width'], … … 4758 4759 if ( is_array( $response_image_full ) ) { 4759 4760 $response['image'] = array( 4760 'src' => $response_image_full[0],4761 'src' => esc_url_raw( $response_image_full[0] ), 4761 4762 'width' => $response_image_full[1], 4762 4763 'height' => $response_image_full[2], … … 4767 4768 if ( is_array( $response_image_thumb ) ) { 4768 4769 $response['thumb'] = array( 4769 'src' => $response_image_thumb[0],4770 'src' => esc_url_raw( $response_image_thumb[0] ), 4770 4771 'width' => $response_image_thumb[1], 4771 4772 'height' => $response_image_thumb[2],
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)