Skip Navigation
availability:

WPML Version: 3.2

description:

WPML applies this hook filter to the translated custom field values when a document is exported to an XLIFF file. The custom field value is in this way made available to external themes and plugins for further manipulation before saving e.g. substitution.

type:
filter
category:
Miscellaneous
parameters:
apply_filters( 'wpml_tm_xliff_export_translated_cf', string $field_data_translated, object $element )
$field_data_translated
(string) (Optional) The encoded translated custom field value. Empty if not translated yet
$element
(object) (Optional) The current custom field
hook example usage:

A basic example

add_filter( 'wpml_tm_xliff_export_translated_cf', 'callback_3', 10, 2 );

function callback_3( $field_data_translated, $element ) {
  $field_data_translated = base64_decode( $field_data_translated );

  return $field_data_translated;
}