apply_filters( 'wpml_language_is_active', mixed $empty_value, string $language_code )
- Type
- filter
- Category
- Site-Wide Language Information
- WPML Version
- 3.2
Description
Returns TRUE or FALSE if a given language has been enabled.
Arguments
- $empty_value
- (mixed) (Required) This is normally the value the filter will be modifying. We are not filtering anything here so set this to NULL. This for the filter function to actually receive the full argument list
- $language_code
- (string) (Required) The language code to check. Accepts a 2-letter code like ‘en’
Example usage
Example
// $is_german_enabled will return TRUE if German is enabled and FALSE if not $is_german_enabled = apply_filters( 'wpml_language_is_active', NULL, 'de' );
Related hooks
wpml_decode_custom_field, wpml_footer_language_selector, wpml_add_language_form_field, wpml_ls_exclude_in_menu, wpml_is_rtl, wpml_alternate_hreflang, wpml_head_langs, wpml_must_translate_canonical_url, wpml_browser_redirect_language_params, wpml_active_languages