Is it possible to overwrite the embed function without changing the core?

Hi all,

I need to automatically add url parameters to my embedded youtube video urls. I can achieve this by changing kirby/toolkit/lib/embed.php but I’d prefer not to change the core.

Doe anybody have an idea how to solve this nicely? I need the (youtube: ) tag to stay as is.

Thanks!

Irma

You could use https://github.com/distantnative/kirby-oembed and hack/change that a lil - at least the Kirby core wouldn’t get changed then.

Looks interesting. Not sure about the name of the tag though. “video” would be nicer.

If that’s the only problem, you could change that very easily in the oembed.php at line 14 and 23 :wink:

1 Like