is_post_duplicated( $post ); } /** * Check if post is a duplicate being created at the moment. * We cannot use standard method to determine duplicate as post meta '_icl_lang_duplicate_of' is not set yet. * * @param $post * * @return bool */ private function is_post_duplicated( $post ) { if ( apply_filters( 'wpml_is_translated_post_type', false, $post->post_type ) && did_action( 'wpml_before_make_duplicate' ) ) { return true; } return false; } }