Skip to content

Commit

Permalink
Merge pull request #50 from humanmade/backport-46-to-v2-branch
Browse files Browse the repository at this point in the history
Backport #46 to v2-branch: Check tachyon is enabled before loading smart media
  • Loading branch information
roborourke authored Nov 18, 2019
2 parents 10b0b0f + a2510e0 commit 8c0f86e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion inc/namespace.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ function load_plugins() {
require_once $vendor_dir . '/humanmade/tachyon-plugin/tachyon.php';
}

if ( $config['smart-media'] ) {
// Smart Media requires Tachyon to work.
if ( $config['tachyon'] && $config['smart-media'] ) {
require_once $vendor_dir . '/humanmade/smart-media/plugin.php';
remove_filter( 'intermediate_image_sizes_advanced', 'HM\\Media\\Cropper\\prevent_thumbnail_generation' );
}
Expand Down

0 comments on commit 8c0f86e

Please sign in to comment.