Skip to content

Commit

Permalink
release: FIX
Browse files Browse the repository at this point in the history
- Resolved fatal error occurring with the "Image Box" widget when using Optimole DAM in Elementor.
- Improve error reporting in offloading process
  • Loading branch information
selul authored Sep 11, 2024
2 parents 0d87cec + cda3976 commit fa5eaec
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@
"php": ">=7.4",
"codeinwp/themeisle-sdk": "^3.3",
"codeinwp/optimole-sdk": "^1.2",
"enshrined/svg-sanitize": "^0.19.0"
"enshrined/svg-sanitize": "^0.20.0"
}
}
30 changes: 15 additions & 15 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions inc/dam.php
Original file line number Diff line number Diff line change
Expand Up @@ -628,11 +628,11 @@ public function alter_elementor_image_size( $html, $settings, $image_size_key, $

$all_sizes = $this->get_all_image_sizes();

if ( ! isset( $all_sizes[ $settings['image_size'] ] ) ) {
if ( ! isset( $all_sizes[ $image_size_key ] ) ) {
return $html;
}

return $this->replace_dam_url_args( $all_sizes[ $settings['image_size'] ], $html );
return $this->replace_dam_url_args( $all_sizes[ $image_size_key ], $html );
}

/**
Expand Down
2 changes: 1 addition & 1 deletion inc/media_offload.php
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,7 @@ public function rollback_and_update_images( $image_ids ) {
do_action( 'optml_log', ' download_url error ' );
}

self::$instance->logger->add_log( Optml_Logger::LOG_TYPE_ROLLBACK, 'Image ID: ' . $id . ' has error getting URL.' );
self::$instance->logger->add_log( Optml_Logger::LOG_TYPE_ROLLBACK, 'Image ID: ' . $id . ' has error downloading URL.' );
continue;
}

Expand Down

0 comments on commit fa5eaec

Please sign in to comment.