Skip to content

Elementor conflict #87

Description

@MonsieurPilou

Hello,
I'm using the Elementor plugin and when I open the media window from an Elementor block, the "Crop featured image" button doesn't work.
There seems to be a conflict between elementor and this plugin: the plugin's JS is not loaded in the DOM.

I've managed to fix this by combining the 'init' and 'wp_footer' hooks and using 'wp_enqueue_script':
wp_enqueue_script( 'crop-thumbnails', WP_PLUGIN_URL . /crop-thumbnails/app/main.js', array('jquery'), '1.0', true );

At this point, app/main.js returns an error: ajaxurl is not defined

Is there a clean way of making Elementor work (elementor works as an iframe) with this plugin (WP media modal is inserted at the root of the DOM)?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions