From https://github.com/humanmade/Custom-Meta-Boxes