Skip Navigation
availability:

WPML Version: 3.1.5

description:

Returns TRUE or FALSE depending on whether a post type has been set to be translatable or not.

type:
filter
category:
Finding the Translation State of Content
parameters:
apply_filters( 'wpml_is_translated_post_type', null, string $post_type )

$post_type

(string) (Required) The type of post you wish to check. It can be any post type, such as a post, page, attachment, or revision.

For custom post types, please add the slug of the custom post type.

hook example usage:

Example

//$is_translated will be TRUE if the custom post is set to be translatable and FALSE if it is not set to be translatable
$is_translated = apply_filters( 'wpml_is_translated_post_type', NULL, 'product' )