Except as provided in this subchapter with regard to parental rights, any rights to a child which a nonparental relative may derive through a parent or by court order may, if the best interests of the child so require, be terminated in connection with a proceeding for adoption or for termination of parental rights.