WPML
wpml_is_translated_taxonomy
Loại
filter
Phiên bản WPML
3.5.2

Miêu tả

Trả về TRUE hoặc FALSE tùy thuộc vào việc một phân loại đã được thiết lập là có thể dịch hay không.

Đối số

apply_filters( 'wpml_is_translated_taxonomy', null, string $taxonomy )

$taxonomy

(chuỗi) (Bắt buộc) Phân loại bạn muốn kiểm tra. Đây có thể là category, post_tag, nav_menu hoặc phân loại mặc định khác.

Đối với các phân loại tùy chỉnh, vui lòng thêm slug của phân loại tùy chỉnh đó.

Ví dụ sử dụng

Ví dụ
//$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

Tất cả 6 hook Tìm trạng thái dịch thuật của nội dung →