Code Duplication    Length = 9-10 lines in 3 locations

classes/PodsAPI.php 3 locations

@@ 5529-5538 (lines=10) @@
5526
            if ( pods_api_cache() )
5527
                $pod = pods_transient_get( $transient . '_' . $check_pod->post_name );
5528
5529
            if ( false !== $pod && ( ! $table_info || isset( $pod[ 'table' ] ) ) ) {
5530
	            // @todo Is this needed anymore for WPML?
5531
                if ( in_array( $pod[ 'type' ], array( 'post_type', 'taxonomy' ) )
5532
                     && did_action( 'wpml_loaded' )
5533
                     && apply_filters( 'wpml_setting', true, 'auto_adjust_ids' ) ) {
5534
                    $pod = array_merge( $pod, $this->get_table_info( $pod['type'], $pod['object'], $pod['name'], $pod ) );
5535
                }
5536
5537
                return $pod;
5538
            }
5539
5540
            $_pod = get_object_vars( $check_pod );
5541
        }
@@ 5589-5597 (lines=9) @@
5586
                elseif ( ! $bypass_cache & pods_api_cache() )
5587
                    $pod = pods_transient_get( $transient . '_' . $params->name );
5588
5589
                if ( false !== $pod && ( ! $table_info || isset( $pod[ 'table' ] ) ) ) {
5590
                    if ( in_array( $pod[ 'type' ], array( 'post_type', 'taxonomy' ) ) && 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
                    return $pod;
5595
                }
5596
            }
5597
5598
            if ( !isset( $params->name ) )
5599
                $pod = get_post( $dummy = (int) $params->id );
5600
            else {
@@ 5626-5634 (lines=9) @@
5623
        if ( ! $bypass_cache || pods_api_cache() )
5624
            $pod = pods_transient_get( $transient . '_' . $_pod[ 'post_name' ] );
5625
5626
        if ( false !== $pod && ( ! $table_info || isset( $pod[ 'table' ] ) ) ) {
5627
            if ( in_array( $pod[ 'type' ], array( 'post_type', 'taxonomy' ) )
5628
                 && did_action( 'wpml_loaded' )
5629
                && apply_filters( 'wpml_setting', true, 'auto_adjust_ids' ) ) {
5630
	            $pod = array_merge( $pod, $this->get_table_info( $pod['type'], $pod['object'], $pod['name'], $pod ) );
5631
            }
5632
5633
            return $pod;
5634
        }
5635
5636
        $pod = array(
5637
            'id' => $_pod[ 'ID' ],