apply_filters( 'wpml_master_post_from_duplicate', int $post_id )
- Type
- filter
- WPML Version
- 3.2
Description
Returns the original post ID from the duplicated post ID
Arguments
- $post_id
- (int) (Required) The duplicated post id
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.
Related hooks
wpml_element_translation_type, wpml_is_translated_post_type, wpml_is_translated_taxonomy, wpml_post_duplicates, wpml_element_has_translations