Fixed showing title/teaser/quote/description from data.txt, not like on index.php
This commit is contained in:
parent
0a9471c10a
commit
fb7afd9cf3
1 changed files with 3 additions and 1 deletions
|
|
@ -922,7 +922,9 @@ function cached_video_metadata($output, $fallback){
|
||||||
$cache = is_file($cacheFile) ? json_decode((string)file_get_contents($cacheFile), true) : [];
|
$cache = is_file($cacheFile) ? json_decode((string)file_get_contents($cacheFile), true) : [];
|
||||||
$cached = $cache['items'][$output]['metadata'] ?? null;
|
$cached = $cache['items'][$output]['metadata'] ?? null;
|
||||||
if (is_array($cached)) {
|
if (is_array($cached)) {
|
||||||
foreach (['title','teaser','date','sort_date','location','quote_da','description'] as $k) if (!empty($cached[$k])) $meta[$k] = $cached[$k];
|
// Admin content fields must stay editable/source-of-truth from data.txt.
|
||||||
|
// Only use rendered/index metadata for the displayed date/location under the title.
|
||||||
|
foreach (['date','sort_date','location'] as $k) if (!empty($cached[$k])) $meta[$k] = $cached[$k];
|
||||||
}
|
}
|
||||||
return $meta;
|
return $meta;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue