-
-
Save civita/963b4e297312c9fcebbacbf19a7b91b1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<meta property="og:title" content="<?php if (isset($template)) { p($template->getHeaderTitle()); } else { p($theme->getName());} ?>"> | |
<meta property="og:site_name" content="<?php p($theme->getName()); ?>"> | |
<meta property="og:description" content="<?php if (isset($template)) { p($template->getHeaderTitle()); echo " - "; p($template->getHeaderDetails()); } else { p($theme->getName());} ?>"> | |
<meta property="og:image" content=" | |
<?php | |
$og_image_dict = json_decode(file_get_contents("https://download/link/for/JSON/file"), true); | |
if(array_key_exists($_SERVER['REQUEST_URI'], $og_image_dict)) { | |
echo($og_image_dict[$_SERVER['REQUEST_URI']]); | |
} else { | |
// Default og:image | |
echo($og_image_dict['default']); | |
} | |
?> | |
"> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment