Skip Navigation
availability:

WPML Version: 3.2

description:

WPML applies this hook filter to the original 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.

Note: This hook requires the WPML Translation Management module

type:
filter
category:
Miscellaneous
parameters:
apply_filters( 'wpml_tm_xliff_export_original_cf', string $field_data, object $element )
$field_data
(string) (Optional) The encoded original custom field value.
$element
(object) (Optional) The current custom field
hook example usage:

A basic example

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

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

  return $field_data;
}