Avoid Strict Standards warnings. Props markoheijnen. see #6821
git-svn-id: http://core.svn.wordpress.org/trunk@22119 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
77518e9c71
commit
4d4d747adb
|
@ -32,7 +32,7 @@ class WP_Image_Editor_GD extends WP_Image_Editor {
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public static function test() {
|
public function test() {
|
||||||
if ( ! extension_loaded('gd') || ! function_exists('gd_info') )
|
if ( ! extension_loaded('gd') || ! function_exists('gd_info') )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@ class WP_Image_Editor_GD extends WP_Image_Editor {
|
||||||
* @param string $mime_type
|
* @param string $mime_type
|
||||||
* @return boolean
|
* @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' );
|
$allowed_mime_types = array( 'image/gif', 'image/png', 'image/jpeg' );
|
||||||
|
|
||||||
return in_array( $mime_type, $allowed_mime_types );
|
return in_array( $mime_type, $allowed_mime_types );
|
||||||
|
|
|
@ -33,7 +33,7 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor {
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public static function test() {
|
public function test() {
|
||||||
if ( ! extension_loaded( 'imagick' ) )
|
if ( ! extension_loaded( 'imagick' ) )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -143,7 +143,7 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor {
|
||||||
* @param string $mime_type
|
* @param string $mime_type
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public static function supports_mime_type( $mime_type ) {
|
public function supports_mime_type( $mime_type ) {
|
||||||
if ( ! $mime_type )
|
if ( ! $mime_type )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
|
@ -76,9 +76,9 @@ abstract class WP_Image_Editor {
|
||||||
return self::$implementation;
|
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 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 resize( $max_w, $max_h, $crop = false );
|
||||||
abstract public function multi_resize( $sizes );
|
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 );
|
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