WPML
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

所有 6 个 查找内容的翻译状态 钩子 →