Download the PHP package gebruederheitz/wp-block-video-overlay without Composer
On this page you can find all versions of the php package gebruederheitz/wp-block-video-overlay. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download gebruederheitz/wp-block-video-overlay
More information about gebruederheitz/wp-block-video-overlay
Files in gebruederheitz/wp-block-video-overlay
Package wp-block-video-overlay
Short Description The backend helper for the video overlay block.
License GPL-3.0-only
Informations about the package wp-block-video-overlay
Wordpress Block Video Overlay (Backend Module)
see @gebruederheitz/wp-block-video-overlay
Usage
Registering the block
Given you have already initialized the gebruederheitz/wp-gutenberg-blocks BlockRegistrar somewhere:
You will then simply have to instantiate a VideoOverlayBlock
:
Using consent management functionality
Managing user consent of third-party platforms is quite simple with this block
and @gebruederheitz/consent-tools
.
To provide the editor scripts in
@gebruderheitz/wp-block-video-overlay
with a list of possible embed types, use the filter hook:
Changing the default embed provider
You can simply pass the default service's identifier to the constructor:
Enabling video captions
Use the filter hook HOOK_CC_LANG_PREFS
to provide an array of available
languages on your site to allow editors to input a language preset for Youtube
captions:
Editors may input a string in the Block Editor representing a language or locale slug (like "en", "en-GB", "en-US", "fr", "de-DE" etc.). The input is sanitized to only allow alphanumeric characters, dashes and underscores.
Defining additional attributes
Yes, there's a filter hook for that:
Changing the block markup
You can override the template used by the block by simply putting a file into
wp-content/themes/{your-theme}/template-parts/blocks/video-overlay.php
. The
block's attributes are accessible using get_query_var('attributeName')
. Take
look at the default template as an example.
Alternatively you can filter & override the template partial path and gain even more control:
All versions of wp-block-video-overlay with dependencies
gebruederheitz/wp-easy-customizer Version ^v3.0.0
gebruederheitz/wp-gutenberg-blocks Version ~1.6
gebruederheitz/wp-simple-rest Version ^2.0
league/uri Version ^7.3
league/uri-interfaces Version ^7.3
league/uri-components Version ^7.3