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件) →