File tree Expand file tree Collapse file tree 1 file changed +15
-5
lines changed
Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change 66 * Version: 3.0
77 * Author: PHPVibe Crew
88 * Author URI: http://www.phpvibe.com
9- * License: Commercial
10- */
11- function _Izlesene ($ hosts = array ())
9+ * License: GPL
10+
11+ function getIzleseneID($url)
12+ {
13+ $pieces_array = explode('/', $url);
14+ $end_piece = end($pieces_array);
15+ $id_pieces = explode('-', $end_piece);
16+ $last_piece = end($id_pieces);
17+ $videoId = preg_replace("/[^0-9]/", "", $last_piece);
18+ return $videoId;
19+ }
20+
21+ function RegisterIzlesene($hosts = array())
1222{
1323 $hosts[] = 'izlesene';
1424 return $hosts;
@@ -23,7 +33,7 @@ function EmbedIzlesene($txt = '')
2333 if (!nullval($VibeLink)) {
2434 $variable = $VibeLink;
2535 $variable = substr($variable, 0, strpos($variable, "#list"));
26- $ id = $ vid -> getLastNr ($ variable );
36+ $id = getIzleseneID ($variable);
2737 if (!nullval($id)) {
2838 $tembed = ' <iframe src="https://www.izlesene.com/embedplayer/' . $id . '/?showrel=0&loop=0&autoplay=1&autohide=1&showinfo=1&socialbuttons=0" allowfullscreen="true" frameborder="0"></iframe>';
2939 $txt .= $tembed;
@@ -39,5 +49,5 @@ function EmbedIzlesene($txt = '')
3949}
4050
4151add_filter ('EmbedModify ' , 'EmbedIzlesene ' );
42- add_filter ('vibe-video-sources ' , '_Izlesene ' );
52+ add_filter ('vibe-video-sources ' , 'RegisterIzlesene ' );
4353?>
You can’t perform that action at this time.
0 commit comments