You are here

protected function crumbs_CurrentPageInfo::jsonLdScriptTag in Crumbs, the Breadcrumbs suite 7.2

@link http://schema.org/BreadcrumbList

Return value

string

See also

$jsonLdScriptTag

File

lib/CurrentPageInfo.php, line 388

Class

crumbs_CurrentPageInfo
Creates various data related to the current page.

Code

protected function jsonLdScriptTag() {
  $data = $this->jsonLdData;
  if (empty($data)) {
    return '';
  }
  $json = json_encode($data);
  return <<<EOT
<script type="application/ld+json">
{<span class="php-variable">$json</span>}
</script>
EOT;
}