@@ 5580-5594 (lines=15) @@ | ||
5577 | ||
5578 | $pod[ 'options' ] = get_post_meta( $pod[ 'id' ] ); |
|
5579 | ||
5580 | foreach ( $pod[ 'options' ] as $option => $value ) { |
|
5581 | if ( is_array( $value ) ) { |
|
5582 | foreach ( $value as $k => $v ) { |
|
5583 | if ( !is_array( $v ) ) |
|
5584 | $value[ $k ] = maybe_unserialize( $v ); |
|
5585 | } |
|
5586 | ||
5587 | if ( 1 == count( $value ) ) |
|
5588 | $value = current( $value ); |
|
5589 | } |
|
5590 | else |
|
5591 | $value = maybe_unserialize( $value ); |
|
5592 | ||
5593 | $pod[ 'options' ][ $option ] = $value; |
|
5594 | } |
|
5595 | ||
5596 | $pod[ 'options' ] = array_merge( $defaults, $pod[ 'options' ] ); |
|
5597 | ||
@@ 6162-6176 (lines=15) @@ | ||
6159 | unset( $field[ 'options' ][ $ignore ] ); |
|
6160 | } |
|
6161 | ||
6162 | foreach ( $field[ 'options' ] as $option => $value ) { |
|
6163 | if ( is_array( $value ) ) { |
|
6164 | foreach ( $value as $k => $v ) { |
|
6165 | if ( !is_array( $v ) ) |
|
6166 | $value[ $k ] = maybe_unserialize( $v ); |
|
6167 | } |
|
6168 | ||
6169 | if ( 1 == count( $value ) ) |
|
6170 | $value = current( $value ); |
|
6171 | } |
|
6172 | else |
|
6173 | $value = maybe_unserialize( $value ); |
|
6174 | ||
6175 | $field[ 'options' ][ $option ] = $value; |
|
6176 | } |
|
6177 | ||
6178 | $field[ 'options' ] = array_merge( $defaults, $field[ 'options' ] ); |
|
6179 |