diff --git wp-admin/includes/image-edit.php wp-admin/includes/image-edit.php
index f390b5e..0b06926 100644
|
|
|
class WP_Image_Editor_GD extends WP_Image_Editor { |
| 32 | 32 | * |
| 33 | 33 | * @return boolean |
| 34 | 34 | */ |
| 35 | | public static function test() { |
| | 35 | public function test() { |
| 36 | 36 | if ( ! extension_loaded('gd') || ! function_exists('gd_info') ) |
| 37 | 37 | return false; |
| 38 | 38 | |
| … |
… |
class WP_Image_Editor_GD extends WP_Image_Editor { |
| 99 | 99 | * @param string $mime_type |
| 100 | 100 | * @return boolean |
| 101 | 101 | */ |
| 102 | | public static function supports_mime_type( $mime_type ) { |
| | 102 | public function supports_mime_type( $mime_type ) { |
| 103 | 103 | $allowed_mime_types = array( 'image/gif', 'image/png', 'image/jpeg' ); |
| 104 | 104 | |
| 105 | 105 | return in_array( $mime_type, $allowed_mime_types ); |
diff --git wp-includes/class-wp-image-editor-imagick.php wp-includes/class-wp-image-editor-imagick.php
index 3e35775..7954206 100644
|
|
|
class WP_Image_Editor_Imagick extends WP_Image_Editor { |
| 33 | 33 | * |
| 34 | 34 | * @return boolean |
| 35 | 35 | */ |
| 36 | | public static function test() { |
| | 36 | public function test() { |
| 37 | 37 | if ( ! extension_loaded( 'imagick' ) ) |
| 38 | 38 | return false; |
| 39 | 39 | |
| … |
… |
class WP_Image_Editor_Imagick extends WP_Image_Editor { |
| 143 | 143 | * @param string $mime_type |
| 144 | 144 | * @return boolean |
| 145 | 145 | */ |
| 146 | | public static function supports_mime_type( $mime_type ) { |
| | 146 | public function supports_mime_type( $mime_type ) { |
| 147 | 147 | if ( ! $mime_type ) |
| 148 | 148 | return false; |
| 149 | 149 | |
diff --git wp-includes/class-wp-image-editor.php wp-includes/class-wp-image-editor.php
index 27df919..83c6b94 100644
|
|
|
abstract class WP_Image_Editor { |
| 76 | 76 | return self::$implementation; |
| 77 | 77 | } |
| 78 | 78 | |
| 79 | | abstract public static function test(); // returns bool |
| | 79 | abstract public function test(); // returns bool |
| 80 | 80 | abstract protected function load(); // returns bool|WP_Error |
| 81 | | abstract public static function supports_mime_type( $mime_type ); // returns bool |
| | 81 | abstract public function supports_mime_type( $mime_type ); // returns bool |
| 82 | 82 | abstract public function resize( $max_w, $max_h, $crop = false ); |
| 83 | 83 | abstract public function multi_resize( $sizes ); |
| 84 | 84 | abstract public function crop( $src_x, $src_y, $src_w, $src_h, $dst_w = null, $dst_h = null, $src_abs = false ); |