WordPress.org

Make WordPress Core

Ticket #22538: 22538.3.diff

File 22538.3.diff, 999 bytes (added by scribu, 3 years ago)

'image_editors' only

  • wp-includes/media.php

    diff --git wp-includes/media.php wp-includes/media.php
    index 131873a..74aa05b 100644
    function wp_get_image_editor( $path, $args = array() ) { 
    11611161                        $args['mime_type'] = $file_info['type']; 
    11621162        } 
    11631163 
    1164         $implementation = apply_filters( 'wp_image_editor_class', _wp_image_editor_choose( $args ) ); 
     1164        $implementation = _wp_image_editor_choose( $args ); 
    11651165 
    11661166        if ( $implementation ) { 
    11671167                $editor = new $implementation( $path ); 
     1168 
    11681169                $loaded = $editor->load(); 
    11691170 
    11701171                if ( is_wp_error( $loaded ) ) 
    function _wp_image_editor_choose( $args = array() ) { 
    12031204        require_once ABSPATH . WPINC . '/class-wp-image-editor-gd.php'; 
    12041205        require_once ABSPATH . WPINC . '/class-wp-image-editor-imagick.php'; 
    12051206 
    1206         $implementations = apply_filters( 'wp_image_editors', 
     1207        $implementations = apply_filters( 'image_editors', 
    12071208                array( 'WP_Image_Editor_Imagick', 'WP_Image_Editor_GD' ) ); 
    12081209 
    12091210        foreach ( $implementations as $implementation ) {