Ticket #37681: 37681.diff
File 37681.diff, 1.6 KB (added by , 7 years ago) |
---|
-
src/wp-admin/includes/image.php
function _load_image_to_edit_path( $atta 542 542 if ( $filepath && file_exists( $filepath ) ) { 543 543 if ( 'full' != $size && ( $data = image_get_intermediate_size( $attachment_id, $size ) ) ) { 544 544 /** 545 545 * Filters the path to the current image. 546 546 * 547 547 * The filter is evaluated for all image sizes except 'full'. 548 548 * 549 549 * @since 3.1.0 550 550 * 551 551 * @param string $path Path to the current image. 552 552 * @param string $attachment_id Attachment ID. 553 553 * @param string $size Size of the image. 554 554 */ 555 555 $filepath = apply_filters( 'load_image_to_edit_filesystempath', path_join( dirname( $filepath ), $data['file'] ), $attachment_id, $size ); 556 556 } 557 } elseif ( function_exists( 'fopen' ) && function_exists( 'ini_get' ) &&true == ini_get( 'allow_url_fopen' ) ) {557 } elseif ( function_exists( 'fopen' ) && true == ini_get( 'allow_url_fopen' ) ) { 558 558 /** 559 559 * Filters the image URL if not in the local filesystem. 560 560 * 561 561 * The filter is only evaluated if fopen is enabled on the server. 562 562 * 563 563 * @since 3.1.0 564 564 * 565 565 * @param string $image_url Current image URL. 566 566 * @param string $attachment_id Attachment ID. 567 567 * @param string $size Size of the image. 568 568 */ 569 569 $filepath = apply_filters( 'load_image_to_edit_attachmenturl', wp_get_attachment_url( $attachment_id ), $attachment_id, $size ); 570 570 } 571 571 572 572 /**