Whenever the condition of any state highway, county road, or city street, either newly or previously constructed, altered, repaired, or improved, or any part thereof is such that for any reason its unrestricted use or continued use by vehicles or by any class of vehicles will greatly damage that state highway, county road, or city street, or will be dangerous to traffic, or it is being constructed, altered, repaired, improved, or maintained in such a manner as to require that use of the state highway, county road, or city street, or any portion thereof be closed or restricted as to all vehicles or any class of vehicles for any period of time, the secretary, if it is a state highway, the county legislative authority, if it is a county road, or the governing body of any city or town, if it is a city street, is authorized to close the state highway, county road, or city street, as the case may be, to travel by all vehicles or by any class of vehicles, or may declare a lower maximum speed for any class of vehicles, for such a definite period as it shall determine. Nothing in the law of this state prevents the secretary, county legislative authority, or governing body of any city or town from classifying vehicles according to gross weight, axle weight, height, width, length, braking area, performance, vehicle combinations, or tire equipment for the purposes of this section, or from restricting the use of any portion of any state highway, county road, or city street, as the case may be, to its use by an urban public transportation system.