wpml_is_translated_taxonomy
- タイプ
- filter
- カテゴリー
- コンテンツの翻訳状態の確認
- WPMLバージョン
- 3.5.2
説明
タクソノミーが翻訳可能に設定されているかどうかに応じて、TRUEまたはFALSEを返します。
引数
apply_filters( 'wpml_is_translated_taxonomy', null, string $taxonomy )
$taxonomy
(文字列) (必須) 確認するタクソノミー。category、post_tag、nav_menu、またはその他のデフォルトのタクソノミーを指定できます。
カスタムタクソノミーの場合は、カスタムタクソノミーのスラッグを追加してください。
使用例
例
//$is_translated will be TRUE if the taxonomy is set to be translatable and FALSE if it is not set to be translatable $is_translated = apply_filters( 'wpml_is_translated_taxonomy', NULL, 'categories' )
関連するフック
wpml_element_translation_type, wpml_is_translated_post_type, wpml_master_post_from_duplicate, wpml_post_duplicates, wpml_element_has_translations