Make WordPress Core


Ignore:
Timestamp:
11/09/2012 07:38:54 PM (12 years ago)
Author:
ryan
Message:

WP_Image_Editor improvements.

  • Make test() and supports_mime_type() static.
  • Add required_methods argument to get_instance(). Allows requesting an implementation that has certain methods/capabilities.
  • Whitespace cleanup

Props markoheijnen
see #6821

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class-wp-image-editor-gd.php

    r22463 r22510  
    2929     *
    3030     * @since 3.5.0
    31      * @access protected
     31     * @access public
    3232     *
    3333     * @return boolean
    3434     */
    35     public function test() {
     35    public static function test( $args = null ) {
    3636        if ( ! extension_loaded('gd') || ! function_exists('gd_info') )
    3737            return false;
     
    100100     * @return boolean
    101101     */
    102     public function supports_mime_type( $mime_type ) {
     102    public static function supports_mime_type( $mime_type ) {
    103103        $allowed_mime_types = array( 'image/gif', 'image/png', 'image/jpeg' );
    104104
Note: See TracChangeset for help on using the changeset viewer.