(a)
Notwithstanding Sections 21207 and 23127 of this code, or any other law, a motorized bicycle or class 3 electric bicycle shall not be operated on a bicycle path or trail, bikeway, bicycle lane established pursuant to Section 21207, equestrian trail, or hiking or recreational trail, unless it is within or adjacent to a roadway or unless the local authority or the governing body of a public agency having jurisdiction over the path or trail permits, by ordinance, that operation.
(b)
The local authority or governing body of a public agency having jurisdiction over a bicycle path or trail, equestrian trail, or hiking or recreational trail, may prohibit, by ordinance, the operation
of a class 1 or class 2 electric bicycle on that path or trail.