A controversial law preventing sharing information about gay people with children is set to apply to all.