Created
October 7, 2015 03:41
-
-
Save gizalink/b3fa5f04a07625cef1d1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Default to GD | |
Plugin URI: http://wordpress.org/extend/plugins/default-to-gd | |
Description: Sets GD as default WP_Image_Editor class. | |
Author: Mike Schroder | |
Version: 1.0 | |
Author URI: http://www.getsource.net/ | |
*/ | |
function ms_image_editor_default_to_gd( $editors ) { | |
$gd_editor = 'WP_Image_Editor_GD'; | |
$editors = array_diff( $editors, array( $gd_editor ) ); | |
array_unshift( $editors, $gd_editor ); | |
return $editors; | |
} | |
add_filter( 'wp_image_editors', 'ms_image_editor_default_to_gd' ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment