WPML
apply_filters( 'wpml_editor_cf_to_display', object $element, object $job )
タイプ
filter
カテゴリー
その他
WPMLバージョン
3.2

説明

WPMLは、投稿が翻訳エディタに表示される際、カスタムフィールドの値にこのフックフィルターを適用します。これにより、外部のテーマやプラグインがフィルタリングのためにカスタムフィールドの値を利用できるようになります。

引数

$element
(object) (オプション) フィルターに利用できる要素オブジェクト
$job
(object) (オプション) $elementが属するジョブオブジェクト

使用例

基本的な例
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;

}

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

すべてのその他フック(30件) →