Serialize value before sending to meta display form. (#34952)
This commit is contained in:
parent
13c34ad295
commit
1d4888768f
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: fix
|
||||
|
||||
Serialize meta value before rendering so that it's rendered properly.
|
|
@ -40,7 +40,7 @@ class CustomMetaBox {
|
|||
$metadata_to_list[] = array(
|
||||
'meta_id' => $data['id'],
|
||||
'meta_key' => $data['key'], // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_key -- False positive, not a meta query.
|
||||
'meta_value' => $data['value'], // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_value -- False positive, not a meta query.
|
||||
'meta_value' => maybe_serialize( $data['value'] ), // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_value -- False positive, not a meta query.
|
||||
);
|
||||
}
|
||||
return $metadata_to_list;
|
||||
|
|
Loading…
Reference in New Issue