Any and all ordinances adopted by any municipality or county in which an agricultural operation is located making or having the effect of making the agricultural operation or any agricultural facility or its appurtenances a nuisance or providing for an abatement of the agricultural operation or the agricultural facility or its appurtenances as a nuisance in the circumstances set forth in this chapter are void and shall have no force or effect.