Support » Plugin: Yoast Duplicate Post » Disable WPML integration

  • Resolved finex

    (@finex)


    Hi, would be possible to add an option to disable the WPML integration?

    Currently I’ve simply commented the line:

    require_once (dirname(__FILE__).'/compat/duplicate-post-wpml.php');

    🙂

Viewing 1 replies (of 1 total)
  • Add this to functions.php:

    
    /*
    *	Disable duplication of translated posts/pages
    */
    function theme_disable_duplicate_wpml_translations() {
    
    	if ( defined( 'ICL_SITEPRESS_VERSION' ) ) {
    
    		remove_action('dp_duplicate_page', 'duplicate_post_wpml_copy_translations', 10);
    		remove_action('dp_duplicate_post', 'duplicate_post_wpml_copy_translations', 10);
    
    	}
    
    }
    
    add_action( 'admin_init', 'theme_disable_duplicate_wpml_translations', 100 );
Viewing 1 replies (of 1 total)
  • The topic ‘Disable WPML integration’ is closed to new replies.