Make WordPress Core

Ticket #37681: 37681.diff

File 37681.diff, 1.6 KB (added by dd32, 7 years ago)
  • src/wp-admin/includes/image.php

    function _load_image_to_edit_path( $atta 
    542542        if ( $filepath && file_exists( $filepath ) ) {
    543543                if ( 'full' != $size && ( $data = image_get_intermediate_size( $attachment_id, $size ) ) ) {
    544544                        /**
    545545                         * Filters the path to the current image.
    546546                         *
    547547                         * The filter is evaluated for all image sizes except 'full'.
    548548                         *
    549549                         * @since 3.1.0
    550550                         *
    551551                         * @param string $path          Path to the current image.
    552552                         * @param string $attachment_id Attachment ID.
    553553                         * @param string $size          Size of the image.
    554554                         */
    555555                        $filepath = apply_filters( 'load_image_to_edit_filesystempath', path_join( dirname( $filepath ), $data['file'] ), $attachment_id, $size );
    556556                }
    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' ) ) {
    558558                /**
    559559                 * Filters the image URL if not in the local filesystem.
    560560                 *
    561561                 * The filter is only evaluated if fopen is enabled on the server.
    562562                 *
    563563                 * @since 3.1.0
    564564                 *
    565565                 * @param string $image_url     Current image URL.
    566566                 * @param string $attachment_id Attachment ID.
    567567                 * @param string $size          Size of the image.
    568568                 */
    569569                $filepath = apply_filters( 'load_image_to_edit_attachmenturl', wp_get_attachment_url( $attachment_id ), $attachment_id, $size );
    570570        }
    571571
    572572        /**