apply_filters( 'wpml_editor_cf_to_display', object $element, object $job )
- Type
- filter
- Category
- Miscellaneous
- 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.
Arguments
- $element
- (object) (Optional) The element object available for filtering
- $job
- (object) (Optional) The job object the $element belongs to
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;
}
Related hooks
icl_ls_languages, wpml_sync_custom_field_copied_value, wpml_ls_enable_ajax_navigation, wpml_element_type, wpml_setting, wpml_sub_setting, wpml_exclude_post_from_auto_translate, wpml_forms_config_ninja-forms, wpml_forms_config_wpforms, wpml_tf_feedback_open_link