Code Duplication    Length = 2-2 lines in 2 locations

classes/PodsAPI.php 2 locations

@@ 2476-2477 (lines=2) @@
2473
            if ( $table_operation && 'author' == $field[ 'name' ] && 'pick' != $field[ 'type' ] && ( !defined( 'PODS_FIELD_STRICT' ) || PODS_FIELD_STRICT ) )
2474
                return pods_error( sprintf( __( '%s is reserved for internal Pods usage, please try a different name', 'pods' ), $field[ 'name' ] ), $this );
2475
2476
            if ( in_array( $field[ 'name' ], array( 'id', 'ID' ) ) )
2477
                return pods_error( sprintf( __( '%s is reserved for internal Pods usage, please try a different name', 'pods' ), $field[ 'name' ] ), $this );
2478
2479
            foreach ( $object_fields as $object_field => $object_field_opt ) {
2480
                if ( $object_field == $field[ 'name' ] || in_array( $field[ 'name' ], $object_field_opt[ 'alias' ] ) )
@@ 2488-2489 (lines=2) @@
2485
                $field[ 'name' ] .= '2';
2486
2487
            if ( 'slug' == $field[ 'type' ] && true === $db ) {
2488
                if ( in_array( $pod[ 'type' ], array( 'post_type', 'taxonomy', 'user' ) ) )
2489
                    return pods_error( __( 'This pod already has an internal WordPress permalink field', 'pods' ), $this );
2490
2491
                $slug_field = get_posts( array(
2492
                    'post_type' => '_pods_field',