Code Duplication    Length = 9-10 lines in 3 locations

classes/PodsAPI.php 3 locations

@@ 5454-5463 (lines=10) @@
5451
            if ( pods_api_cache() )
5452
                $pod = pods_transient_get( $transient . '_' . $check_pod->post_name );
5453
5454
            if ( false !== $pod && ( ! $table_info || isset( $pod[ 'table' ] ) ) ) {
5455
	            // @todo Is this needed anymore for WPML?
5456
                if ( in_array( $pod[ 'type' ], array( 'post_type', 'taxonomy' ) )
5457
                     && did_action( 'wpml_loaded' )
5458
                     && apply_filters( 'wpml_setting', true, 'auto_adjust_ids' ) ) {
5459
                    $pod = array_merge( $pod, $this->get_table_info( $pod['type'], $pod['object'], $pod['name'], $pod ) );
5460
                }
5461
5462
                return $pod;
5463
            }
5464
5465
            $_pod = get_object_vars( $check_pod );
5466
        }
@@ 5514-5522 (lines=9) @@
5511
                elseif ( ! $bypass_cache & pods_api_cache() )
5512
                    $pod = pods_transient_get( $transient . '_' . $params->name );
5513
5514
                if ( false !== $pod && ( ! $table_info || isset( $pod[ 'table' ] ) ) ) {
5515
                    if ( in_array( $pod[ 'type' ], array( 'post_type', 'taxonomy' ) ) && did_action( 'wpml_loaded' )
5516
                        && apply_filters( 'wpml_setting', true, 'auto_adjust_ids' ) )
5517
                        $pod = array_merge( $pod, $this->get_table_info( $pod[ 'type' ], $pod[ 'object' ], $pod[ 'name' ], $pod ) );
5518
5519
                    return $pod;
5520
                }
5521
            }
5522
5523
            if ( !isset( $params->name ) )
5524
                $pod = get_post( $dummy = (int) $params->id );
5525
            else {
@@ 5551-5559 (lines=9) @@
5548
        if ( ! $bypass_cache || pods_api_cache() )
5549
            $pod = pods_transient_get( $transient . '_' . $_pod[ 'post_name' ] );
5550
5551
        if ( false !== $pod && ( ! $table_info || isset( $pod[ 'table' ] ) ) ) {
5552
            if ( in_array( $pod[ 'type' ], array( 'post_type', 'taxonomy' ) )
5553
                 && did_action( 'wpml_loaded' )
5554
                && apply_filters( 'wpml_setting', true, 'auto_adjust_ids' ) ) {
5555
	            $pod = array_merge( $pod, $this->get_table_info( $pod['type'], $pod['object'], $pod['name'], $pod ) );
5556
            }
5557
5558
            return $pod;
5559
        }
5560
5561
        $pod = array(
5562
            'id' => $_pod[ 'ID' ],