Browse files

Rearrange the OpenGraph output.

This way the hook always fires, so OpenGraph data can be added to pages
Webcomic may not recognize as Webcomic-related (like the homepage).
  • Loading branch information...
1 parent 26d3d7e commit 0fdfb27288e1deaddcc922c8a2505a3d0f31ec26 Michael Sisk committed Sep 14, 2012
Showing with 10 additions and 10 deletions.
  1. +10 −10 webcomic.php
View
20 webcomic.php
@@ -547,17 +547,17 @@ public function head() {
$attributes = wp_get_attachment_image_src( self::$config[ 'collections' ][ self::$collection ][ 'image' ] );
$output[ 'og:image' ] = $attributes[ 0 ];
}
-
- $output = apply_filters( 'webcomic_opengraph', $output, $object, self::$collection );
-
- foreach ( ( array ) $output as $k => $v ) {
- if ( is_array( $v ) ) {
- foreach( $v as $b ) {
- echo sprintf( '<meta property="%s" content="%s">', $k, $b ), "\n";
- }
- } else {
- echo sprintf( '<meta property="%s" content="%s">', $k, $v ), "\n";
+ }
+
+ $output = apply_filters( 'webcomic_opengraph', $output, $object, self::$collection );
+
+ foreach ( ( array ) $output as $k => $v ) {
+ if ( is_array( $v ) ) {
+ foreach( $v as $b ) {
+ echo sprintf( '<meta property="%s" content="%s">', $k, $b ), "\n";
}
+ } else {
+ echo sprintf( '<meta property="%s" content="%s">', $k, $v ), "\n";
}
}
}

0 comments on commit 0fdfb27

Please sign in to comment.