unserialize serialized strings for ajax custom field addition. fixes #2591
git-svn-id: https://develop.svn.wordpress.org/trunk@4418 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
c1f5e720eb
commit
60fb538b78
@ -1107,7 +1107,10 @@ function get_post_meta_by_id($mid) {
|
||||
global $wpdb;
|
||||
$mid = (int) $mid;
|
||||
|
||||
return $wpdb->get_row("SELECT * FROM $wpdb->postmeta WHERE meta_id = '$mid'");
|
||||
$meta = $wpdb->get_row("SELECT * FROM $wpdb->postmeta WHERE meta_id = '$mid'");
|
||||
if ( is_serialized_string($meta->meta_value) )
|
||||
$meta->meta_value = maybe_unserialize($meta->meta_value);
|
||||
return $meta;
|
||||
}
|
||||
|
||||
function touch_time($edit = 1, $for_post = 1) {
|
||||
|
Loading…
Reference in New Issue
Block a user