Skip to content

Commit

Permalink
use constant to check if plugin is active
Browse files Browse the repository at this point in the history
  • Loading branch information
mxkae committed Nov 28, 2024
1 parent a54e771 commit 2f99f7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/block-components/image/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function stackable_load_image_optimizer_polyfill_frontend_script( $block_content
}
}

if ( ! is_admin() && is_plugin_active( 'ewww-image-optimizer/ewww-image-optimizer.php' )) {
if ( ! is_admin() && defined( 'EWWW_IMAGE_OPTIMIZER_PLUGIN_FILE' )) {
// Load the script in the frontend if EWWW Image Optimizer is active.
add_action( 'stackable/enqueue_scripts', 'stackable_load_image_optimizer_polyfill_frontend_script', 10, 2 );
}
Expand Down

0 comments on commit 2f99f7a

Please sign in to comment.