unserialized and decoded $data array in replace_tag function