Code Duplication    Length = 9-10 lines in 3 locations

classes/PodsAPI.php 3 locations

@@ 5448-5457 (lines=10) @@
5445
            if ( pods_api_cache() )
5446
                $pod = pods_transient_get( $transient . '_' . $check_pod->post_name );
5447
5448
            if ( false !== $pod && ( ! $table_info || isset( $pod[ 'table' ] ) ) ) {
5449
	            // @todo Is this needed anymore for WPML?
5450
                if ( in_array( $pod[ 'type' ], array( 'post_type', 'taxonomy' ) )
5451
                     && did_action( 'wpml_loaded' )
5452
                     && apply_filters( 'wpml_setting', true, 'auto_adjust_ids' ) ) {
5453
                    $pod = array_merge( $pod, $this->get_table_info( $pod['type'], $pod['object'], $pod['name'], $pod ) );
5454
                }
5455
5456
                return $pod;
5457
            }
5458
5459
            $_pod = get_object_vars( $check_pod );
5460
        }
@@ 5508-5516 (lines=9) @@
5505
                elseif ( ! $bypass_cache & pods_api_cache() )
5506
                    $pod = pods_transient_get( $transient . '_' . $params->name );
5507
5508
                if ( false !== $pod && ( ! $table_info || isset( $pod[ 'table' ] ) ) ) {
5509
                    if ( in_array( $pod[ 'type' ], array( 'post_type', 'taxonomy' ) ) && did_action( 'wpml_loaded' )
5510
                        && apply_filters( 'wpml_setting', true, 'auto_adjust_ids' ) )
5511
                        $pod = array_merge( $pod, $this->get_table_info( $pod[ 'type' ], $pod[ 'object' ], $pod[ 'name' ], $pod ) );
5512
5513
                    return $pod;
5514
                }
5515
            }
5516
5517
            if ( !isset( $params->name ) )
5518
                $pod = get_post( $dummy = (int) $params->id );
5519
            else {
@@ 5545-5553 (lines=9) @@
5542
        if ( ! $bypass_cache || pods_api_cache() )
5543
            $pod = pods_transient_get( $transient . '_' . $_pod[ 'post_name' ] );
5544
5545
        if ( false !== $pod && ( ! $table_info || isset( $pod[ 'table' ] ) ) ) {
5546
            if ( in_array( $pod[ 'type' ], array( 'post_type', 'taxonomy' ) )
5547
                 && did_action( 'wpml_loaded' )
5548
                && apply_filters( 'wpml_setting', true, 'auto_adjust_ids' ) ) {
5549
	            $pod = array_merge( $pod, $this->get_table_info( $pod['type'], $pod['object'], $pod['name'], $pod ) );
5550
            }
5551
5552
            return $pod;
5553
        }
5554
5555
        $pod = array(
5556
            'id' => $_pod[ 'ID' ],