WPML
apply_filters( 'wpml_sub_setting', mixed|bool $default, string $key, string $sub_key )
Typ
filter
Kategorie
Sonstiges
WPML-Version
3.2

Beschreibung

Gibt den Wert einer WPML-Untereinstellung zurück.

Argumente

$default
(mixed|bool) (Erforderlich) Der zurückzugebende Wert, wenn der Einstellungs-Key nicht existiert. Auf false setzen, falls nicht verwendet
$key
(string) (Erforderlich) Der Namens-Key der Einstellungen, zu dem der Sub-Key gehört
$sub_key
(string) (Erforderlich) Der Sub-Key, dessen Wert zurückgegeben werden soll

Anwendungsbeispiel

Beispiel
// $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

Alle 30 Sonstiges-Hooks →