Function Reference: geodir_wpml_is_post_type_translated

Summary

Checks if a given post_type is currently translated.

Parameters

$post_type
(string) (required) name/slug of a post_type.

Default: None

Return Values

(bool)
  • true if the post_type is currently set to being translatable in WPML.

Change Log

Since: 1.6.22

Source File

geodir_wpml_is_post_type_translated() is located in geodirectory-functions/custom_functions.php [Line: 3180]

Source Code

function geodir_wpml_is_post_type_translated( $post_type ) {
	if ( empty( $post_type ) || !geodir_is_wpml() || !function_exists( 'is_post_type_translated' ) ) {
		return false;
	}

	if ( is_post_type_translated( $post_type ) ) {
		return true;
	}

	return false;
}