Update plugin from v1.1.2 to v2.0.0-alpha.12 for Kirby 5 compatibility. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
25 lines
549 B
PHP
25 lines
549 B
PHP
<?php
|
|
|
|
/** @var \Kirby\Cms\Site $site
|
|
** @var string|null $currentField */
|
|
|
|
$currentField = $currentField ?? null;
|
|
|
|
$metaFields = [
|
|
'metaDescription' => 'Site Meta Description',
|
|
'ogDescription' => 'Site Open Graph Description',
|
|
'ogSiteName' => 'Site Name'
|
|
];
|
|
?>
|
|
|
|
<existing-site-metadata>
|
|
<?php foreach ($metaFields as $key => $label) : ?>
|
|
<?php
|
|
$value = $site->$key()->value();
|
|
if ($currentField === $key || !$value || $value === '') {
|
|
continue;
|
|
}
|
|
?>
|
|
<<?= $key ?>><?= $value ?></<?= $key ?>>
|
|
<?php endforeach ?>
|
|
</existing-site-metadata>
|