Ergosterol

Ergosterol (ergosta-5,7,22-trien-3β-ol) is a sterol found in fungi, and named for ergot, a common name for the members of the fungal genus Claviceps from which ergosterol was first isolated. Ergosterol does not occur in plant or animal cells. It is a component of yeast and fungal cell membranes, serving the same function cholesterol serves in animal cells.

Ergosterol is occasionally reported analytically to occur in grasses such as rye and alfalfa (including alfalfa sprouts), and in plant flowers such as hops.. However, such detection is usually assumed to be detection of fungal growth upon (and sometimes contamination of) of the plant, as fungi form an integral part of the grass decay system. This ergosterol assay technique may thus be used to assay grass, grain, and feed systems for fungal content..

Since ergosterol is the provitamin of vitamin D2, the UV radiation of fungus-bearing grass materials can result in vitamin D2 production, but this is production of a form of vitamin D from fungus ergosterol (much as in UV radiation of yeasts and mushrooms) and is not true vitamin D production by the plant itself from UV light, a process that cannot happen.

Read more about Ergosterol:  Vitamin D2 Precursor, Target For Antifungal Drugs, Other Uses, Toxicity