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