fix: meta author depuis le champ author de l'article uniquement
This commit is contained in:
@@ -281,8 +281,8 @@ if ($ogImage === null || $ogImage === '') {
|
|||||||
$ogImage = $article['og_image'] ?? '';
|
$ogImage = $article['og_image'] ?? '';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Auteur : nom affiché de l'article, sinon auteur du site
|
// Auteur : nom affiché résolu depuis le champ author du JSON de l'article
|
||||||
$metaAuthor = $authorName !== '' ? $authorName : siteAuthor();
|
$metaAuthor = $authorName;
|
||||||
|
|
||||||
// JSON-LD Article
|
// JSON-LD Article
|
||||||
$jsonLdData = [
|
$jsonLdData = [
|
||||||
@@ -293,7 +293,7 @@ $jsonLdData = [
|
|||||||
'url' => $canonical,
|
'url' => $canonical,
|
||||||
'datePublished' => date('c', strtotime((string)$articlePublishedAt)),
|
'datePublished' => date('c', strtotime((string)$articlePublishedAt)),
|
||||||
'dateModified' => date('c', strtotime((string)($article['updated_at'] ?? $articlePublishedAt))),
|
'dateModified' => date('c', strtotime((string)($article['updated_at'] ?? $articlePublishedAt))),
|
||||||
'author' => ['@type' => 'Person', 'name' => $metaAuthor !== '' ? $metaAuthor : siteTitle()],
|
'author' => ['@type' => 'Person', 'name' => $metaAuthor !== '' ? $metaAuthor : (siteAuthor() !== '' ? siteAuthor() : siteTitle())],
|
||||||
'publisher' => [
|
'publisher' => [
|
||||||
'@type' => 'Person',
|
'@type' => 'Person',
|
||||||
'name' => siteAuthor() !== '' ? siteAuthor() : siteTitle(),
|
'name' => siteAuthor() !== '' ? siteAuthor() : siteTitle(),
|
||||||
|
|||||||
Reference in New Issue
Block a user