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