5324. Standing for any form of physical custody or legal custody
The following individuals may file an action under this chapter for any form of physical custody or legal custody:
(1) A parent of the child.
(2) A person who stands in loco parentis to the child.
(3) A grandparent of the child who is not in loco parentis to the child:
(i) whose relationship with the child began either with the consent of a parent of the child or under a court order;
(ii) who assumes or is willing to assume responsibility for the child; and
(iii) when one of the following conditions is met:
(A) the child has been determined to be a dependent child under 42 Pa.C.S. Ch. 63 (relating to juvenile matters);
(B) the child is substantially at risk due to parental abuse, neglect, drug or alcohol abuse or incapacity; or
(C) the child has, for a period of at least 12 consecutive months, resided with the grandparent, excluding brief temporary absences of the child from the home, and is removed from the home by the parents, in which case the action must be filed within six months after the removal of the child from the home.
(4) Subject to paragraph (5), an individual who establishes by clear and convincing evidence all of the following:
(i) The individual has assumed or is willing to assume responsibility for the child.
(ii) The individual has a sustained, substantial and sincere interest in the welfare of the child. In determining whether the individual meets the requirements of this subparagraph, the court may consider, among other factors, the nature, quality, extent and length of the involvement by the individual in the child’s life.
(iii) Neither parent has any form of care and control of the child.
(5) Paragraph (4) shall not apply if:
(i) a dependency proceeding involving the child has been initiated or is ongoing; or
(ii) there is an order of permanent legal custody under 42 Pa.C.S. § 6351(a)(2.1) or (f.1)(3) (relating to disposition of dependent child).