Video plugin outputting at top of kt() textarea

Weirder and weirder. The JSON schema has always been there.

It works if I change the code to this:

$player = Html::tag('figure', [$vidtag], ['class' => $class]);


$player .= '
<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "VideoObject",
  "name": "<?= $title ?>",
  "description": "<?= $caption ?>",
  "thumbnailUrl": "<?= $posterurl ?>",
  "contentUrl": "<?= $videourl ?>",
  "uploadDate": "<?= $modified ?>"
}
</script>';

echo $player;

But there’s also an issue with your poster if poster is empty. Then your code fetches the video as poster.

Thanks. I guess i could take the script out, but it’s good for SEO.

I’ve just spotted the problem… looks like something went wrong with the push to Github last night. The tag isnt pushing through the $modified which is why schema fails.

@texnixe @ewalthert I just pushed version 0.0.8. Seems i missed a bit when i pushed last night. This should sort for you Basically, 'modified' => $filemod was missing from the array of stuff thats passed through to the snippet.

@texnixe & @jimbobrjames thank you so much. It all weeks fine now!
Send me your size and addresses and T-Shirts with your desired sentences ( see above) are on their way!

@ewalthert lol… dont worry about that (speaking for myself)… the T-Shirts are a bit of an in joke. However, there are tip links at the top of the readme file on the plugins Github repo. Feel free to drop whatever you feel appropriate in there. In fact ive been making plugins for a few years now, and you would have the honour of being the first person to actually do that…

… glad its working for you :slight_smile: