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