One of the oldest pubs in a West Yorkshire town, which had faced the threat of permanent closure, has been reopened after campaigners won their battle to get it listed as a community asset.