WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/09/2012 07:38:54 PM (7 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-imagick.php

    r22463 r22510  
    3030     *
    3131     * @since 3.5.0
    32      * @access protected
     32     * @access public
    3333     *
    3434     * @return boolean
    3535     */
    36     public function test() {
     36    public static function test( $args = null ) {
    3737        if ( ! extension_loaded( 'imagick' ) )
    3838            return false;
     
    144144     * @return boolean
    145145     */
    146     public function supports_mime_type( $mime_type ) {
     146    public static function supports_mime_type( $mime_type ) {
    147147        if ( ! $mime_type )
    148148            return false;
Note: See TracChangeset for help on using the changeset viewer.