SignaturePHP
apply_filters( 'wpml_element_translation_type', mixed $empty_value, int $element_id, string $element_type )
Description
Returns a post type or taxonomy term’s translation type (translated or not | duplicated or is a duplicate itself).
Arguments
$empty_valuemixedRequiredThis is normally the value the filter will be modifying. We are not filtering anything here so set this to NULL. This for the filter function to actually receive the full argument list$element_idintRequiredThe element id to retrieve the information of. Use term_id for taxonomy terms, post_id for post types$element_typestringRequiredThe type of element the ID belongs to. Can be a post type: post, page, attachment, nav_menu_item, {custom post key} or taxonomy: category, post_tag, nav_menu {custom taxonomy key}
Example Usage
PHP
echo apply_filters( 'wpml_element_translation_type', NULL, 7, 'nav_menu' )
The return value will be one of these:
* WPML_ELEMENT_IS_NOT_TRANSLATED = 0 * WPML_ELEMENT_IS_TRANSLATED = 1 * WPML_ELEMENT_IS_DUPLICATED = 2 * WPML_ELEMENT_IS_A_DUPLICATE = 3