Thank you for your follow up.
Generally, the only way a father who is not on the birth certificate and not legally married to the mother at the time the baby is born, can petition to the court for custody / visitation, is after paternity is also established through the court, meaning that the father has to file a petition to establish paternity and the court will order a DNA paternity test and if the father is proven to be biological father of the child, then paternity would be legally established and the man would be considered to be the legal father of the child.
So, if the paternity is established, then the father will be able to file a petition to establish child custody / visitation and the judge will review petition, will also review all evidence, facts, testimonies from both parents and any relevant witnesses and the judge will establish custody / visitation which is in best interest of the minor child and it is uncommon for the court to award sole legal custody to one parent, but in most cases would grant shared custody and would also make one parent a residential parent (usually the parent with whom the child resides at the time petition is filed, unless the circumstances warrant otherwise).
In any case, if in fact any legal proceedings are pursued by the father, it is important for the mother to consult and hire an experienced family law / child custody law attorney to represent the mother and to protect mother's legal and custodial rights.
I wish you the best of luck!