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개 →