Skip to content

Commit 0ac2e05

Browse files
authored
Create llms_av_av_vimeo_embed_url.php
1 parent 004cc8b commit 0ac2e05

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php // <- do not copy this line.
2+
3+
/**
4+
* Disable keyboard input in the Vimeo player.
5+
*
6+
* @see LLMS_AV_Abstract_Integration::modify_embed_url()
7+
*
8+
* @since 2022-03-02
9+
*
10+
* @param string $url The URL to the video with additional player settings.
11+
* @param string $original_url The URL to the video without additional player settings.
12+
* @param LLMS_AV_Abstract_Integration $av_object An object extended from the LLMS_AV_Abstract_Integration class,
13+
* such as LLMS_AV_Integration_Vimeo.
14+
* @return string
15+
*/
16+
function my_llms_vimeo_disable_keyboard( $url, $original_url, $av_object ) {
17+
18+
if ( get_class( $av_object ) !== 'LLMS_AV_Integration_Vimeo' ) {
19+
return $url;
20+
}
21+
22+
return $url . '&keyboard=false';
23+
}
24+
25+
add_filter( 'llms_av_av_vimeo_embed_url', 'my_llms_vimeo_disable_keyboard', 10, 3 );

0 commit comments

Comments
 (0)