Skip Navigation

[Resolved] Youtube Cell nocookies

This support ticket is created 6 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 2 replies, has 2 voices.

Last updated by Isarcowboy 6 years, 1 month ago.

Assisted by: Waqar.

Author
Posts
#1134374

Hi Toolset Team,

is it possible in times of cookie policies to implement the youtube cell with a youtube-nocookies href?
Something like that:

// Add "nocookie" To WordPress oEmbeded Youtube Videos
function youtube_nocookie_oembed( $html ) {
return str_replace( 'youtube.com', 'youtube-nocookie.com', $html );
}
add_filter( 'embed_oembed_html', 'youtube_nocookie_oembed' ); // WordPress

Best regards

#1134922

Hi Manuel,

Thank you for contacting us and I'll be happy to assist.

I'm afraid, there is no built-in filter available to make the YouTube cell, load video from "youtube-nocookie.com" domain.

The filter "embed_oembed_html" doesn't work in this case, because this cell doesn't use WordPress' oEmbed feature.

If you're integrating the Layout plugin into your own theme, you can consider creating a custom cell, using the "Layouts Cells API":
https://toolset.com/documentation/programmer-reference/layouts-cells-api/

Another alternative is to insert the embed code from YouTube directly, into either a "Visual Editor" cell or a "Custom HTML" widget, inside a "Single Widget" cell.

regards,
Waqar

#1135962

My issue is resolved now. Thank you!