Whenever any building, structure, or premises is being developed, demolished, expanded, renovated, constructed, used, or occupied contrary to the provisions of the fire prevention code, or the public interest is otherwise threatened in a manner requiring immediate action, the fire code official or authorized representatives may order the work stopped and said stop work order shall be posted on the property and delivered or mailed to the owner or person performing said unlawful work. The fire code official may revoke any permit or certificate of occupancy for any land, building or structure that is being constructed, used or occupied in violation of any provision of the fire prevention codes in order to protect the health, safety and general welfare of the residents of the county.