Diff: STRATO-apps/wordpress_03/app/wp-content/plugins/tutor/templates/single/video/vimeo.php
Keine Baseline-Datei – Diff nur gegen leer.
1
-
1
+
<?php
2
+
/**
3
+
* Display Vimeo Video
4
+
*
5
+
* @package Tutor\Templates
6
+
* @subpackage Single\Video
7
+
* @author Themeum <support@themeum.com>
8
+
* @link https://themeum.com
9
+
* @since 1.0.0
10
+
*/
11
+
12
+
if ( ! defined( 'ABSPATH' ) ) {
13
+
exit;
14
+
}
15
+
16
+
$disable_default_player_vimeo = tutor_utils()->get_option( 'disable_default_player_vimeo' );
17
+
18
+
$video_info = tutor_utils()->get_video_info();
19
+
$video_info = $video_info ? (array) $video_info : array();
20
+
$video_url = tutor_utils()->avalue_dot( 'source_vimeo', $video_info );
21
+
$video_id = '';
22
+
if ( preg_match( '%^https?:\/\/(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^\/]*)\/videos\/|album\/(\d+)\/video\/|video\/|)(\d+)(?:$|\/|\?)(?:[?]?.*)$%im', $video_url, $match ) ) {
23
+
if ( isset( $match[3] ) ) {
24
+
$video_id = $match[3];
25
+
}
26
+
}
27
+
28
+
do_action( 'tutor_lesson/single/before/video/vimeo' );
29
+
?>
30
+
31
+
<?php if ( $video_id ) : ?>
32
+
<div class="tutor-video-player">
33
+
<div class="loading-spinner" area-hidden="true"></div>
34
+
<div class="<?php echo $disable_default_player_vimeo ? 'plyr__video-embed tutorPlayer' : 'tutor-ratio tutor-ratio-16x9'; ?>">
35
+
<?php if ( ! $disable_default_player_vimeo ) : ?>
36
+
<iframe src="https://player.vimeo.com/video/<?php echo esc_attr( $video_id ); ?>" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe>
37
+
<?php else : ?>
38
+
<iframe src="https://player.vimeo.com/video/<?php echo esc_attr( $video_id ); ?>?loop=false&byline=false&portrait=false&title=false&speed=true&transparent=0&gesture=media" allowfullscreen allowtransparency allow="autoplay"></iframe>
39
+
<?php endif; ?>
40
+
</div>
41
+
</div>
42
+
<?php endif; ?>
43
+
44
+
<?php do_action( 'tutor_lesson/single/after/video/vimeo' ); ?>
45
+