richtabor / MerlinWP

Better WordPress Theme Onboarding
https://merlinwp.com
GNU General Public License v3.0
690 stars 138 forks source link

Doesn't work with Elementor #202

Open DeoThemes opened 3 years ago

DeoThemes commented 3 years ago

I was hoping to use this class in our themes, but it fails with Elementor content import. It doesn't properly import Elementor meta. I tried to add a fix from OCDI in WXR Importer.php in import method, but it still fails:

/*
* Elementor fix for excessive use of `wp_slash` after our update v3.0.2.
* Method in Elementor: \Elementor\Compatibility::register_actions
* https://wordpress.org/support/topic/version-2-6-0-breaks-every-elementor-theme/
*
* This can be removed after Elementor skips the functionality in above method if our plugin is in use.
*/
if ( method_exists( '\Elementor\Compatibility', 'on_wxr_importer_pre_process_post_meta' ) ) {
    remove_action( 'wxr_importer.pre_process.post_meta', array( 'Elementor\Compatibility', 'on_wxr_importer_pre_process_post_meta' ) );
}