Code Duplication    Length = 9-10 lines in 3 locations

classes/PodsAPI.php 3 locations

@@ 5587-5596 (lines=10) @@
5584
            if ( pods_api_cache() )
5585
                $pod = pods_transient_get( $transient . '_' . $check_pod->post_name );
5586
5587
            if ( false !== $pod && ( ! $table_info || isset( $pod[ 'table' ] ) ) ) {
5588
	            // @todo Is this needed anymore for WPML?
5589
                if ( in_array( $pod[ 'type' ], array( 'post_type', 'taxonomy' ) )
5590
                     && did_action( 'wpml_loaded' )
5591
                     && apply_filters( 'wpml_setting', true, 'auto_adjust_ids' ) ) {
5592
                    $pod = array_merge( $pod, $this->get_table_info( $pod['type'], $pod['object'], $pod['name'], $pod ) );
5593
                }
5594
5595
                return $pod;
5596
            }
5597
5598
            $_pod = get_object_vars( $check_pod );
5599
        }
@@ 5647-5655 (lines=9) @@
5644
                elseif ( ! $bypass_cache & pods_api_cache() )
5645
                    $pod = pods_transient_get( $transient . '_' . $params->name );
5646
5647
                if ( false !== $pod && ( ! $table_info || isset( $pod[ 'table' ] ) ) ) {
5648
                    if ( in_array( $pod[ 'type' ], array( 'post_type', 'taxonomy' ) ) && did_action( 'wpml_loaded' )
5649
                        && apply_filters( 'wpml_setting', true, 'auto_adjust_ids' ) )
5650
                        $pod = array_merge( $pod, $this->get_table_info( $pod[ 'type' ], $pod[ 'object' ], $pod[ 'name' ], $pod ) );
5651
5652
                    return $pod;
5653
                }
5654
            }
5655
5656
            if ( !isset( $params->name ) )
5657
                $pod = get_post( $dummy = (int) $params->id );
5658
            else {
@@ 5684-5692 (lines=9) @@
5681
        if ( ! $bypass_cache || pods_api_cache() )
5682
            $pod = pods_transient_get( $transient . '_' . $_pod[ 'post_name' ] );
5683
5684
        if ( false !== $pod && ( ! $table_info || isset( $pod[ 'table' ] ) ) ) {
5685
            if ( in_array( $pod[ 'type' ], array( 'post_type', 'taxonomy' ) )
5686
                 && did_action( 'wpml_loaded' )
5687
                && apply_filters( 'wpml_setting', true, 'auto_adjust_ids' ) ) {
5688
	            $pod = array_merge( $pod, $this->get_table_info( $pod['type'], $pod['object'], $pod['name'], $pod ) );
5689
            }
5690
5691
            return $pod;
5692
        }
5693
5694
        $pod = array(
5695
            'id' => $_pod[ 'ID' ],