Added a check for metadata before referencing metadata variables.

git-svn-id: https://plugins.svn.wordpress.org/mtphr-galleries/trunk@975579 b8457f37-d9ea-0310-8a92-e5e31aec5664
Added a check for metadata before referencing metadata variables.

git-svn-id: https://plugins.svn.wordpress.org/mtphr-galleries/trunk@975580 b8457f37-d9ea-0310-8a92-e5e31aec5664