(a) Commencing March 21, 1955, no municipality, whether required by charter or otherwise, shall be required to publish its code of ordinances in a newspaper.
(b) A public hearing shall be held prior to adoption of a code of ordinances, and advance notice thereof shall be published in a newspaper of general circulation in the municipality.
(c) Any code of ordinances adopted before March 21, 1955, by any municipality is hereby validated with respect to any requirements for publication thereof.
(d) If any part of such code of ordinances contains new provisions of a penal nature, then such published notice shall specifically state such fact and shall also state that a copy of such new provisions is available at the city recorder's office for examination.