California statutes allow grandparents to get custody/visitation rights in three ways.
First, when a parent has died, a court may award visitation to close relatives of that parent, if it is in the best interests of the child.
Second, in a custody proceeding, a court may grant grandparents custody/visitation rights if it is in the best interests of the child.
Third - in the provision that was at issue in the Butler case -- grandparents may petition for visitation if the grandchild's parents are not married or if certain other conditions are met. That provision applied here - because Karen and Charles were divorced.
Under this third provision, the court must apply a particular standard if both parents object - or the parent with sole legal and physical custody objects.
The legal standard is this:
First, the court must find a pre-existing bond between grandparent and grandchild as a prerequisite to an order of visitation.
Second, the court must balance "the interest of the child in having visitation with the grandparent against the right of the parents to exercise their parental authority" to deny visitation. As the court strikes the balance, the court must apply a rebuttable presumption that the visitation is not in the best interests of the child. But if that presumption is rebutted - with evidence in favor of the grandparents -- then visitation can still be granted.