wpml_is_translated_post_type
- タイプ
- filter
- カテゴリー
- コンテンツの翻訳状態の確認
- WPMLバージョン
- 3.1.5
説明
投稿タイプが翻訳可能に設定されているかどうかに応じて、TRUE または FALSE を返します。
引数
apply_filters( 'wpml_is_translated_post_type', null, string $post_type )$post_type
(文字列) (必須) 確認する投稿のタイプ。投稿、固定ページ、添付ファイル、リビジョンなど、任意の投稿タイプを指定できます。
カスタム投稿タイプの場合は、カスタム投稿タイプのスラッグを追加してください。
使用例
例
//$is_translated will be TRUE if the custom post is set to be translatable and FALSE if it is not set to be translatable $is_translated = apply_filters( 'wpml_is_translated_post_type', NULL, 'product' )
関連するフック
wpml_element_translation_type, wpml_is_translated_taxonomy, wpml_master_post_from_duplicate, wpml_post_duplicates, wpml_element_has_translations