unserialize serialized strings for ajax custom field addition. fixes #2591
git-svn-id: http://svn.automattic.com/wordpress/trunk@4418 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
0fd28b6d83
commit
4c586e45ff
|
@ -1107,7 +1107,10 @@ function get_post_meta_by_id($mid) {
|
||||||
global $wpdb;
|
global $wpdb;
|
||||||
$mid = (int) $mid;
|
$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) {
|
function touch_time($edit = 1, $for_post = 1) {
|
||||||
|
|
Loading…
Reference in New Issue