apply_filters( 'wpml_element_type', string $element_type )
- タイプ
- filter
- カテゴリー
- その他
- WPMLバージョン
- 3.2
説明
`icl_translations` dbテーブルで使用されているように、WPMLのプレフィックス ‘post_’、'tax_’ (デフォルトのタグには ‘post_tag’ を使用します)を追加するか、'comment’ の場合は何も追加しないことで、WordPressの要素タイプ(投稿タイプ、タクソノミーターム、コメント)をフィルターします。
引数
- $element_type
- (string) (必須) comment、post、page、attachment、nav_menu_item、{custom post key}、nav_menu、category、post_tag、{custom taxonomy key}を受け入れます
使用例
例
//$wpml_element_type will return 'post_attachment' $wpml_element_type = apply_filters( 'wpml_element_type', 'attachment' );
関連するフック
icl_ls_languages, wpml_sync_custom_field_copied_value, wpml_ls_enable_ajax_navigation, 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, wpml_translatable_user_meta_fields