Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elementor conflict #87

Open
MonsieurPilou opened this issue Feb 23, 2024 · 0 comments
Open

Elementor conflict #87

MonsieurPilou opened this issue Feb 23, 2024 · 0 comments

Comments

@MonsieurPilou
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant