Avoid Strict Standards warnings. Props markoheijnen. see #6821
git-svn-id: https://develop.svn.wordpress.org/trunk@22119 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
7ba5099795
commit
a664c2d080
|
@ -32,7 +32,7 @@ class WP_Image_Editor_GD extends WP_Image_Editor {
|
|||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public static function test() {
|
||||
public function test() {
|
||||
if ( ! extension_loaded('gd') || ! function_exists('gd_info') )
|
||||
return false;
|
||||
|
||||
|
@ -99,7 +99,7 @@ class WP_Image_Editor_GD extends WP_Image_Editor {
|
|||
* @param string $mime_type
|
||||
* @return boolean
|
||||
*/
|
||||
public static function supports_mime_type( $mime_type ) {
|
||||
public function supports_mime_type( $mime_type ) {
|
||||
$allowed_mime_types = array( 'image/gif', 'image/png', 'image/jpeg' );
|
||||
|
||||
return in_array( $mime_type, $allowed_mime_types );
|
||||
|
|
|
@ -33,7 +33,7 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor {
|
|||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public static function test() {
|
||||
public function test() {
|
||||
if ( ! extension_loaded( 'imagick' ) )
|
||||
return false;
|
||||
|
||||
|
@ -143,7 +143,7 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor {
|
|||
* @param string $mime_type
|
||||
* @return boolean
|
||||
*/
|
||||
public static function supports_mime_type( $mime_type ) {
|
||||
public function supports_mime_type( $mime_type ) {
|
||||
if ( ! $mime_type )
|
||||
return false;
|
||||
|
||||
|
|
|
@ -76,9 +76,9 @@ abstract class WP_Image_Editor {
|
|||
return self::$implementation;
|
||||
}
|
||||
|
||||
abstract public static function test(); // returns bool
|
||||
abstract public function test(); // returns bool
|
||||
abstract protected function load(); // returns bool|WP_Error
|
||||
abstract public static function supports_mime_type( $mime_type ); // returns bool
|
||||
abstract public function supports_mime_type( $mime_type ); // returns bool
|
||||
abstract public function resize( $max_w, $max_h, $crop = false );
|
||||
abstract public function multi_resize( $sizes );
|
||||
abstract public function crop( $src_x, $src_y, $src_w, $src_h, $dst_w = null, $dst_h = null, $src_abs = false );
|
||||
|
|
Loading…
Reference in New Issue