Version Description
Download this release
Release Info
Developer | embedplus |
Plugin | YouTube |
Version | 11.0 |
Comparing to | |
See all releases |
Code changes from version 10.9 to 11.0
- readme.txt +4 -1
- scripts/embedplus_mce.css +6 -0
- scripts/fitvids.min.js +2 -2
- youtube.php +103 -49
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: YouTube Embed
|
|
4 |
Tags: youtube channel, video gallery, youtube galleries, channel gallery, gallery, playlist gallery, youtube gallery, accessibility, analytics, api, blocked youtube videos, cache, caching, channel, deleted youtube videos, effects, embed youtube, embedding youtube, featured image, get_locale, i18n, internationalization, l10n, language, lazy, lazy load, locale, localization, mute, no-cookie, oembed, page speed, playlist, playlists, plugin, Reddit, responsive, seo, short code, shortcode, ssl, subtitles, thumbnail, thumbnail image, thumbnails, tinymce, translate, translator, video, video analytics, video plugin, video seo, video shortcode, video thumbnails, view count, volume, widget, wordpress security, wordpress youtube embed, youtube, youtube api, youtube analytics, youtube embed, youtube impressions, youtube player, youtube playlist, youtube plugin, youtube shortcode, youtube snippets, youtube takedowns, youtube thumbnails, youtube plugin migration
|
5 |
Requires at least: 3.3
|
6 |
Tested up to: 4.4
|
7 |
-
Stable tag:
|
8 |
License: GPLv3 or later
|
9 |
|
10 |
YouTube embed plugin. Embed a responsive video, YouTube channel gallery, or playlist gallery. Add video thumbnails, analytics, SEO, caching...
|
@@ -147,6 +147,9 @@ You can also start and end each individual video at particular times. Like the a
|
|
147 |
|
148 |
== Changelog ==
|
149 |
|
|
|
|
|
|
|
150 |
= YouTube Embed 10.9 =
|
151 |
This version offers a host of updates: compatibility fixes, higher quality featured images, selective responsive sizing, wizard enhancements, and circular shaped thumbnails.
|
152 |
|
4 |
Tags: youtube channel, video gallery, youtube galleries, channel gallery, gallery, playlist gallery, youtube gallery, accessibility, analytics, api, blocked youtube videos, cache, caching, channel, deleted youtube videos, effects, embed youtube, embedding youtube, featured image, get_locale, i18n, internationalization, l10n, language, lazy, lazy load, locale, localization, mute, no-cookie, oembed, page speed, playlist, playlists, plugin, Reddit, responsive, seo, short code, shortcode, ssl, subtitles, thumbnail, thumbnail image, thumbnails, tinymce, translate, translator, video, video analytics, video plugin, video seo, video shortcode, video thumbnails, view count, volume, widget, wordpress security, wordpress youtube embed, youtube, youtube api, youtube analytics, youtube embed, youtube impressions, youtube player, youtube playlist, youtube plugin, youtube shortcode, youtube snippets, youtube takedowns, youtube thumbnails, youtube plugin migration
|
5 |
Requires at least: 3.3
|
6 |
Tested up to: 4.4
|
7 |
+
Stable tag: 11.0
|
8 |
License: GPLv3 or later
|
9 |
|
10 |
YouTube embed plugin. Embed a responsive video, YouTube channel gallery, or playlist gallery. Add video thumbnails, analytics, SEO, caching...
|
147 |
|
148 |
== Changelog ==
|
149 |
|
150 |
+
= YouTube Embed 11.0 =
|
151 |
+
Improves playlist and gallery embedding functionality.
|
152 |
+
|
153 |
= YouTube Embed 10.9 =
|
154 |
This version offers a host of updates: compatibility fixes, higher quality featured images, selective responsive sizing, wizard enhancements, and circular shaped thumbnails.
|
155 |
|
scripts/embedplus_mce.css
CHANGED
@@ -98,4 +98,10 @@
|
|
98 |
width: 20px;
|
99 |
height: 20px;
|
100 |
background:transparent url('../images/youtubeicon16off.png') no-repeat scroll 0px 1px;
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
}
|
98 |
width: 20px;
|
99 |
height: 20px;
|
100 |
background:transparent url('../images/youtubeicon16off.png') no-repeat scroll 0px 1px;
|
101 |
+
}
|
102 |
+
|
103 |
+
/* menu button */
|
104 |
+
#toplevel_page_youtube-my-preferences > ul > li.wp-first-item
|
105 |
+
{
|
106 |
+
display: none;
|
107 |
}
|
scripts/fitvids.min.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
|
2 |
g.parentNode.insertBefore(b,g)}f&&d.extend(e,f);return this.each(function(){var c=_EPYT_.epresponsiveselector;e.customSelector&&c.push(e.customSelector);c=d(this).find(c.join(","));c=c.not("object object");c.each(function(){var a=d(this);if(!("embed"===this.tagName.toLowerCase()&&a.parent("object").length||a.parent(".fluid-width-video-wrapper").length)){var c="object"===this.tagName.toLowerCase()||a.attr("height")&&!isNaN(parseInt(a.attr("height"),10))?parseInt(a.attr("height"),10):a.height(),b=isNaN(parseInt(a.attr("width"),
|
3 |
-
10))?a.width():parseInt(a.attr("width"),10),c=c/b;a.attr("id")||a.attr("id","fitvid"+Math.floor(999999*Math.random()));b=document.createElement("div");b.className="fluid-width-video-wrapper";try{a.wrap(b).parent(".fluid-width-video-wrapper").attr("style","padding-top: "+100*c+"% !important;"),a.removeAttr("height").removeAttr("width")}catch(e){}}})})};d(document).ready(function(){d("body").fitVidsEP()});return!0}try{epdofitvids(window.jQuery)}catch(d){};
|
1 |
+
var epdofitvids=epdofitvids||function(d){_EPYT_.epresponsiveselector.constructor!==Array&&(_EPYT_.epresponsiveselector=JSON.parse(_EPYT_.epresponsiveselector));d.fn.fitVidsEP=function(f){var e={customSelector:null};if(!document.getElementById("fit-vids-style")){var b=document.createElement("div"),g=document.getElementsByTagName("base")[0]||document.getElementsByTagName("script")[0];b.className="fit-vids-style";b.id="fit-vids-style";b.style.display="none";b.innerHTML="­<style>.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}</style>";
|
2 |
g.parentNode.insertBefore(b,g)}f&&d.extend(e,f);return this.each(function(){var c=_EPYT_.epresponsiveselector;e.customSelector&&c.push(e.customSelector);c=d(this).find(c.join(","));c=c.not("object object");c.each(function(){var a=d(this);if(!("embed"===this.tagName.toLowerCase()&&a.parent("object").length||a.parent(".fluid-width-video-wrapper").length)){var c="object"===this.tagName.toLowerCase()||a.attr("height")&&!isNaN(parseInt(a.attr("height"),10))?parseInt(a.attr("height"),10):a.height(),b=isNaN(parseInt(a.attr("width"),
|
3 |
+
10))?a.width():parseInt(a.attr("width"),10),c=c/b;a.attr("id")||a.attr("id","fitvid"+Math.floor(999999*Math.random()));b=document.createElement("div");b.className="fluid-width-video-wrapper";try{a.wrap(b).parent(".fluid-width-video-wrapper").attr("style","padding-top: "+100*c+"% !important;"),a.removeAttr("height").removeAttr("width")}catch(e){}}})})};d(document).ready(function(){d("body").fitVidsEP()});return!0};try{epdofitvids(window.jQuery)}catch(d){};
|
youtube.php
CHANGED
@@ -3,14 +3,14 @@
|
|
3 |
Plugin Name: YouTube
|
4 |
Plugin URI: http://www.embedplus.com/dashboard/pro-easy-video-analytics.aspx
|
5 |
Description: YouTube embed plugin. Embed a responsive YouTube video, playlist gallery, or channel gallery. Add video thumbnails, analytics, SEO, caching...
|
6 |
-
Version:
|
7 |
Author: EmbedPlus Team
|
8 |
Author URI: http://www.embedplus.com
|
9 |
*/
|
10 |
|
11 |
/*
|
12 |
YouTube
|
13 |
-
Copyright (C)
|
14 |
|
15 |
This program is free software: you can redistribute it and/or modify
|
16 |
it under the terms of the GNU General Public License as published by
|
@@ -32,7 +32,7 @@
|
|
32 |
class YouTubePrefs
|
33 |
{
|
34 |
|
35 |
-
public static $version = '
|
36 |
public static $opt_version = 'version';
|
37 |
public static $optembedwidth = null;
|
38 |
public static $optembedheight = null;
|
@@ -116,9 +116,9 @@ class YouTubePrefs
|
|
116 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
117 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
118 |
//public static $ytregex = '@^[\r\n]{0,1}[[:blank:]]*https?://(?:www\.)?(?:(?:youtube.com/watch\?)|(?:youtu.be/))([^\s"]+)[[:blank:]]*[\r\n]{0,1}$@im';
|
119 |
-
public static $oldytregex = '@^\s*https?://(?:www\.)?(?:(?:youtube.com/(?:(?:watch)|(?:embed))/{0,1}\?)|(?:youtu.be/))([^\s"]+)\s*$@im';
|
120 |
-
public static $ytregex = '@^[\r\t ]*https?://(?:www\.)?(?:(?:youtube.com/(?:(?:watch)|(?:embed))/{0,1}\?)|(?:youtu.be/))([^\s"]+)[\r\t ]*$@im';
|
121 |
-
public static $justurlregex = '@https?://(?:www\.)?(?:(?:youtube.com/(?:(?:watch)|(?:embed))/{0,1}\?)|(?:youtu.be/))([^\[\s"]+)@i';
|
122 |
|
123 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
124 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
@@ -436,8 +436,41 @@ class YouTubePrefs
|
|
436 |
|
437 |
}
|
438 |
}
|
439 |
-
else if (
|
440 |
-
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
441 |
}
|
442 |
}
|
443 |
}
|
@@ -1215,6 +1248,7 @@ class YouTubePrefs
|
|
1215 |
$dynsrc = '';
|
1216 |
$dyntype = '';
|
1217 |
$acctitle = '';
|
|
|
1218 |
|
1219 |
$finalparams = $linkparams + self::$alloptions;
|
1220 |
|
@@ -1326,8 +1360,17 @@ class YouTubePrefs
|
|
1326 |
}
|
1327 |
else
|
1328 |
{
|
1329 |
-
|
1330 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1331 |
}
|
1332 |
|
1333 |
if ($acctitle)
|
@@ -1343,7 +1386,10 @@ class YouTubePrefs
|
|
1343 |
|
1344 |
// playlist cleanup
|
1345 |
$videoidoutput = isset($linkparams['v']) ? $linkparams['v'] : '';
|
1346 |
-
|
|
|
|
|
|
|
1347 |
if ((self::$alloptions[self::$opt_playlistorder] == 1 || isset($finalparams['plindex'])) && isset($finalparams['list']))
|
1348 |
{
|
1349 |
try
|
@@ -1385,7 +1431,7 @@ class YouTubePrefs
|
|
1385 |
}
|
1386 |
|
1387 |
$code1 = '<iframe ' . $dyntype . $centercode . ' id="_ytid_' . rand(10000, 99999) . '" width="' . self::$defaultwidth . '" height="' . self::$defaultheight .
|
1388 |
-
'" ' . $dynsrc . 'src="//www.' . $youtubebaseurl . '.com/embed/' . $videoidoutput . '?';
|
1389 |
$code2 = '" frameborder="0" class="__youtube_prefs__' . ($iscontent ? '' : ' __youtube_prefs_widget__') .
|
1390 |
'"' . $voloutput . $acctitle . ' allowfullscreen ></iframe>' . $schemaorgoutput;
|
1391 |
|
@@ -1640,8 +1686,8 @@ class YouTubePrefs
|
|
1640 |
|
1641 |
if ($finalparams[self::$opt_controls] != 0 && $finalparams[self::$opt_autohide] != 1)
|
1642 |
{
|
1643 |
-
//add 28 for YouTube's own bar
|
1644 |
-
|
1645 |
}
|
1646 |
return $aspectheight;
|
1647 |
}
|
@@ -1696,37 +1742,41 @@ class YouTubePrefs
|
|
1696 |
|
1697 |
|
1698 |
$just_id = $linkparams['v'];
|
1699 |
-
$ftimgurl = "https://img.youtube.com/vi/" . $just_id . "/maxresdefault.jpg";
|
1700 |
-
$ftimgid = self::media_sideload($ftimgurl, $post->ID, sanitize_title(preg_replace("/[^a-zA-Z0-9\s]/", "-", $post->title)));
|
1701 |
|
1702 |
-
if (
|
1703 |
{
|
1704 |
-
$ftimgurl =
|
1705 |
-
$ftimgid =
|
1706 |
-
|
|
|
1707 |
{
|
1708 |
-
|
1709 |
-
$
|
1710 |
-
|
1711 |
-
$args['width'] = 1920;
|
1712 |
-
$args['height'] = 1080;
|
1713 |
-
$args['discover'] = false;
|
1714 |
-
$odata = $oembed->fetch('https://www.youtube.com/oembed', 'http://youtube.com/watch?v=' . $just_id, $args);
|
1715 |
-
|
1716 |
-
if ($odata)
|
1717 |
{
|
1718 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1719 |
}
|
1720 |
-
}
|
1721 |
|
1722 |
-
|
1723 |
|
1724 |
-
|
1725 |
-
|
1726 |
-
|
|
|
1727 |
}
|
|
|
1728 |
}
|
1729 |
-
set_post_thumbnail($post->ID, $ftimgid);
|
1730 |
}
|
1731 |
}
|
1732 |
|
@@ -1819,14 +1869,18 @@ class YouTubePrefs
|
|
1819 |
$vtemp = explode('/', $linkparamstemp[0]);
|
1820 |
$linkparams['v'] = array_pop($vtemp);
|
1821 |
}
|
1822 |
-
|
1823 |
-
|
1824 |
-
|
1825 |
-
|
1826 |
-
|
1827 |
-
|
1828 |
-
|
1829 |
-
|
|
|
|
|
|
|
|
|
1830 |
}
|
1831 |
}
|
1832 |
|
@@ -2061,11 +2115,11 @@ class YouTubePrefs
|
|
2061 |
$new_pointer_content .= '<p>'; // ooopointer
|
2062 |
if (!(self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0))
|
2063 |
{
|
2064 |
-
$new_pointer_content .= __("This update improves
|
2065 |
}
|
2066 |
else
|
2067 |
{
|
2068 |
-
$new_pointer_content .= __("This update improves
|
2069 |
}
|
2070 |
$new_pointer_content .= '</p>';
|
2071 |
|
@@ -2544,7 +2598,7 @@ class YouTubePrefs
|
|
2544 |
<p>
|
2545 |
<?php _e("One of the benefits of using this plugin is that you can set site-wide default options for all your videos (click \"Save Changes\" when finished). However, you can also override them (and more) on a per-video basis. Directions on how to do that are in the next section.") ?>
|
2546 |
</p>
|
2547 |
-
<?php // self::save_changes_button();
|
2548 |
|
2549 |
<div class="ytindent chx">
|
2550 |
<p>
|
@@ -2838,7 +2892,7 @@ class YouTubePrefs
|
|
2838 |
|
2839 |
</div>
|
2840 |
|
2841 |
-
<?php // self::save_changes_button();
|
2842 |
|
2843 |
<div class="upgchecks">
|
2844 |
<h3 class="sect">PRO Features</h3>
|
@@ -3079,7 +3133,7 @@ class YouTubePrefs
|
|
3079 |
?>
|
3080 |
<div class="clearboth"></div>
|
3081 |
</div>
|
3082 |
-
<?php // self::save_changes_button();
|
3083 |
|
3084 |
<hr>
|
3085 |
|
3 |
Plugin Name: YouTube
|
4 |
Plugin URI: http://www.embedplus.com/dashboard/pro-easy-video-analytics.aspx
|
5 |
Description: YouTube embed plugin. Embed a responsive YouTube video, playlist gallery, or channel gallery. Add video thumbnails, analytics, SEO, caching...
|
6 |
+
Version: 11.0
|
7 |
Author: EmbedPlus Team
|
8 |
Author URI: http://www.embedplus.com
|
9 |
*/
|
10 |
|
11 |
/*
|
12 |
YouTube
|
13 |
+
Copyright (C) 2016 EmbedPlus.com
|
14 |
|
15 |
This program is free software: you can redistribute it and/or modify
|
16 |
it under the terms of the GNU General Public License as published by
|
32 |
class YouTubePrefs
|
33 |
{
|
34 |
|
35 |
+
public static $version = '11.0';
|
36 |
public static $opt_version = 'version';
|
37 |
public static $optembedwidth = null;
|
38 |
public static $optembedheight = null;
|
116 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
117 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
118 |
//public static $ytregex = '@^[\r\n]{0,1}[[:blank:]]*https?://(?:www\.)?(?:(?:youtube.com/watch\?)|(?:youtu.be/))([^\s"]+)[[:blank:]]*[\r\n]{0,1}$@im';
|
119 |
+
public static $oldytregex = '@^\s*https?://(?:www\.)?(?:(?:youtube.com/(?:(?:watch)|(?:embed)|(?:playlist))/{0,1}\?)|(?:youtu.be/))([^\s"]+)\s*$@im';
|
120 |
+
public static $ytregex = '@^[\r\t ]*https?://(?:www\.)?(?:(?:youtube.com/(?:(?:watch)|(?:embed)|(?:playlist))/{0,1}\?)|(?:youtu.be/))([^\s"]+)[\r\t ]*$@im';
|
121 |
+
public static $justurlregex = '@https?://(?:www\.)?(?:(?:youtube.com/(?:(?:watch)|(?:embed)|(?:playlist))/{0,1}\?)|(?:youtu.be/))([^\[\s"]+)@i';
|
122 |
|
123 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
124 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
436 |
|
437 |
}
|
438 |
}
|
439 |
+
else if (isset($linkparams['list']))
|
440 |
+
{
|
441 |
+
// if playlist
|
442 |
+
try
|
443 |
+
{
|
444 |
+
$odata = self::get_oembed('http://youtube.com/playlist?list=' . $linkparams['list'], 1920, 1280);
|
445 |
+
$postlink = get_permalink($postid);
|
446 |
+
if ($odata != null && !is_wp_error($odata))
|
447 |
+
{
|
448 |
+
$_name = esc_attr(sanitize_text_field($odata->title));
|
449 |
+
$_description = esc_attr(sanitize_text_field($odata->author_name));
|
450 |
+
$_thumbnailUrl = esc_url($odata->thumbnail_url);
|
451 |
+
|
452 |
+
$thehtml .= '<a target="_blank" href="' . $postlink . '" class="accthumb"><img src="' . $_thumbnailUrl . '" /></a>';
|
453 |
+
$thehtml .= '<div class="accinfo">';
|
454 |
+
$thehtml .= '<a target="_blank" href="' . $postlink . '" class="accvidtitle">' . $_name . '</a>';
|
455 |
+
$thehtml .= '<div class="accdesc">' . (strlen($_description) > 400 ? substr($_description, 0, 400) . "..." : $_description) . '</div>';
|
456 |
+
$thehtml .= '</div>';
|
457 |
+
$thehtml .= '<div class="clearboth pad20"></div>';
|
458 |
+
}
|
459 |
+
else
|
460 |
+
{
|
461 |
+
$thehtml .= '<p class="center bold orange">This <a target="_blank" href="' . $postlink . '">post/page</a> contains a video that has been removed from YouTube.';
|
462 |
+
|
463 |
+
if (!(self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0))
|
464 |
+
{
|
465 |
+
$thehtml .='<br><a target="_blank" href="https://www.embedplus.com/dashboard/pro-easy-video-analytics.aspx">Activate delete video tracking to catch these cases »</a>';
|
466 |
+
}
|
467 |
+
$thehtml .= '</strong>';
|
468 |
+
}
|
469 |
+
}
|
470 |
+
catch (Exception $ex)
|
471 |
+
{
|
472 |
+
|
473 |
+
}
|
474 |
}
|
475 |
}
|
476 |
}
|
1248 |
$dynsrc = '';
|
1249 |
$dyntype = '';
|
1250 |
$acctitle = '';
|
1251 |
+
$videoseries = '';
|
1252 |
|
1253 |
$finalparams = $linkparams + self::$alloptions;
|
1254 |
|
1360 |
}
|
1361 |
else
|
1362 |
{
|
1363 |
+
|
1364 |
+
if (isset($linkparams['list']))
|
1365 |
+
{
|
1366 |
+
$odata = self::get_oembed('http://youtube.com/playlist?list=' . $linkparams['list'], 1920, 1280);
|
1367 |
+
$acctitle = $odata->title;
|
1368 |
+
}
|
1369 |
+
else
|
1370 |
+
{
|
1371 |
+
$odata = self::get_oembed('http://youtube.com/watch?v=' . $linkparams['v'], 1920, 1280);
|
1372 |
+
$acctitle = $odata->title;
|
1373 |
+
}
|
1374 |
}
|
1375 |
|
1376 |
if ($acctitle)
|
1386 |
|
1387 |
// playlist cleanup
|
1388 |
$videoidoutput = isset($linkparams['v']) ? $linkparams['v'] : '';
|
1389 |
+
if (!isset($finalparams['layout']) && isset($finalparams['list']))
|
1390 |
+
{
|
1391 |
+
//$videoseries = 'videoseries/';
|
1392 |
+
}
|
1393 |
if ((self::$alloptions[self::$opt_playlistorder] == 1 || isset($finalparams['plindex'])) && isset($finalparams['list']))
|
1394 |
{
|
1395 |
try
|
1431 |
}
|
1432 |
|
1433 |
$code1 = '<iframe ' . $dyntype . $centercode . ' id="_ytid_' . rand(10000, 99999) . '" width="' . self::$defaultwidth . '" height="' . self::$defaultheight .
|
1434 |
+
'" ' . $dynsrc . 'src="//www.' . $youtubebaseurl . '.com/embed/' . $videoseries . $videoidoutput . '?';
|
1435 |
$code2 = '" frameborder="0" class="__youtube_prefs__' . ($iscontent ? '' : ' __youtube_prefs_widget__') .
|
1436 |
'"' . $voloutput . $acctitle . ' allowfullscreen ></iframe>' . $schemaorgoutput;
|
1437 |
|
1686 |
|
1687 |
if ($finalparams[self::$opt_controls] != 0 && $finalparams[self::$opt_autohide] != 1)
|
1688 |
{
|
1689 |
+
//add 28 for YouTube's own bar: DEPRECATED
|
1690 |
+
//$aspectheight += 28;
|
1691 |
}
|
1692 |
return $aspectheight;
|
1693 |
}
|
1742 |
|
1743 |
|
1744 |
$just_id = $linkparams['v'];
|
|
|
|
|
1745 |
|
1746 |
+
if ($just_id != null)
|
1747 |
{
|
1748 |
+
$ftimgurl = "https://img.youtube.com/vi/" . $just_id . "/maxresdefault.jpg";
|
1749 |
+
$ftimgid = self::media_sideload($ftimgurl, $post->ID, sanitize_title(preg_replace("/[^a-zA-Z0-9\s]/", "-", $post->post_title)));
|
1750 |
+
|
1751 |
+
if (!ftimgid || is_wp_error($ftimgid))
|
1752 |
{
|
1753 |
+
$ftimgurl = null;
|
1754 |
+
$ftimgid = 0;
|
1755 |
+
if ($just_id)
|
|
|
|
|
|
|
|
|
|
|
|
|
1756 |
{
|
1757 |
+
require_once( ABSPATH . WPINC . '/class-oembed.php' );
|
1758 |
+
$oembed = _wp_oembed_get_object();
|
1759 |
+
$args = array();
|
1760 |
+
$args['width'] = 1920;
|
1761 |
+
$args['height'] = 1080;
|
1762 |
+
$args['discover'] = false;
|
1763 |
+
$odata = $oembed->fetch('https://www.youtube.com/oembed', 'http://youtube.com/watch?v=' . $just_id, $args);
|
1764 |
+
|
1765 |
+
if ($odata)
|
1766 |
+
{
|
1767 |
+
$ftimgurl = $odata->thumbnail_url;
|
1768 |
+
}
|
1769 |
}
|
|
|
1770 |
|
1771 |
+
$ftimgid = $ftimgurl && !is_wp_error($ftimgurl) ? self::media_sideload($ftimgurl, $post->ID, sanitize_title(preg_replace("/[^a-zA-Z0-9\s]/", "-", $post->title))) : 0;
|
1772 |
|
1773 |
+
if (!$ftimgid || is_wp_error($ftimgid))
|
1774 |
+
{
|
1775 |
+
return;
|
1776 |
+
}
|
1777 |
}
|
1778 |
+
set_post_thumbnail($post->ID, $ftimgid);
|
1779 |
}
|
|
|
1780 |
}
|
1781 |
}
|
1782 |
|
1869 |
$vtemp = explode('/', $linkparamstemp[0]);
|
1870 |
$linkparams['v'] = array_pop($vtemp);
|
1871 |
}
|
1872 |
+
|
1873 |
+
if (isset($linkparams['v']))
|
1874 |
+
{
|
1875 |
+
?>
|
1876 |
+
<meta property="og:type" content="video">
|
1877 |
+
<meta property="og:video" content="https://www.youtube.com/v/<?php echo $linkparams['v']; ?>?autohide=1&version=3">
|
1878 |
+
<meta property="og:video:type" content="application/x-shockwave-flash">
|
1879 |
+
<meta property="og:video:width" content="480">
|
1880 |
+
<meta property="og:video:height" content="360">
|
1881 |
+
<meta property="og:image" content="https://img.youtube.com/vi/<?php echo $linkparams['v']; ?>/0.jpg">
|
1882 |
+
<?php
|
1883 |
+
}
|
1884 |
}
|
1885 |
}
|
1886 |
|
2115 |
$new_pointer_content .= '<p>'; // ooopointer
|
2116 |
if (!(self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0))
|
2117 |
{
|
2118 |
+
$new_pointer_content .= __("This update improves support for gallery and playlist codes in Free and <a target=_blank href=" . self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=frompointer' . ">Pro versions »</a>");
|
2119 |
}
|
2120 |
else
|
2121 |
{
|
2122 |
+
$new_pointer_content .= __("This update improves support for gallery and playlist codes in Free and Pro versions.");
|
2123 |
}
|
2124 |
$new_pointer_content .= '</p>';
|
2125 |
|
2598 |
<p>
|
2599 |
<?php _e("One of the benefits of using this plugin is that you can set site-wide default options for all your videos (click \"Save Changes\" when finished). However, you can also override them (and more) on a per-video basis. Directions on how to do that are in the next section.") ?>
|
2600 |
</p>
|
2601 |
+
<?php // self::save_changes_button(); ?>
|
2602 |
|
2603 |
<div class="ytindent chx">
|
2604 |
<p>
|
2892 |
|
2893 |
</div>
|
2894 |
|
2895 |
+
<?php // self::save_changes_button(); ?>
|
2896 |
|
2897 |
<div class="upgchecks">
|
2898 |
<h3 class="sect">PRO Features</h3>
|
3133 |
?>
|
3134 |
<div class="clearboth"></div>
|
3135 |
</div>
|
3136 |
+
<?php // self::save_changes_button(); ?>
|
3137 |
|
3138 |
<hr>
|
3139 |
|