WPML
apply_filters( 'wpml_sub_setting', mixed|bool $default, string $key, string $sub_key )
ประเภท
filter
หมวดหมู่
เบ็ดเตล็ด
เวอร์ชันของ WPML
3.2

คำอธิบาย

ส่งคืนค่าการตั้งค่าย่อยของ WPML

อาร์กิวเมนต์

$default
(mixed|bool) (จำเป็น) ค่าที่จะส่งคืนหากไม่มีคีย์การตั้งค่าอยู่ กำหนดเป็น false หากไม่ได้ใช้งาน
$key
(string) (จำเป็น) คีย์ชื่อการตั้งค่าที่คีย์ย่อยสังกัดอยู่
$sub_key
(string) (จำเป็น) คีย์ย่อยที่ต้องการให้ส่งคืนค่า

ตัวอย่างการใช้งาน

ตัวอย่าง
// $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

ฮุก เบ็ดเตล็ด ทั้งหมด 30 รายการ →