WPML
SignaturePHP
apply_filters( 'wpml_sub_setting', mixed|bool $default, string $key, string $sub_key )

Description

Returns a WPML sub setting value.

Arguments

  • $defaultmixed|boolRequired

    The value to return if the settings key does not exist. Set to false if not using
  • $keystringRequired

    The settings name key the sub key belongs to
  • $sub_keystringRequired

    The sub key to return the value of

Example Usage

PHP
// $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' );