All perfect praise be to Allaah, The Lord of the worlds. I testify that there is none worthy of worship except Allaah and that Muhammad, sallallaahu ʻalayhi wa sallam, is His slave and Messenger.
According to the consensus of scholars, your children are legitimate and are attributed to you, and there is absolutely no aspect of doubt in this regard.
According to many scholars, the same applies to the validity of your marriage to their mother. However, if you can renew your marriage contract without difficulty or embarrassment, then it would be better to do so in order to avoid the scholarly difference of opinion.
It should be noted that abortion without a valid reason is prohibited, especially after the soul is breathed into the fetus (after four months of pregnancy) because the fetus becomes a living creature, and to terminate its life is legislatively considered murder (killing an innocent soul without any legal reason). If abortion was done after the fetus was formed (after forty days of pregnancy), then Diyah (blood money) is incumbent on the one who carried out the abortion. Please refer to fatwa 87467.
Allaah knows best.