• Your JS link in cleanup-html.php on line 56 is relying on the wordpress function is_admin. For builders, that doesn’t come back as true because the URL isn’t wp-admin. I have changed it for my needs and it seems to work both in the backend editor and in AVADA live builder.

    I removed :

    // Insertion scripts
    function cleanup_html_admin_scripts() {
    	wp_register_script('cleanup_html_admin_scripts', plugin_url() . '/cleanup-html.js');
    	wp_enqueue_script('cleanup_html_admin_scripts');
    }
    if (is_admin()) {
    	add_action('init', 'cleanup_html_admin_scripts');
    }
    

    and added …

    
    add_action( 'after_wp_tiny_mce', 'custom_after_wp_tiny_mce' );
    function custom_after_wp_tiny_mce() {
        printf( '<script type="text/javascript" src="%s"></script>',  plugins_url('/cleanup-html.js', __FILE__) );
    }
    

    This then should load whenever the TinyMce editor is loaded.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Builders like divi and Avada’ is closed to new replies.