Skip to content

Commit

Permalink
Make sure that image manipulation is supported.
Browse files Browse the repository at this point in the history
  • Loading branch information
Viper007Bond committed Dec 7, 2015
1 parent da86649 commit 4f3924e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion regenerate-thumbnails.php
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,12 @@ public function regenerate_interface() {

echo '<h1>' . __( 'Regenerate Thumbnails', 'regenerate-thumbnails' ) . "</h1>\n";

// Make sure image editing is supported
if ( ! wp_image_editor_supports() ) {
echo '<p>' . __( "Sorry but your server doesn't support image editing which means that WordPress can't create thumbnails. Please ask your host to install the Imagick or GD PHP extensions.", 'regenerate-thumbnails' ) . '</p>';
}
// Display the introduction page
if ( empty( $_POST['regenerate-thumbnails'] ) && empty( $_REQUEST['ids'] ) ) {
elseif ( empty( $_POST['regenerate-thumbnails'] ) && empty( $_REQUEST['ids'] ) ) {
$this->regenerate_interface_introduction();
}
// Regenerate button was pushed, so start the operation
Expand Down

0 comments on commit 4f3924e

Please sign in to comment.