apply_filters( 'wpml_active_string_package_kinds', array $kinds );
- Type
- filter
- Category
- Site-Wide Language Information
- WPML Version
- 4.7.0
Description
This filter allows declaring an active string package kind.
It will ensure that the 3rd party plugin which inserted string packages in the database is still active, and that the Translate Everything Automatically process will only apply on active string package kinds.
Arguments
$kinds: array List of active kinds with the following keys:
title:stringThe title of the kind. It should be the same as thekindkey for packages.plural:stringThe plural form for the title.slug:stringThe slug of the kind. It should be the same as thekind_slugkey for packages.
Example usage
add_filter( 'wpml_active_string_package_kinds', function( $kinds ) {
$kinds['foo-form'] = [
'title' => 'Foo Form',
'plural' => 'Foo Forms',
'slug' => 'foo-form',
];
return $kinds;
} );
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