mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-02 00:00:15 +00:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user