WPML
apply_filters( 'wpml_sub_setting', mixed|bool $default, string $key, string $sub_key )
Loại
filter
Danh mục
Khác
Phiên bản WPML
3.2

Miêu tả

Trả về giá trị cài đặt phụ của WPML.

Đối số

$default
(mixed|bool) (Bắt buộc) Giá trị sẽ trả về nếu khóa cài đặt không tồn tại. Đặt thành false nếu không sử dụng
$key
(chuỗi văn bản) (Bắt buộc) Khóa tên cài đặt mà khóa phụ thuộc về
$sub_key
(chuỗi văn bản) (Bắt buộc) Khóa phụ cần lấy giá trị

Ví dụ sử dụng

Ví dụ
// $my_book_translation_option will return the translation option configured for the custom post type 'book'
$my_book_translation_option = apply_filters( 'wpml_sub_setting', false, 'custom_posts_sync_option', 'book' );

// $my_author_translation_option will return the translation option configured for the custom taxonomy 'author'
$my_author_translation_option = apply_filters( 'wpml_sub_setting', false, 'taxonomies_sync_option', 'author' );

icl_ls_languages, wpml_sync_custom_field_copied_value, wpml_ls_enable_ajax_navigation, wpml_element_type, wpml_setting, wpml_exclude_post_from_auto_translate, wpml_forms_config_ninja-forms, wpml_forms_config_wpforms, wpml_tf_feedback_open_link, wpml_translatable_user_meta_fields

Tất cả 30 hook Khác →