Allow empty fields to take into account custom template

If for some reason a custom shortcode template doesn't use display name, first/last name or email address it results in a undefined index. Ideally these should be optional and if they aren't provided they should fall back to the original values.
Merge pull request #2523 from elliott-stocks/patch-5

Allow empty fields to take into account custom template