Skip Navigation
availability:

WPML Version: 3.2

description:

WPML applies this hook filter on custom field values when a post is displayed in translation editor. The custom field value is in this way made available to external themes and plugins for filtering.

type:
filter
category:
Miscellaneous
parameters:
apply_filters( 'wpml_editor_cf_to_display', object $element, object $job )
$element
(object) (Optional) The element object available for filtering
$job
(object) (Optional) The job object the $element belongs to
hook example usage:

A basic example

add_filter('wpml_editor_cf_to_display', 'callback_1', 10, 2);

function callback_1($element, $job) {

  // some super code which DECODES encoded values in $element
  // eg:
  $element->field_data = base64_decode($element->field_data);

  return $element;

}