Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Edson Galina Fortes

    (@glx77)

    Hi @webmark487,

    hope you’re fine ? Yes but we can easily disable it if you want :

    add_filter(‘the_content’, ‘display_draft_message’);

    function display_draft_message($content) {
    global $post;

    // Check if the post is in draft status
    if ($post->post_status == 'draft' || $post->post_status == 'private') {
        add_filter( 'weglot_active_translation_before_process', '__return_false' );
    }
    
    return $content;

    }

    let me know if it’s help you

    Regards

    Plugin Contributor Edson Galina Fortes

    (@glx77)

    Hi @webmark487,

    there is a mistake on my previous snippet. Here the good one :

    add_filter('the_content', 'display_draft_message');
    function display_draft_message($content) {
    global $post;
    if ($post->post_status == 'draft' || $post->post_status == 'private') {
    add_filter( 'weglot_active_translation_before_process', '__return_false' );
    }
    return $content;
    }

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘private pages and drafts also translated’ is closed to new replies.