lib/timber-user.php 1 location
|
@@ 161-166 (lines=6) @@
|
| 158 |
|
$um = get_user_meta($this->ID); |
| 159 |
|
} |
| 160 |
|
$custom = array(); |
| 161 |
|
foreach ($um as $key => $value) { |
| 162 |
|
if ( is_array($value) && count($value) == 1 ) { |
| 163 |
|
$value = $value[0]; |
| 164 |
|
} |
| 165 |
|
$custom[$key] = maybe_unserialize($value); |
| 166 |
|
} |
| 167 |
|
$custom = apply_filters('timber_user_get_meta', $custom, $this->ID, $this); |
| 168 |
|
return $custom; |
| 169 |
|
} |
lib/timber-post.php 1 location
|
@@ 457-462 (lines=6) @@
|
| 454 |
|
if ( !is_array($customs) || empty($customs) ) { |
| 455 |
|
return array(); |
| 456 |
|
} |
| 457 |
|
foreach ( $customs as $key => $value ) { |
| 458 |
|
if ( is_array($value) && count($value) == 1 && isset($value[0]) ) { |
| 459 |
|
$value = $value[0]; |
| 460 |
|
} |
| 461 |
|
$customs[$key] = maybe_unserialize($value); |
| 462 |
|
} |
| 463 |
|
$customs = apply_filters('timber_post_get_meta', $customs, $pid, $this); |
| 464 |
|
return $customs; |
| 465 |
|
} |