diff --git wp-includes/media.php wp-includes/media.php
index 131873a..06bb9a8 100644
|
|
|
function wp_get_image_editor( $path, $args = array() ) { |
| 1161 | 1161 | $args['mime_type'] = $file_info['type']; |
| 1162 | 1162 | } |
| 1163 | 1163 | |
| 1164 | | $implementation = apply_filters( 'wp_image_editor_class', _wp_image_editor_choose( $args ) ); |
| | 1164 | $implementation = _wp_image_editor_choose( $args ); |
| 1165 | 1165 | |
| 1166 | 1166 | if ( $implementation ) { |
| 1167 | 1167 | $editor = new $implementation( $path ); |
| | 1168 | |
| | 1169 | $editor = apply_filters( 'image_editor_instance', $editor, $args ); |
| | 1170 | |
| 1168 | 1171 | $loaded = $editor->load(); |
| 1169 | 1172 | |
| 1170 | 1173 | if ( is_wp_error( $loaded ) ) |
| … |
… |
function _wp_image_editor_choose( $args = array() ) { |
| 1203 | 1206 | require_once ABSPATH . WPINC . '/class-wp-image-editor-gd.php'; |
| 1204 | 1207 | require_once ABSPATH . WPINC . '/class-wp-image-editor-imagick.php'; |
| 1205 | 1208 | |
| 1206 | | $implementations = apply_filters( 'wp_image_editors', |
| | 1209 | $implementations = apply_filters( 'image_editors', |
| 1207 | 1210 | array( 'WP_Image_Editor_Imagick', 'WP_Image_Editor_GD' ) ); |
| 1208 | 1211 | |
| 1209 | 1212 | foreach ( $implementations as $implementation ) { |