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
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