- availability:
-
WPML Version: 4.7.0
- description:
-
This filter allows you to control the eligibility of string packages for automatic translation on a per-string package basis.
- type:
- filter
- category:
- Site-Wide Language Information
- parameters:
-
- $eligible
- (boolean) (Required) The eligibility status for automatic translation.
- $package
- (array) (Required) The string package array.
- hook example usage:
-
Example
12345678// Disable translate everything for a specific string package.
add_filter(
'wpml_auto_translate_string_package'
,
function
(
$eligible
,
$package
){
if
(
'my-recipe'
===
$package
[
'name'
] &&
'my-awesome-recipe'
===
$package
[
'kind_slug'
] ) {
return
false;
}
return
$eligible
;
} );