From d987eb76e2da1431e5df3311fde3d9c2407b06f5 Mon Sep 17 00:00:00 2001 From: Will Norris Date: Mon, 21 May 2012 02:05:20 -0700 Subject: [PATCH] add basic support for array values this handles only the most basic case of having multiples values for a given property. This address the first half (the easy half) of #5. It doesn't handle the hard part of multiple property bundles (see details in #5). --- opengraph.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/opengraph.php b/opengraph.php index ff75780..7b86afd 100644 --- a/opengraph.php +++ b/opengraph.php @@ -174,7 +174,13 @@ function opengraph_meta_tags() { $metadata = opengraph_metadata(); foreach ( $metadata as $key => $value ) { if ( empty($key) || empty($value) ) continue; - echo '' . "\n"; + if ( is_array( $value ) ) { + foreach ( $value as $v ) { + echo '' . "\n"; + } + } else { + echo '' . "\n"; + } } } add_action('wp_head', 'opengraph_meta_tags');