Skip Navigation
availability:

WPML Version: 3.2

description:

Returns the original post ID from the duplicated post ID

type:
filter
category:
Finding the Translation State of Content
parameters:
apply_filters( 'wpml_master_post_from_duplicate', int $post_id )
$post_id
(int) (Required) The duplicated post id
hook example usage:

Example

// $my_original_post will return the original post ID which was used to create post ID 30
$my_original_post = apply_filters( 'wpml_master_post_from_duplicate', 30 )

If the above variable returns an empty string this would indicate that post ID 30 is not a duplicated post.