- availability:
-
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.
- type:
- filter
- category:
- Site-Wide Language Information
- parameters:
-
apply_filters( 'wpml_active_string_package_kinds', array $kinds );
$kinds
:array
List of active kinds with the following keys:title
:string
The title of the kind. It should be the same as thekind
key for packages.plural
:string
The plural form for the title.slug
:string
The slug of the kind. It should be the same as thekind_slug
key for packages.
- hook 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; } );