Seven motorists were arrested Wednesday in an undercover sting at the Sonoma County Hall of Justice after they drove away from court appearances with suspended or invalid licenses, police said.

Plainclothes officers followed the defendants as they left the courthouse following appearances for DUI offenses and license violations, Petaluma Police Sgt. Ken Savano said.

The drivers, six men and a woman, ranged in age from 23 to 58.

New laws taking effect on Jan. 1, 2017

Use of Electronic Wireless Devices (AB 1785, Quirk): Driving a motor vehicle while holding and operating a handheld wireless telephone or a wireless electronic communications device will be prohibited, unless the device is mounted on a vehicle’s windshield or is mounted/affixed to a vehicle’s dashboard or center console in a manner that does not hinder the driver’s view of the road. The driver’s hand may only be used to activate or deactivate a feature or function on the device with the motion of a single swipe or tap of the driver’s finger, but not while holding it. The law does not apply to manufacturer-installed systems that are embedded in a vehicle.

Child Safety Seats (AB 53, Garcia): This law requires a parent, legal guardian, or the driver of a motor vehicle to properly secure a child who is younger than 2 years of age in an appropriate rear-facing child passenger restraint system, unless the child weighs 40 or more pounds or is 40 or more inches in height (3 feet, 3 inches).

Motorcycle Lane Splitting (AB 51, Quirk): This law defines “lane splitting” as driving a two-wheeled motorcycle between rows of stopped or moving vehicles in the same lane. The law authorizes the California Highway Patrol (CHP) to develop educational guidelines relating to lane splitting in a manner that would ensure the safety of motorcyclists, drivers, and passengers. In developing these guidelines, the law requires the CHP to consult with specified agencies and organizations that have an interest in road safety and motorcyclist behavior.

Information from State of California Department of Motor Vehicles. To see all transportation-related laws taking effect Jan. 1, 2017, click here.