WPML
apply_filters( 'wpml_master_post_from_duplicate', int $post_id )
类型
filter
WPML 版本
3.2

说明

根据复制的文章 ID 返回原始文章 ID

参数

$post_id
(int) (必填) 复制的文章 ID

使用示例

示例
// $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 )

如果上述变量返回空字符串,则表明文章 ID 30 不是复制的文章。

wpml_element_translation_type, wpml_is_translated_post_type, wpml_is_translated_taxonomy, wpml_post_duplicates, wpml_element_has_translations

所有 6 个 查找内容的翻译状态 钩子 →