Walnuts are a valuable feed for some ham producers in europe. These particular pigs are fed walnuts and other grains and seeds.
This is supposed to the natural wild foods that the pigs would eat and the ham is really expensive and said to be some of the best.
So, yeah, they are fine for them to have. They also like acorns, too.