@@ 2645-2650 (lines=6) @@ | ||
2642 | ||
2643 | $meta_cache[ $meta_k ] = $pod->field( array( 'name' => $meta_k, 'single' => $single, 'get_meta' => true ) ); |
|
2644 | ||
2645 | if ( ( !is_array( $meta_cache[ $meta_k ] ) || !isset( $meta_cache[ $meta_k ][ 0 ] ) ) ) { |
|
2646 | if ( empty( $meta_cache[ $meta_k ] ) && !is_array( $meta_cache[ $meta_k ] ) && $single ) |
|
2647 | $meta_cache[ $meta_k ] = array(); |
|
2648 | else |
|
2649 | $meta_cache[ $meta_k ] = array( $meta_cache[ $meta_k ] ); |
|
2650 | } |
|
2651 | ||
2652 | if ( in_array( $pod->fields[ $meta_k ][ 'type' ], PodsForm::tableless_field_types() ) && isset( $meta_cache[ '_pods_' . $meta_k ] ) ) |
|
2653 | unset( $meta_cache[ '_pods_' . $meta_k ] ); |
|
@@ 2663-2668 (lines=6) @@ | ||
2660 | if ( isset( $pod->fields[ $first ] ) ) { |
|
2661 | $meta_cache[ $meta_k ] = $pod->field( array( 'name' => $meta_k, 'single' => $single, 'get_meta' => true ) ); |
|
2662 | ||
2663 | if ( ( !is_array( $meta_cache[ $meta_k ] ) || !isset( $meta_cache[ $meta_k ][ 0 ] ) ) && $single ) { |
|
2664 | if ( empty( $meta_cache[ $meta_k ] ) && !is_array( $meta_cache[ $meta_k ] ) && $single ) |
|
2665 | $meta_cache[ $meta_k ] = array(); |
|
2666 | else |
|
2667 | $meta_cache[ $meta_k ] = array( $meta_cache[ $meta_k ] ); |
|
2668 | } |
|
2669 | ||
2670 | if ( in_array( $pod->fields[ $first ][ 'type' ], PodsForm::tableless_field_types() ) && isset( $meta_cache[ '_pods_' . $first ] ) ) |
|
2671 | unset( $meta_cache[ '_pods_' . $first ] ); |