Code Duplication    Length = 11-11 lines in 2 locations

geodirectory-functions/custom_functions.php 2 locations

@@ 3147-3157 (lines=11) @@
3144
 * @param string $taxonomy name/slug of a taxonomy.
3145
 * @return bool true if the taxonomy is currently set to being translatable in WPML.
3146
 */
3147
function geodir_wpml_is_taxonomy_translated( $taxonomy ) {
3148
	if ( empty( $taxonomy ) || !geodir_is_wpml() || !function_exists( 'is_taxonomy_translated' ) ) {
3149
		return false;
3150
	}
3151
3152
	if ( is_taxonomy_translated( $taxonomy ) ) {
3153
		return true;
3154
	}
3155
3156
	return false;
3157
}
3158
3159
/**
3160
 * Checks if a given post_type is currently translated.
@@ 3167-3177 (lines=11) @@
3164
 * @param string $post_type name/slug of a post_type.
3165
 * @return bool true if the post_type is currently set to being translatable in WPML.
3166
 */
3167
function geodir_wpml_is_post_type_translated( $post_type ) {
3168
	if ( empty( $post_type ) || !geodir_is_wpml() || !function_exists( 'is_post_type_translated' ) ) {
3169
		return false;
3170
	}
3171
3172
	if ( is_post_type_translated( $post_type ) ) {
3173
		return true;
3174
	}
3175
3176
	return false;
3177
}
3178
3179
/**
3180
 * Get the element in the WPML current language.