Code Duplication    Length = 9-10 lines in 3 locations

classes/PodsAPI.php 3 locations

@@ 5496-5505 (lines=10) @@
5493
            if ( pods_api_cache() )
5494
                $pod = pods_transient_get( $transient . '_' . $check_pod->post_name );
5495
5496
            if ( false !== $pod && ( ! $table_info || isset( $pod[ 'table' ] ) ) ) {
5497
	            // @todo Is this needed anymore for WPML?
5498
                if ( in_array( $pod[ 'type' ], array( 'post_type', 'taxonomy' ) )
5499
                     && did_action( 'wpml_loaded' )
5500
                     && apply_filters( 'wpml_setting', true, 'auto_adjust_ids' ) ) {
5501
                    $pod = array_merge( $pod, $this->get_table_info( $pod['type'], $pod['object'], $pod['name'], $pod ) );
5502
                }
5503
5504
                return $pod;
5505
            }
5506
5507
            $_pod = get_object_vars( $check_pod );
5508
        }
@@ 5556-5564 (lines=9) @@
5553
                elseif ( ! $bypass_cache & pods_api_cache() )
5554
                    $pod = pods_transient_get( $transient . '_' . $params->name );
5555
5556
                if ( false !== $pod && ( ! $table_info || isset( $pod[ 'table' ] ) ) ) {
5557
                    if ( in_array( $pod[ 'type' ], array( 'post_type', 'taxonomy' ) ) && did_action( 'wpml_loaded' )
5558
                        && apply_filters( 'wpml_setting', true, 'auto_adjust_ids' ) )
5559
                        $pod = array_merge( $pod, $this->get_table_info( $pod[ 'type' ], $pod[ 'object' ], $pod[ 'name' ], $pod ) );
5560
5561
                    return $pod;
5562
                }
5563
            }
5564
5565
            if ( !isset( $params->name ) )
5566
                $pod = get_post( $dummy = (int) $params->id );
5567
            else {
@@ 5593-5601 (lines=9) @@
5590
        if ( ! $bypass_cache || pods_api_cache() )
5591
            $pod = pods_transient_get( $transient . '_' . $_pod[ 'post_name' ] );
5592
5593
        if ( false !== $pod && ( ! $table_info || isset( $pod[ 'table' ] ) ) ) {
5594
            if ( in_array( $pod[ 'type' ], array( 'post_type', 'taxonomy' ) )
5595
                 && did_action( 'wpml_loaded' )
5596
                && apply_filters( 'wpml_setting', true, 'auto_adjust_ids' ) ) {
5597
	            $pod = array_merge( $pod, $this->get_table_info( $pod['type'], $pod['object'], $pod['name'], $pod ) );
5598
            }
5599
5600
            return $pod;
5601
        }
5602
5603
        $pod = array(
5604
            'id' => $_pod[ 'ID' ],