Ensure we're back compat with return values and actions in deprecated *_usermeta() family. See #10837

git-svn-id: http://svn.automattic.com/wordpress/trunk@13326 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin
2010-02-23 09:15:47 +00:00
parent 39bcbf2755
commit 25883dca37
2 changed files with 93 additions and 7 deletions

View File

@@ -206,11 +206,10 @@ function get_metadata($meta_type, $object_id, $meta_key = '', $single = false) {
return $meta_cache;
if ( isset($meta_cache[$meta_key]) ) {
if ( $single ) {
if ( $single )
return maybe_unserialize( $meta_cache[$meta_key][0] );
} else {
else
return array_map('maybe_unserialize', $meta_cache[$meta_key]);
}
}
if ($single)