I have already blogged the version I knew here along with the text. I got the author of the words right, Patrick Brennan, but attributed the tune to George Elvey, which was wrong. Elvey wrote this tune ST. GEORGE’S WINDSOR.
The version I blogged earlier was a tune called REX by William Henry Grattan Flood.
Mary warned me there were several settings of Brennan’s text and at least one other is KING DIVINE by C.W. Rigby.
Hymnary have the sheet music for Elvey’s tune as it is in public domain, but should you wish to purchase the OCP version it is here.