Tengo una matriz guardada en postmata, cada clave de matriz se convierte en un metakey. Quiero cambiar el código para guardar toda la matriz con un solo metakey. ¿Como hacer eso? Gracias!
$poddata = Array(
'pod_id' => $this->pod_id,
'url' => $this->url,
'name' => $this->name,
'description' => $this->description,
'service' => $this->service,
'status' =>$this->status,
'price' => $this->price
);
foreach ( $poddata as $k => $v ){
if ( get_post_meta( $this->id, $k ) == '' )
add_post_meta( $this->id, $meta_box, $v, true );
elseif ( $v != get_post_meta( $this->id, $k, true ) )
update_post_meta( $this->id, $k, $v );
elseif ( $v == '' )
delete_post_meta( $this->id, $k, get_post_meta( $this->id, $k, true ) );
}