Download the PHP package meom/meom-cookiebot-embed without Composer
On this page you can find all versions of the php package meom/meom-cookiebot-embed. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download meom/meom-cookiebot-embed
More information about meom/meom-cookiebot-embed
Files in meom/meom-cookiebot-embed
Package meom-cookiebot-embed
Short Description MEOM cookiebot message for videos
License GPL-2.0-or-later
Informations about the package meom-cookiebot-embed
MEOM Cookiebot embed
When using Cookiebot, for example Youtube videos might be blocked by Cookiebot
This plugin adds placeholder text and link to Cookiebot settings where user can accept marketing cookies.
Please accept marketing-cookies to watch this video.
After accepting marketing cookies, video will show up.
Installation
Note that composer package install this plugin as must-use plugin in mu-plugins
folder.
Use Composer to install the package.
Or if living on the edge:
Styles
This plugin doesn't output any styles. Example styles for your theme styles:
Filters
By default this plugin adds Cookiebot placeholder text only for Video embed block.
This condition can be changed with meom_cookiebot_embed_condition
filter.
Code example for adding placeholder text for Youtube and Vimeo videos:
Default placeholder text is Oops! This video will not be shown because you have disabled the marketing cookies. To see the video, <a href="%s">accept marketing cookies</a>.
. Code example for changing that message:
/**
* Filters the placeholder text added to the embed block.
*
* @param string $text Placeholder text.
*/
function my_prefix_cookiebot_placeholder_text( $text ) {
$text = __( 'Oops! This embed will not be shown because you have disabled the marketing cookies. To see the embed, <a href="%s">accept marketing cookies</a>.', 'kala' );
return $text;
}
add_filter( 'meom_cookiebot_placeholder_text', 'my_prefix_cookiebot_placeholder_text' );
``