PluginProbe
WP-Stateless – Google Cloud Storage / 3.0
WP-Stateless – Google Cloud Storage v3.0
4.4.3 2.1.7 2.1.8 2.1.9 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.2.7 2.3.0 2.3.1 2.3.2 3.0 3.0.1 3.0.2 3.0.3 3.0.4 3.1.0 3.1.1 3.2.0 3.2.1 3.2.2 All 62 releases
wp-stateless / lib / classes / compatibility / vidorev.php

vidorev.php in WP-Stateless – Google Cloud Storage 3.0, at lib/classes/compatibility/vidorev.php

43 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Plugin Name: VidoRev
4 * Plugin URI: http://demo.beeteam368.com/vidorev/
5 *
6 * Compatibility Description: Ensures compatibility with VidoRev.
7 *
8 */
9
10 namespace wpCloud\StatelessMedia {
11
12 if( !class_exists( 'wpCloud\StatelessMedia\VidoRev' ) ) {
13
14 class VidoRev extends ICompatibility {
15 protected $id = 'VidoRev';
16 protected $title = 'VidoRev';
17 protected $constant = 'WP_STATELESS_COMPATIBILITY_VIDOREV';
18 protected $description = 'Ensures compatibility with VidoRev.';
19 protected $plugin_file = [ 'vidorev-extensions/vidorev-extensions.php' ];
20
21 public function module_init( $sm ) {
22 add_filter( 'vidorev_single_video_url', array( $this, 'vidorev_single_video_url' ), 10, 2 );
23 }
24
25 /**
26 * Syncing the video file.
27 *
28 * @param $url
29 * @param $post_id
30 * @return mixed
31 */
32 public function vidorev_single_video_url( $url, $post_id ) {
33 $attachment_id = attachment_url_to_postid( $url );
34 Utility::add_media( null, $attachment_id );
35 return $url;
36 }
37
38 }
39
40 }
41
42 }
43