Make WordPress Core

Ticket #25183: wp-disable-imagick.patch

File wp-disable-imagick.patch, 890 bytes (added by fierevere, 13 years ago)

simple patch for define('WP_DISABLE_IMAGICK')

  • wp-includes/media.php

    diff -urN wordpress-3.6.org/wp-includes/media.php wordpress/wp-includes/media.php
    old new  
    15361536        require_once ABSPATH . WPINC . '/class-wp-image-editor-gd.php';
    15371537        require_once ABSPATH . WPINC . '/class-wp-image-editor-imagick.php';
    15381538
    1539         $implementations = apply_filters( 'wp_image_editors',
    1540                 array( 'WP_Image_Editor_Imagick', 'WP_Image_Editor_GD' ) );
     1539if ( defined( 'WP_DISABLE_IMAGICK' ) )
     1540        $implementations = apply_filters( 'wp_image_editors', array( 'WP_Image_Editor_GD' ) );
     1541else
     1542        $implementations = apply_filters( 'wp_image_editors', array( 'WP_Image_Editor_Imagick', 'WP_Image_Editor_GD' ) );
    15411543
    15421544        foreach ( $implementations as $implementation ) {
    15431545                if ( ! call_user_func( array( $implementation, 'test' ), $args ) )