Allow users to provide a function to return caption content.