Changeset 45540 for trunk/src/wp-admin/includes/image.php
- Timestamp:
- 06/15/2019 04:23:28 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/image.php
r45539 r45540 782 782 783 783 if ( $filepath && file_exists( $filepath ) ) { 784 $data = image_get_intermediate_size( $attachment_id, $size ); 785 786 if ( 'full' != $size && $data ) { 787 $filepath = path_join( dirname( $filepath ), $data['file'] ); 788 789 /** 790 * Filters the path to the current image. 791 * 792 * The filter is evaluated for all image sizes except 'full'. 793 * 794 * @since 3.1.0 795 * 796 * @param string $path Path to the current image. 797 * @param string $attachment_id Attachment ID. 798 * @param string $size Size of the image. 799 */ 800 $filepath = apply_filters( 'load_image_to_edit_filesystempath', $filepath, $attachment_id, $size ); 801 } 802 } elseif ( function_exists( 'fopen' ) && true === ini_get( 'allow_url_fopen' ) ) { 784 if ( 'full' !== $size ) { 785 $data = image_get_intermediate_size( $attachment_id, $size ); 786 787 if ( $data ) { 788 $filepath = path_join( dirname( $filepath ), $data['file'] ); 789 790 /** 791 * Filters the path to the current image. 792 * 793 * The filter is evaluated for all image sizes except 'full'. 794 * 795 * @since 3.1.0 796 * 797 * @param string $path Path to the current image. 798 * @param string $attachment_id Attachment ID. 799 * @param string $size Size of the image. 800 */ 801 $filepath = apply_filters( 'load_image_to_edit_filesystempath', $filepath, $attachment_id, $size ); 802 } 803 } 804 } elseif ( function_exists( 'fopen' ) && ini_get( 'allow_url_fopen' ) ) { 803 805 /** 804 806 * Filters the image URL if not in the local filesystem.
Note: See TracChangeset
for help on using the changeset viewer.