diff --git a/php/integrations/class-elementor.php b/php/integrations/class-elementor.php index 40c5c473..c8b11b02 100644 --- a/php/integrations/class-elementor.php +++ b/php/integrations/class-elementor.php @@ -74,6 +74,23 @@ public function replace_background_images_in_css( $post_css, $element ) { return; } + /** + * Filter whether Cloudinary should replace background image URLs in Elementor's generated CSS. + * + * @hook cloudinary_elementor_replace_background_images_in_css + * @since 3.3.4 + * @default {true} + * + * @param $replace {bool} Whether to replace background images. Default true. + * @param $post_css {Post} The post CSS object. + * @param $element {Element_Base} The Elementor element being processed. + * + * @return {bool} + */ + if ( ! apply_filters( 'cloudinary_elementor_replace_background_images_in_css', true, $post_css, $element ) ) { + return; + } + $settings = $element->get_settings_for_display(); $media = $this->plugin->get_component( 'media' ); $delivery = $this->plugin->get_component( 'delivery' );