WPML
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

すべてのコンテンツの翻訳状態の確認フック(6件) →