Created
October 10, 2016 20:00
-
-
Save fearlex/e61ee26b6f9d6e951b3988d9a3a2c08e to your computer and use it in GitHub Desktop.
A Collection of Wordpress Snippets
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
// -- Changing Image Library Processor. Fix Http Error on Media Upload. | |
add_filter( 'wp_image_editors', 'prefix_image_editor_default_to_gd' ); | |
/** | |
* Changing Image Library Processor. | |
* | |
* @param $editors | |
* | |
* @return array | |
*/ | |
function prefix_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; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment