Inpsyde\MultilingualPress\Widget\Dashboard\UntranslatedPosts\TypeSafePostRepository::is_post_translated PHP Method

is_post_translated() public method

Checks if the post with the given ID has been translated.
Since: 3.0.0
public is_post_translated ( integer $post_id ) : boolean
$post_id integer Optional. Post ID. Defaults to 0.
return boolean Whether or not the post with the given ID has been translated.
    public function is_post_translated($post_id = 0)
    {
        $post_id = (int) ($post_id ?: get_the_ID());
        if (get_post_meta($post_id, PostRepository::META_KEY, true)) {
            return true;
        }
        if (get_post_meta($post_id, PostRepository::DEPRECATED_META_KEY, true)) {
            $this->update_deprecated_post_meta($post_id);
            return true;
        }
        return false;
    }