From Breastfeeding and Human Lactation (Ed. Riordan):
"Maternal age, parity and diet, even when supplemented, usually have minimal influence on mineral concentrations in milk, probably because of their regulation from maternal body stores" (p 108). (Emphasis is mine)
Also "[v]ery little is known about the mechanisms or control of the secretion of trace elements into human milk" (p110).
On magnesium (diet not mentioned): "Magnesium is present in low levels in breastmilk and decreases in mature milk during 3 to 6 months (Picciano, 2001). Women who have been treated with magnesium sulfate for pre-eclampsia have high milk magnesium concentrations for the first day postpartum. After that time, levels return to normal (Lonneradl, 2000)" (p109).