apply_filters( 'wpml_element_type', string $element_type )
- Type
- filter
- Category
- Miscellaneous
- WPML Version
- 3.2
Description
Filters a WordPress element type (post type, taxonomy term, comment) by adding the WPML prefix ‘post_’, ‘tax_’ (for default tags use ‘post_tag’), or nothing for ‘comment’ as used in the icl_translations db table.
Arguments
- $element_type
- (string) (Required) Accepts comment, post, page, attachment, nav_menu_item, {custom post key}, nav_menu, category, post_tag, {custom taxonomy key}
Example usage
Example
//$wpml_element_type will return 'post_attachment' $wpml_element_type = apply_filters( 'wpml_element_type', 'attachment' );
Related hooks
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