Skip to content

Instantly share code, notes, and snippets.

@Renrhaf
Last active November 24, 2015 16:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Renrhaf/ae94ff44367b6e7d4db0 to your computer and use it in GitHub Desktop.
Save Renrhaf/ae94ff44367b6e7d4db0 to your computer and use it in GitHub Desktop.
ARTE Info foundation 3.2 patch
diff --git a/modules/custom/arte_apios_player/arte_apios_player.module b/modules/custom/arte_apios_player/arte_apios_player.module
index d2e2c67..dafaa7c 100755
--- a/modules/custom/arte_apios_player/arte_apios_player.module
+++ b/modules/custom/arte_apios_player/arte_apios_player.module
@@ -294,7 +294,14 @@ function arte_apios_player_scald_render($atom, $context, $options = array()) {
// Generate the required markup for Google rich snippets
$snippet = arte_apios_player_google_rich_snippet_markup($atom);
- return $atom->rendered->player . $snippet;
+ if ($snippet) {
+ // Return both the player and the snippet, wrapped in an outer div
+ return '<div>' . $atom->rendered->player . $snippet . '</div>';
+ }
+ else {
+ // No snippet generated, just return the player
+ return $atom->rendered->player;
+ }
}
return NULL;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment