Code Duplication    Length = 6-7 lines in 2 locations

geodirectory-functions/general_functions.php 2 locations

@@ 338-343 (lines=6) @@
335
				return true;
336
			}
337
			break;
338
		case 'detail':
339
			$post_type = get_query_var( 'post_type' );
340
			if ( is_array( $post_type ) ) {
341
				$post_type = reset( $post_type );
342
			}
343
			if ( is_single() && in_array( $post_type, geodir_get_posttypes() ) ) {
344
				return true;
345
			}
346
			break;
@@ 347-353 (lines=7) @@
344
				return true;
345
			}
346
			break;
347
		case 'pt':
348
			$post_type = get_query_var( 'post_type' );
349
			if ( is_array( $post_type ) ) {
350
				$post_type = reset( $post_type );
351
			}
352
			if ( is_post_type_archive() && in_array( $post_type, geodir_get_posttypes() ) && ! is_tax() ) {
353
				return true;
354
			}
355
356
			break;