Version Description
Download this release
Release Info
Developer | embedplus |
Plugin | YouTube |
Version | 9.5 |
Comparing to | |
See all releases |
Code changes from version 9.4 to 9.5
- readme.txt +8 -6
- youtube.php +184 -142
readme.txt
CHANGED
@@ -1,27 +1,26 @@
|
|
1 |
=== YouTube ===
|
2 |
Contributors: embedplus
|
3 |
Plugin Name: YouTube Embed
|
4 |
-
Tags: lazy load, lazy, load, effects, special effects, get_locale, translator, locale, country code, country, TinyMCE, localization, internationalization, language, multi-language, translate, captions, subtitles, hl, audio, initialize, mute, sound, track, volume, at a glance, channel, annotations, music, music video, songs, song, lyrics, responsive, short code, shortcode, youtube shortcode, health, diagnostic, youtube status, seo, video seo, rich snippets, reddit, google+, google plus, comments, search, widget, sidebar, responsive, fluid, iphone, mobile, android, tablet, ipad, youtube playlist, playlists, playlist, wmode, hd, autohd, auto hd, video analytics, analytics, google, google analytics, view count, vlog, vlogging, web videos, youtube analytics, youtube, youtube plugin, youtube shortcode, embed youtube, plugin, video, video shortcode, embed videos, youtube player, shortcode, simple, simple youtube, smart youtube playback, youtube embed, wordpress youtube embed, embedding youtube, youtube embedding, video plugin, https, ssl, secure, no-cookie, cookie, html5, youtube html5, multilingual, multi-lingual, l10n, i18n
|
5 |
Requires at least: 2.9
|
6 |
Tested up to: 4.1
|
7 |
-
Stable tag: 9.
|
8 |
License: GPLv3 or later
|
9 |
|
10 |
YouTube embed plugin. Embed the YouTube player and playlist in posts, pages, and widgets. Add analytics, SEO, and much more!
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
-
**
|
15 |
|
|
|
16 |
* Easy "Insert" button for both the Visual and Text mode of the editor
|
17 |
* [Embed an entire channel as a playlist >>](https://www.youtube.com/watch?v=_9D4yMyd40g)
|
18 |
* Volume level initialization ( [helpful for autoplay >>](http://www.embedplus.com/mute-volume-youtube-wordpress.aspx) )
|
19 |
* iOS playback preferences
|
20 |
* [Automatic localization/internationalization](http://www.embedplus.com/youtube-iso-639-1-language-codes.aspx) so you can set the player's interface language from English to another
|
21 |
* Instant HTTPS support. It can even convert past non-HTTPS videos to HTTPS. Did you know that Google uses [HTTPS/SSL support as a ranking signal for SERP?](http://embedplus.com/convert-old-youtube-embeds-to-https-ssl.aspx)
|
22 |
-
* Visual YouTube video searching and viewing
|
23 |
* "At a Glance" direct access to your YouTube posts/pages
|
24 |
-
* Review the latest web discussions about videos you want to embed before embedding
|
25 |
* Shortcode support for [embedding multiple videos on one line >>](https://www.youtube.com/watch?v=KU6lzcNR1FI)
|
26 |
* [General playlist embedding support >>](https://www.youtube.com/watch?v=J50PlRZHH9I)
|
27 |
* [Default HTML5 YouTube player support>>](http://www.embedplus.com/make-sure-youtube-defaults-to-html5-on-wordpress.aspx)
|
@@ -137,8 +136,11 @@ You can also start and end each individual video at particular times. Like the a
|
|
137 |
|
138 |
== Changelog ==
|
139 |
|
|
|
|
|
|
|
140 |
= YouTube Embed 9.4 =
|
141 |
-
Adds Autofit Widget option for Free and PRO users. Also adds slide from left animation to [
|
142 |
|
143 |
= YouTube Embed 9.3 =
|
144 |
Improved volume functionality and interface updates (Free and PRO). [Special effects added to PRO version >>](http://www.embedplus.com/add-special-effects-to-youtube-embeds-in-wordpress.aspx)
|
1 |
=== YouTube ===
|
2 |
Contributors: embedplus
|
3 |
Plugin Name: YouTube Embed
|
4 |
+
Tags: origin, lazy load, lazy, load, effects, special effects, get_locale, translator, locale, country code, country, TinyMCE, localization, internationalization, language, multi-language, translate, captions, subtitles, hl, audio, initialize, mute, sound, track, volume, at a glance, channel, annotations, music, music video, songs, song, lyrics, responsive, short code, shortcode, youtube shortcode, health, diagnostic, youtube status, seo, video seo, rich snippets, reddit, google+, google plus, comments, search, widget, sidebar, responsive, fluid, iphone, mobile, android, tablet, ipad, youtube playlist, playlists, playlist, wmode, hd, autohd, auto hd, video analytics, analytics, google, google analytics, view count, vlog, vlogging, web videos, youtube analytics, youtube, youtube plugin, youtube shortcode, embed youtube, plugin, video, video shortcode, embed videos, youtube player, shortcode, simple, simple youtube, smart youtube playback, youtube embed, wordpress youtube embed, embedding youtube, youtube embedding, video plugin, https, ssl, secure, no-cookie, cookie, html5, youtube html5, multilingual, multi-lingual, l10n, i18n
|
5 |
Requires at least: 2.9
|
6 |
Tested up to: 4.1
|
7 |
+
Stable tag: 9.5
|
8 |
License: GPLv3 or later
|
9 |
|
10 |
YouTube embed plugin. Embed the YouTube player and playlist in posts, pages, and widgets. Add analytics, SEO, and much more!
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
+
**Here are a few recently added features (even more features below):**
|
15 |
|
16 |
+
* Site origin information with each embed code as an extra security measure. In YouTube's/Google's own words, checking this option "protects against malicious third-party JavaScript being injected into your page and hijacking control of your YouTube player." We especially recommend checking it as it adds higher security than the built-in YouTube embedding method that comes with the current version of WordPress (i.e. oembed).
|
17 |
* Easy "Insert" button for both the Visual and Text mode of the editor
|
18 |
* [Embed an entire channel as a playlist >>](https://www.youtube.com/watch?v=_9D4yMyd40g)
|
19 |
* Volume level initialization ( [helpful for autoplay >>](http://www.embedplus.com/mute-volume-youtube-wordpress.aspx) )
|
20 |
* iOS playback preferences
|
21 |
* [Automatic localization/internationalization](http://www.embedplus.com/youtube-iso-639-1-language-codes.aspx) so you can set the player's interface language from English to another
|
22 |
* Instant HTTPS support. It can even convert past non-HTTPS videos to HTTPS. Did you know that Google uses [HTTPS/SSL support as a ranking signal for SERP?](http://embedplus.com/convert-old-youtube-embeds-to-https-ssl.aspx)
|
|
|
23 |
* "At a Glance" direct access to your YouTube posts/pages
|
|
|
24 |
* Shortcode support for [embedding multiple videos on one line >>](https://www.youtube.com/watch?v=KU6lzcNR1FI)
|
25 |
* [General playlist embedding support >>](https://www.youtube.com/watch?v=J50PlRZHH9I)
|
26 |
* [Default HTML5 YouTube player support>>](http://www.embedplus.com/make-sure-youtube-defaults-to-html5-on-wordpress.aspx)
|
136 |
|
137 |
== Changelog ==
|
138 |
|
139 |
+
= YouTube Embed 9.5 =
|
140 |
+
Site origin information with each embed code as an extra security measure. In YouTube's/Google's own words, checking this option "protects against malicious third-party JavaScript being injected into your page and hijacking control of your YouTube player." We especially recommend checking it as it adds higher security than the built-in YouTube embedding method that comes with the current version of WordPress (i.e. oembed).
|
141 |
+
|
142 |
= YouTube Embed 9.4 =
|
143 |
+
Adds Autofit Widget option for Free and PRO users. Also adds slide from left animation to [PRO effects >>](http://www.embedplus.com/add-special-effects-to-youtube-embeds-in-wordpress.aspx)
|
144 |
|
145 |
= YouTube Embed 9.3 =
|
146 |
Improved volume functionality and interface updates (Free and PRO). [Special effects added to PRO version >>](http://www.embedplus.com/add-special-effects-to-youtube-embeds-in-wordpress.aspx)
|
youtube.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: YouTube
|
4 |
Plugin URI: http://www.embedplus.com/dashboard/pro-easy-video-analytics.aspx
|
5 |
Description: YouTube embed plugin with basic features and convenient defaults. Upgrade now to add tracking, instant video SEO tags, and much more!
|
6 |
-
Version: 9.
|
7 |
Author: EmbedPlus Team
|
8 |
Author URI: http://www.embedplus.com
|
9 |
*/
|
@@ -32,7 +32,7 @@
|
|
32 |
class YouTubePrefs
|
33 |
{
|
34 |
|
35 |
-
public static $version = '9.
|
36 |
public static $opt_version = 'version';
|
37 |
public static $optembedwidth = null;
|
38 |
public static $optembedheight = null;
|
@@ -71,6 +71,7 @@ class YouTubePrefs
|
|
71 |
public static $opt_defaultvol = 'defaultvol';
|
72 |
public static $opt_vol = 'vol';
|
73 |
public static $opt_schemaorg = 'schemaorg';
|
|
|
74 |
public static $opt_dynload = 'dynload';
|
75 |
public static $opt_dyntype = 'dyntype';
|
76 |
public static $opt_alloptions = 'youtubeprefs_alloptions';
|
@@ -602,7 +603,7 @@ class YouTubePrefs
|
|
602 |
if (self::$alloptions[self::$opt_widgetfit] == 1)
|
603 |
{
|
604 |
$responsiveselector = '["iframe.__youtube_prefs_widget__"]';
|
605 |
-
}
|
606 |
if (self::$alloptions[self::$opt_responsive] == 1)
|
607 |
{
|
608 |
$responsiveselector = '["iframe[src*=\'youtube.com\']","iframe[src*=\'youtube-nocookie.com\']","iframe[data-ep-src*=\'youtube.com\']","iframe[data-ep-src*=\'youtube-nocookie.com\']"]';
|
@@ -654,6 +655,7 @@ class YouTubePrefs
|
|
654 |
$_defaultwidth = '';
|
655 |
$_defaultheight = '';
|
656 |
$_playsinline = 0;
|
|
|
657 |
$_defaultvol = 0;
|
658 |
$_vol = '';
|
659 |
$_hl = '';
|
@@ -674,6 +676,7 @@ class YouTubePrefs
|
|
674 |
$_rel = self::tryget($arroptions, self::$opt_rel, 1);
|
675 |
$_showinfo = self::tryget($arroptions, self::$opt_showinfo, 1);
|
676 |
$_playsinline = self::tryget($arroptions, self::$opt_playsinline, 0);
|
|
|
677 |
$_html5 = self::tryget($arroptions, self::$opt_html5, 0);
|
678 |
$_hl = self::tryget($arroptions, self::$opt_hl, '');
|
679 |
$_dohl = self::tryget($arroptions, self::$opt_dohl, 0);
|
@@ -716,6 +719,7 @@ class YouTubePrefs
|
|
716 |
self::$opt_rel => $_rel,
|
717 |
self::$opt_showinfo => $_showinfo,
|
718 |
self::$opt_playsinline => $_playsinline,
|
|
|
719 |
self::$opt_autohide => $_autohide,
|
720 |
self::$opt_html5 => $_html5,
|
721 |
self::$opt_hl => $_hl,
|
@@ -907,25 +911,25 @@ class YouTubePrefs
|
|
907 |
}
|
908 |
|
909 |
$code1 = '<iframe ' . $dyntype . $centercode . ' id="_ytid_' . rand(10000, 99999) . '" width="' . self::$defaultwidth . '" height="' . self::$defaultheight .
|
910 |
-
'" ' . $dynsrc . 'src="
|
911 |
$code2 = '" frameborder="0" type="text/html" class="__youtube_prefs__' . ($iscontent ? '' : ' __youtube_prefs_widget__') .
|
912 |
'"' . $voloutput . ' allowfullscreen webkitallowfullscreen mozallowfullscreen ></iframe>' . $schemaorgoutput;
|
913 |
|
914 |
$origin = '';
|
915 |
|
916 |
-
|
917 |
-
|
918 |
-
|
919 |
-
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
|
927 |
-
|
928 |
-
$finalsrc = 'enablejsapi=1&'
|
929 |
|
930 |
if (count($finalparams) > 1)
|
931 |
{
|
@@ -1364,14 +1368,14 @@ class YouTubePrefs
|
|
1364 |
$new_pointer_content .= '<p>'; // . __(''); // ooopointer
|
1365 |
if (!(self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0))
|
1366 |
{
|
1367 |
-
|
1368 |
-
|
1369 |
//<a href=\"" . admin_url('admin.php?page=youtube-my-preferences') . "#jumpdefaults\">See the settings page for more details »</a>"
|
1370 |
//$new_pointer_content .= __('This YouTube plugin update makes HTTPS embedding available for both FREE and <a class="orange" href="' . self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=frompointer" target="_blank">PRO »</a> users. Please view this settings page to see the option. It will even automatically go and secure the non-HTTPS embeds you made in the past.');
|
1371 |
}
|
1372 |
else
|
1373 |
{
|
1374 |
-
$new_pointer_content .= __('
|
1375 |
//$new_pointer_content .= __('With this version, the plugin can now automatically detect your site\\\'s default language and set the interface of the embedded YouTube player to match (for FREE and <a href="' . self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=frompointer" target="_blank">PRO versions »)</a>.');
|
1376 |
//$new_pointer_content .= __('');
|
1377 |
}
|
@@ -1432,6 +1436,7 @@ class YouTubePrefs
|
|
1432 |
$new_options[self::$opt_rel] = self::postchecked(self::$opt_rel) ? 1 : 0;
|
1433 |
$new_options[self::$opt_showinfo] = self::postchecked(self::$opt_showinfo) ? 1 : 0;
|
1434 |
$new_options[self::$opt_playsinline] = self::postchecked(self::$opt_playsinline) ? 1 : 0;
|
|
|
1435 |
$new_options[self::$opt_controls] = self::postchecked(self::$opt_controls) ? 2 : 0;
|
1436 |
$new_options[self::$opt_autohide] = self::postchecked(self::$opt_autohide) ? 1 : 2;
|
1437 |
$new_options[self::$opt_html5] = self::postchecked(self::$opt_html5) ? 1 : 0;
|
@@ -1601,8 +1606,11 @@ class YouTubePrefs
|
|
1601 |
.vol-range {background-color: #dddddd; border-radius: 3px; cursor: pointer;}
|
1602 |
input#vol {vertical-align: middle;}
|
1603 |
.vol-seeslider {display: none;}
|
|
|
|
|
|
|
|
|
1604 |
</style>
|
1605 |
-
|
1606 |
<div class="ytindent">
|
1607 |
<br>
|
1608 |
<div id="jumphowto"></div>
|
@@ -1611,7 +1619,7 @@ class YouTubePrefs
|
|
1611 |
<a href="#jumpwiz">Visual YouTube Wizard</a>
|
1612 |
<a href="#jumpdefaults">Set Defaults</a>
|
1613 |
<a href="#jumpoverride">How To Override Defaults</a>
|
1614 |
-
<a href="
|
1615 |
<a href="#jumpsupport">Support</a>
|
1616 |
</div>
|
1617 |
|
@@ -1622,7 +1630,7 @@ class YouTubePrefs
|
|
1622 |
<?php _e("How to Insert a YouTube Video or Playlist") ?> <!--<span class="pronon">(For Free and <a href="<?php echo self::$epbase ?>/dashboard/pro-easy-video-analytics.aspx" target="_blank">PRO Users »</a>)</span>-->
|
1623 |
</h3>
|
1624 |
<p>
|
1625 |
-
<b>For videos:</b> <i>Method 1 - </i> Do you already have a URL to the video you want to embed? All you have to do is paste it on its own line, as shown below (including the http:// part). Easy, eh?<br>
|
1626 |
<i>Method 2 - </i> If you want to do some formatting (e.g. add HTML to center a video) or have two or more videos next to each other on the same line, wrap each link with the <code>[embedyt]...[/embedyt]</code> shortcode. <b>Tip for embedding videos on the same line:</b> As shown in the example image below, decrease the size of each video so that they fit together on the same line (See the "How To Override Defaults" section for height and width instructions).
|
1627 |
</p>
|
1628 |
<p>
|
@@ -1660,7 +1668,7 @@ class YouTubePrefs
|
|
1660 |
The ability to read the latest Internet discussions about the videos you want to embed is now free to all users.
|
1661 |
</p>
|
1662 |
<p>
|
1663 |
-
<b class="orange">Even more options are available to PRO users!</b> Simply click the <
|
1664 |
<br>
|
1665 |
<br>
|
1666 |
|
@@ -1686,16 +1694,12 @@ class YouTubePrefs
|
|
1686 |
</p>
|
1687 |
<p>
|
1688 |
<input name="<?php echo self::$opt_center; ?>" id="<?php echo self::$opt_center; ?>" <?php checked($all[self::$opt_center], 1); ?> type="checkbox" class="checkbox">
|
1689 |
-
<label for="<?php echo self::$opt_center; ?>"><?php _e('<b class="chktitle">Centering:</b> Automatically center all your videos (not necessary if all
|
1690 |
</p>
|
1691 |
<p>
|
1692 |
<input name="<?php echo self::$opt_autoplay; ?>" id="<?php echo self::$opt_autoplay; ?>" <?php checked($all[self::$opt_autoplay], 1); ?> type="checkbox" class="checkbox">
|
1693 |
<label for="<?php echo self::$opt_autoplay; ?>"><?php _e('<b class="chktitle">Autoplay:</b> Automatically start playing your videos.') ?></label>
|
1694 |
</p>
|
1695 |
-
<p>
|
1696 |
-
<input name="<?php echo self::$opt_cc_load_policy; ?>" id="<?php echo self::$opt_cc_load_policy; ?>" <?php checked($all[self::$opt_cc_load_policy], 1); ?> type="checkbox" class="checkbox">
|
1697 |
-
<label for="<?php echo self::$opt_cc_load_policy; ?>"><?php _e('<b class="chktitle">Closed Captions:</b> Turn on closed captions by default.') ?></label>
|
1698 |
-
</p>
|
1699 |
<p>
|
1700 |
<input name="<?php echo self::$opt_iv_load_policy; ?>" id="<?php echo self::$opt_iv_load_policy; ?>" <?php checked($all[self::$opt_iv_load_policy], 1); ?> type="checkbox" class="checkbox">
|
1701 |
<label for="<?php echo self::$opt_iv_load_policy; ?>"><?php _e('<b class="chktitle">Annotations:</b> Show annotations by default.') ?></label>
|
@@ -1728,14 +1732,19 @@ class YouTubePrefs
|
|
1728 |
<input name="<?php echo self::$opt_vq; ?>" id="<?php echo self::$opt_vq; ?>" <?php checked($all[self::$opt_vq], 'hd720'); ?> type="checkbox" class="checkbox">
|
1729 |
<label for="<?php echo self::$opt_vq; ?>"><?php _e('<b class="chktitle">HD Quality:</b> Force HD quality when available. <b>NOTE: YouTube is deprecating this unofficially supported option.</b>') ?> </label>
|
1730 |
</p>
|
1731 |
-
<p>
|
1732 |
-
<input name="<?php echo self::$opt_controls; ?>" id="<?php echo self::$opt_controls; ?>" <?php checked($all[self::$opt_controls], 2); ?> type="checkbox" class="checkbox">
|
1733 |
-
<label for="<?php echo self::$opt_controls; ?>"><?php _e('<b class="chktitle">Show Controls:</b> Show the player\'s control bar. Checking this also speeds up page loading (the Flash player will "lazy load," which means it will load the player after clicking play). Uncheck this to completely remove the player controls for a cleaner look.') ?></label>
|
1734 |
-
</p>
|
1735 |
<p>
|
1736 |
<input name="<?php echo self::$opt_wmode; ?>" id="<?php echo self::$opt_wmode; ?>" <?php checked($all[self::$opt_wmode], 'opaque'); ?> type="checkbox" class="checkbox">
|
1737 |
<label for="<?php echo self::$opt_wmode; ?>"><?php _e('<b class="chktitle">Wmode:</b> Use "opaque" wmode (uncheck to use "transparent"). Opaque may have higher performance.') ?></label>
|
1738 |
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1739 |
<p>
|
1740 |
<input name="<?php echo self::$opt_responsive; ?>" id="<?php echo self::$opt_responsive; ?>" <?php checked($all[self::$opt_responsive], 1); ?> type="checkbox" class="checkbox">
|
1741 |
<label for="<?php echo self::$opt_responsive; ?>"><?php _e('<b class="chktitle">Responsive Video Sizing:</b> Make your videos responsive so that they dynamically fit in all screen sizes (smart phone, PC and tablet). NOTE: While this is checked, any custom hardcoded widths and heights you may have set will dynamically change too. <b>Do not check this if your theme already handles responsive video sizing.</b>') ?></label>
|
@@ -1745,27 +1754,31 @@ class YouTubePrefs
|
|
1745 |
<label for="<?php echo self::$opt_widgetfit; ?>"><?php _e('<b class="chktitle">Autofit Widget Videos: <sup class="orange">NEW</sup></b> Make each video that you embed in a widget area automatically fit the width of its container.</b>') ?></label>
|
1746 |
</p>
|
1747 |
<p>
|
1748 |
-
<input name="<?php echo self::$
|
1749 |
-
<
|
1750 |
-
|
1751 |
-
|
1752 |
-
|
1753 |
-
|
1754 |
-
|
|
|
1755 |
</p>
|
1756 |
<p>
|
1757 |
<input name="<?php echo self::$opt_nocookie; ?>" id="<?php echo self::$opt_nocookie; ?>" <?php checked($all[self::$opt_nocookie], 1); ?> type="checkbox" class="checkbox">
|
|
|
|
|
|
|
1758 |
<label for="<?php echo self::$opt_nocookie; ?>">
|
1759 |
-
<b class="chktitle">
|
1760 |
</label>
|
1761 |
</p>
|
1762 |
<p>
|
1763 |
-
<input name="<?php echo self::$
|
1764 |
-
<label for="<?php echo self::$
|
1765 |
</p>
|
1766 |
<p>
|
1767 |
-
<input name="<?php echo self::$
|
1768 |
-
<label for="<?php echo self::$
|
1769 |
</p>
|
1770 |
<p>
|
1771 |
<input name="<?php echo self::$opt_oldspacing; ?>" id="<?php echo self::$opt_oldspacing; ?>" <?php checked($all[self::$opt_oldspacing], 1); ?> type="checkbox" class="checkbox">
|
@@ -1791,6 +1804,10 @@ class YouTubePrefs
|
|
1791 |
</label>
|
1792 |
</p>
|
1793 |
|
|
|
|
|
|
|
|
|
1794 |
<p>
|
1795 |
<input name="<?php echo self::$opt_dohl; ?>" id="<?php echo self::$opt_dohl; ?>" <?php checked($all[self::$opt_dohl], 1); ?> type="checkbox" class="checkbox">
|
1796 |
<!-- <span id="boxdohl">
|
@@ -1802,85 +1819,91 @@ class YouTubePrefs
|
|
1802 |
<p>
|
1803 |
<input name="<?php echo self::$opt_html5; ?>" id="<?php echo self::$opt_html5; ?>" <?php checked($all[self::$opt_html5], 1); ?> type="checkbox" class="checkbox">
|
1804 |
<label for="<?php echo self::$opt_html5; ?>">
|
1805 |
-
<b class="chktitle">HTML5 First:</b>
|
1806 |
-
|
1807 |
</label>
|
1808 |
</p>
|
1809 |
|
1810 |
<p class="smallnote orange">Below are PRO features for enhanced SEO and performance (works for even past embed links). <a href="<?php echo self::$epbase ?>/dashboard/pro-easy-video-analytics.aspx" target="_blank">Activate them »</a></p>
|
1811 |
-
|
1812 |
-
if ($all[self::$opt_pro] && strlen(trim($all[self::$opt_pro])) > 0)
|
1813 |
-
{
|
1814 |
-
?>
|
1815 |
-
|
1816 |
-
<p>
|
1817 |
-
<input name="<?php echo self::$opt_dynload; ?>" id="<?php echo self::$opt_dynload; ?>" <?php checked($all[self::$opt_dynload], 1); ?> type="checkbox" class="checkbox">
|
1818 |
-
<span id="boxdyn">
|
1819 |
-
Animation:
|
1820 |
-
<?php $cleandyn = trim($all[self::$opt_dyntype]); ?>
|
1821 |
-
<select name="<?php echo self::$opt_dyntype; ?>" id="<?php echo self::$opt_dyntype; ?>" >
|
1822 |
-
<option value="">Select type</option>
|
1823 |
-
<option value="rotateIn" <?php echo 'rotateIn' === $cleandyn ? 'selected' : '' ?> >rotate in</option>
|
1824 |
-
<option value="slideInRight" <?php echo 'slideInRight' === $cleandyn ? 'selected' : '' ?> >slide from right</option>
|
1825 |
-
<option value="slideInLeft" <?php echo 'slideInLeft' === $cleandyn ? 'selected' : '' ?> >slide from left</option>
|
1826 |
-
<option value="bounceIn" <?php echo 'bounceIn' === $cleandyn ? 'selected' : '' ?> >bounce in</option>
|
1827 |
-
<option value="flipInX" <?php echo 'flipInX' === $cleandyn ? 'selected' : '' ?> >flip up/down</option>
|
1828 |
-
<option value="flipInY" <?php echo 'flipInY' === $cleandyn ? 'selected' : '' ?> >flip left/right</option>
|
1829 |
-
<option value="pulse" <?php echo 'pulse' === $cleandyn ? 'selected' : '' ?> >pulse</option>
|
1830 |
-
<option value="tada" <?php echo 'tada' === $cleandyn ? 'selected' : '' ?> >jiggle</option>
|
1831 |
-
</select>
|
1832 |
-
</span>
|
1833 |
-
<label for="<?php echo self::$opt_dynload; ?>">
|
1834 |
-
<b>(PRO)</b> <b class="chktitle">Special Loading Effects: <sup class="orange">NEW</sup></b>
|
1835 |
-
Add eye-catching special effects that will make your YouTube embeds bounce, flip, pulse, or slide as they load on the screen. Check this box to select your desired effect. <a target="_blank" href="<?php echo self::$epbase ?>/add-special-effects-to-youtube-embeds-in-wordpress.aspx">Read more here »</a>
|
1836 |
-
</label>
|
1837 |
-
</p>
|
1838 |
-
|
1839 |
-
<p>
|
1840 |
-
<input name="<?php echo self::$opt_schemaorg; ?>" id="<?php echo self::$opt_schemaorg; ?>" <?php checked($all[self::$opt_schemaorg], 1); ?> type="checkbox" class="checkbox">
|
1841 |
-
<label for="<?php echo self::$opt_schemaorg; ?>">
|
1842 |
-
<b>(PRO)</b> <b class="chktitle">Video SEO Tags:</b> Update your YouTube embeds with Google, Bing, and Yahoo friendly video SEO markup.
|
1843 |
-
</label>
|
1844 |
-
</p>
|
1845 |
-
<p>
|
1846 |
-
<br>
|
1847 |
-
<img class="ssfb" src="<?php echo plugins_url('images/ssfb.jpg', __FILE__) ?>" />
|
1848 |
-
<input name="<?php echo self::$opt_ogvideo; ?>" id="<?php echo self::$opt_ogvideo; ?>" <?php checked($all[self::$opt_ogvideo], 1); ?> type="checkbox" class="checkbox">
|
1849 |
-
<label for="<?php echo self::$opt_ogvideo; ?>">
|
1850 |
-
<b>(PRO)</b> <b class="chktitle">Facebook Open Graph Markup:</b> <span class="pronon">(NEW: PRO Users)</span> Update YouTube embeds on your pages with Open Graph markup to enhance Facebook sharing and discovery of the pages. Your shared pages, for example, will also display embedded video thumbnails on Facebook Timelines.
|
1851 |
-
</label>
|
1852 |
-
</p>
|
1853 |
<?php
|
1854 |
-
|
1855 |
-
|
1856 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1857 |
?>
|
1858 |
-
|
1859 |
-
|
1860 |
-
<label>
|
1861 |
-
<b class="chktitle">Special Loading Effects:</b> <span class="pronon">(PRO Users)</span>
|
1862 |
-
Add eye-catching special effects that will make your YouTube embeds bounce, flip, pulse, or slide as they load on the screen. Check this box to select your desired effect. <a target="_blank" href="<?php echo self::$epbase ?>/add-special-effects-to-youtube-embeds-in-wordpress.aspx">Read more here »</a>
|
1863 |
-
</label>
|
1864 |
-
</p>
|
1865 |
-
<p>
|
1866 |
-
<input disabled type="checkbox" class="checkbox">
|
1867 |
-
<label>
|
1868 |
-
<b class="chktitle">Video SEO Tags:</b> <span class="pronon">(PRO Users)</span> Update your YouTube embeds with Google, Bing, and Yahoo friendly video SEO markup.
|
1869 |
-
</label>
|
1870 |
-
</p>
|
1871 |
-
<p>
|
1872 |
-
<br>
|
1873 |
-
<img class="ssfb" src="<?php echo plugins_url('images/ssfb.jpg', __FILE__) ?>" />
|
1874 |
-
<input disabled type="checkbox" class="checkbox">
|
1875 |
-
<label>
|
1876 |
-
<b class="chktitle">Facebook Open Graph Markup:</b> <span class="pronon">(NEW: PRO Users)</span> Update YouTube embeds on your pages with Open Graph markup to enhance Facebook sharing and discovery of the pages. Your shared pages, for example, will also display embedded video thumbnails on Facebook Timelines.
|
1877 |
-
</label>
|
1878 |
-
</p>
|
1879 |
-
|
1880 |
-
<?php
|
1881 |
-
}
|
1882 |
-
?>
|
1883 |
-
|
1884 |
<p class="submit">
|
1885 |
<br>
|
1886 |
<input type="submit" onclick="return savevalidate();" name="Submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
|
@@ -1896,7 +1919,7 @@ class YouTubePrefs
|
|
1896 |
<?php _e("How To Override Defaults / Other Options") ?> <a href="#top" class="totop">▲ top</a>
|
1897 |
</h3>
|
1898 |
<p>Suppose you have a few videos that need to be different from the above defaults. You can add options to the end of a link as displayed below to override the above defaults. Each option should begin with '&'.
|
1899 |
-
<br><span class="smallnote orange">PRO users: You can use the <
|
1900 |
<?php
|
1901 |
_e('<ul>');
|
1902 |
_e("<li><strong>width</strong> - Sets the width of your player. If omitted, the default width will be the width of your theme's content.<em> Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&width=500</strong>&height=350</em></li>");
|
@@ -1914,6 +1937,7 @@ class YouTubePrefs
|
|
1914 |
_e("<li><strong>controls</strong> - Set this to 0 to completely hide the video controls (or 2 to show it). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&controls=0</strong></em> </li>");
|
1915 |
_e("<li><strong>autohide</strong> - Set this to 1 to slide away the control bar after the video starts playing. It will automatically slide back in again if you mouse over the video. (Set to 2 to always show it). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&autohide=1</strong></em> </li>");
|
1916 |
_e("<li><strong>playsinline</strong> - Set this to 1 to allow videos play inline with the page on iOS browsers. (Set to 0 to have iOS launch videos in fullscreen instead). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&playsinline=1</strong></em> </li>");
|
|
|
1917 |
_e('</ul>');
|
1918 |
|
1919 |
_e("<p>You can also start and end each individual video at particular times. Like the above, each option should begin with '&'</p>");
|
@@ -2055,7 +2079,12 @@ class YouTubePrefs
|
|
2055 |
<li>Finally, there's a slight chance your custom theme is the issue, if you have one. To know for sure, we suggest temporarily switching to one of the default WordPress themes (e.g., "Twenty Thirteen") just to see if your video does appear. If it suddenly works, then your custom theme is the issue. You can switch back when done testing.</li>
|
2056 |
<li>If none of the above work, you can contact us here if you still have issues: ext@embedplus.com. We'll try to respond within a week. PRO users should use the priority form below for faster replies.</li>
|
2057 |
</ul>
|
2058 |
-
|
|
|
|
|
|
|
|
|
|
|
2059 |
</div>
|
2060 |
<br>
|
2061 |
<h3 class="sect">
|
@@ -2082,7 +2111,7 @@ class YouTubePrefs
|
|
2082 |
<a href="#jumpwiz">Visual YouTube Wizard</a>
|
2083 |
<a href="#jumpdefaults">Set Defaults</a>
|
2084 |
<a href="#jumpoverride">How To Override Defaults</a>
|
2085 |
-
<a href="
|
2086 |
<a href="#jumpsupport">Support</a>
|
2087 |
</div>
|
2088 |
|
@@ -2126,15 +2155,15 @@ class YouTubePrefs
|
|
2126 |
}
|
2127 |
}
|
2128 |
|
2129 |
-
|
2130 |
-
|
2131 |
-
|
2132 |
-
|
2133 |
-
|
2134 |
-
|
2135 |
-
|
2136 |
-
|
2137 |
-
|
2138 |
|
2139 |
if (!valid)
|
2140 |
{
|
@@ -2174,19 +2203,32 @@ class YouTubePrefs
|
|
2174 |
});
|
2175 |
|
2176 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2177 |
|
2178 |
-
|
2179 |
-
|
2180 |
-
|
2181 |
-
|
2182 |
-
|
2183 |
-
|
2184 |
-
|
2185 |
-
|
2186 |
-
|
2187 |
-
|
2188 |
-
|
2189 |
-
|
2190 |
|
2191 |
|
2192 |
|
3 |
Plugin Name: YouTube
|
4 |
Plugin URI: http://www.embedplus.com/dashboard/pro-easy-video-analytics.aspx
|
5 |
Description: YouTube embed plugin with basic features and convenient defaults. Upgrade now to add tracking, instant video SEO tags, and much more!
|
6 |
+
Version: 9.5
|
7 |
Author: EmbedPlus Team
|
8 |
Author URI: http://www.embedplus.com
|
9 |
*/
|
32 |
class YouTubePrefs
|
33 |
{
|
34 |
|
35 |
+
public static $version = '9.5';
|
36 |
public static $opt_version = 'version';
|
37 |
public static $optembedwidth = null;
|
38 |
public static $optembedheight = null;
|
71 |
public static $opt_defaultvol = 'defaultvol';
|
72 |
public static $opt_vol = 'vol';
|
73 |
public static $opt_schemaorg = 'schemaorg';
|
74 |
+
public static $opt_origin = 'origin';
|
75 |
public static $opt_dynload = 'dynload';
|
76 |
public static $opt_dyntype = 'dyntype';
|
77 |
public static $opt_alloptions = 'youtubeprefs_alloptions';
|
603 |
if (self::$alloptions[self::$opt_widgetfit] == 1)
|
604 |
{
|
605 |
$responsiveselector = '["iframe.__youtube_prefs_widget__"]';
|
606 |
+
}
|
607 |
if (self::$alloptions[self::$opt_responsive] == 1)
|
608 |
{
|
609 |
$responsiveselector = '["iframe[src*=\'youtube.com\']","iframe[src*=\'youtube-nocookie.com\']","iframe[data-ep-src*=\'youtube.com\']","iframe[data-ep-src*=\'youtube-nocookie.com\']"]';
|
655 |
$_defaultwidth = '';
|
656 |
$_defaultheight = '';
|
657 |
$_playsinline = 0;
|
658 |
+
$_origin = 0;
|
659 |
$_defaultvol = 0;
|
660 |
$_vol = '';
|
661 |
$_hl = '';
|
676 |
$_rel = self::tryget($arroptions, self::$opt_rel, 1);
|
677 |
$_showinfo = self::tryget($arroptions, self::$opt_showinfo, 1);
|
678 |
$_playsinline = self::tryget($arroptions, self::$opt_playsinline, 0);
|
679 |
+
$_origin = self::tryget($arroptions, self::$opt_origin, 0);
|
680 |
$_html5 = self::tryget($arroptions, self::$opt_html5, 0);
|
681 |
$_hl = self::tryget($arroptions, self::$opt_hl, '');
|
682 |
$_dohl = self::tryget($arroptions, self::$opt_dohl, 0);
|
719 |
self::$opt_rel => $_rel,
|
720 |
self::$opt_showinfo => $_showinfo,
|
721 |
self::$opt_playsinline => $_playsinline,
|
722 |
+
self::$opt_origin => $_origin,
|
723 |
self::$opt_autohide => $_autohide,
|
724 |
self::$opt_html5 => $_html5,
|
725 |
self::$opt_hl => $_hl,
|
911 |
}
|
912 |
|
913 |
$code1 = '<iframe ' . $dyntype . $centercode . ' id="_ytid_' . rand(10000, 99999) . '" width="' . self::$defaultwidth . '" height="' . self::$defaultheight .
|
914 |
+
'" ' . $dynsrc . 'src="//www.' . $youtubebaseurl . '.com/embed/' . (isset($linkparams['v']) ? $linkparams['v'] : '') . '?';
|
915 |
$code2 = '" frameborder="0" type="text/html" class="__youtube_prefs__' . ($iscontent ? '' : ' __youtube_prefs_widget__') .
|
916 |
'"' . $voloutput . ' allowfullscreen webkitallowfullscreen mozallowfullscreen ></iframe>' . $schemaorgoutput;
|
917 |
|
918 |
$origin = '';
|
919 |
|
920 |
+
try
|
921 |
+
{
|
922 |
+
if (self::$alloptions[self::$opt_origin] == 1)
|
923 |
+
{
|
924 |
+
$url_parts = parse_url(site_url());
|
925 |
+
$origin = 'origin=' . $url_parts['scheme'] . '://' . $url_parts['host'] . '&';
|
926 |
+
}
|
927 |
+
}
|
928 |
+
catch (Exception $e)
|
929 |
+
{
|
930 |
+
$origin = '';
|
931 |
+
}
|
932 |
+
$finalsrc = 'enablejsapi=1&' . $origin;
|
933 |
|
934 |
if (count($finalparams) > 1)
|
935 |
{
|
1368 |
$new_pointer_content .= '<p>'; // . __(''); // ooopointer
|
1369 |
if (!(self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0))
|
1370 |
{
|
1371 |
+
//$new_pointer_content .= __('Adds <em>Autofit Widget</em> option for Free and PRO users. Also adds <em>slide from left</em> animation to <a target="_blank" href="' . self::$epbase . '/add-special-effects-to-youtube-embeds-in-wordpress.aspx?ref=frompointer">Pro effects »</a>');
|
1372 |
+
$new_pointer_content .= __('The Free and PRO versions can now automatically apply YouTube's site origin parameter to provide higher security than the built-in YouTube embedding that comes with WordPress (i.e. oembed). As described in the Google documentation, it enforces your site's origin with each YouTube embed to prevent third-party Javascript injection. Animations have also been extended for <a href="' . self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=frompointer" target="_blank">PRO users »</a>.');
|
1373 |
//<a href=\"" . admin_url('admin.php?page=youtube-my-preferences') . "#jumpdefaults\">See the settings page for more details »</a>"
|
1374 |
//$new_pointer_content .= __('This YouTube plugin update makes HTTPS embedding available for both FREE and <a class="orange" href="' . self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=frompointer" target="_blank">PRO »</a> users. Please view this settings page to see the option. It will even automatically go and secure the non-HTTPS embeds you made in the past.');
|
1375 |
}
|
1376 |
else
|
1377 |
{
|
1378 |
+
$new_pointer_content .= __('The Free and PRO versions can now automatically apply YouTube's site origin parameter to provide higher security than the built-in YouTube embedding that comes with WordPress (i.e. oembed). As described in the Google documentation, it enforces your site's origin with each YouTube embed to prevent third-party Javascript injection. Animations have also been extended for PRO users.');
|
1379 |
//$new_pointer_content .= __('With this version, the plugin can now automatically detect your site\\\'s default language and set the interface of the embedded YouTube player to match (for FREE and <a href="' . self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=frompointer" target="_blank">PRO versions »)</a>.');
|
1380 |
//$new_pointer_content .= __('');
|
1381 |
}
|
1436 |
$new_options[self::$opt_rel] = self::postchecked(self::$opt_rel) ? 1 : 0;
|
1437 |
$new_options[self::$opt_showinfo] = self::postchecked(self::$opt_showinfo) ? 1 : 0;
|
1438 |
$new_options[self::$opt_playsinline] = self::postchecked(self::$opt_playsinline) ? 1 : 0;
|
1439 |
+
$new_options[self::$opt_origin] = self::postchecked(self::$opt_origin) ? 1 : 0;
|
1440 |
$new_options[self::$opt_controls] = self::postchecked(self::$opt_controls) ? 2 : 0;
|
1441 |
$new_options[self::$opt_autohide] = self::postchecked(self::$opt_autohide) ? 1 : 2;
|
1442 |
$new_options[self::$opt_html5] = self::postchecked(self::$opt_html5) ? 1 : 0;
|
1606 |
.vol-range {background-color: #dddddd; border-radius: 3px; cursor: pointer;}
|
1607 |
input#vol {vertical-align: middle;}
|
1608 |
.vol-seeslider {display: none;}
|
1609 |
+
#boxnocookie {display: inline-block; border-radius: 3px; padding: 2px 4px 2px 4px; color: red; background-color: yellow; font-weight: bold; <?php echo $all[self::$opt_nocookie] ? '' : 'display: none;' ?>}
|
1610 |
+
.strike {text-decoration: line-through;}
|
1611 |
+
.upgchecks { padding: 20px; border-radius: 15px; border: 1px dotted #777777; background-color: #fcfcfc; }
|
1612 |
+
.clearboth {clear: both;}
|
1613 |
</style>
|
|
|
1614 |
<div class="ytindent">
|
1615 |
<br>
|
1616 |
<div id="jumphowto"></div>
|
1619 |
<a href="#jumpwiz">Visual YouTube Wizard</a>
|
1620 |
<a href="#jumpdefaults">Set Defaults</a>
|
1621 |
<a href="#jumpoverride">How To Override Defaults</a>
|
1622 |
+
<a target="_blank" href="<?php echo self::$epbase . "/dashboard/pro-easy-video-analytics.aspx?ref=protab" ?>" style="border-color: #888888;">Why Upgrade?</a>
|
1623 |
<a href="#jumpsupport">Support</a>
|
1624 |
</div>
|
1625 |
|
1630 |
<?php _e("How to Insert a YouTube Video or Playlist") ?> <!--<span class="pronon">(For Free and <a href="<?php echo self::$epbase ?>/dashboard/pro-easy-video-analytics.aspx" target="_blank">PRO Users »</a>)</span>-->
|
1631 |
</h3>
|
1632 |
<p>
|
1633 |
+
<b>For videos:</b> <i>Method 1 - </i> Do you already have a URL to the video you want to embed in a post, page, or even a widget? All you have to do is paste it on its own line, as shown below (including the http:// part). Easy, eh?<br>
|
1634 |
<i>Method 2 - </i> If you want to do some formatting (e.g. add HTML to center a video) or have two or more videos next to each other on the same line, wrap each link with the <code>[embedyt]...[/embedyt]</code> shortcode. <b>Tip for embedding videos on the same line:</b> As shown in the example image below, decrease the size of each video so that they fit together on the same line (See the "How To Override Defaults" section for height and width instructions).
|
1635 |
</p>
|
1636 |
<p>
|
1668 |
The ability to read the latest Internet discussions about the videos you want to embed is now free to all users.
|
1669 |
</p>
|
1670 |
<p>
|
1671 |
+
<b class="orange">Even more options are available to PRO users!</b> Simply click the <a href="<?php echo self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=protab' ?>" target="_blank" class="button-primary cuz">► Customize</a> button on the wizard to further personalize your embeds without having to enter special codes yourself.
|
1672 |
<br>
|
1673 |
<br>
|
1674 |
|
1694 |
</p>
|
1695 |
<p>
|
1696 |
<input name="<?php echo self::$opt_center; ?>" id="<?php echo self::$opt_center; ?>" <?php checked($all[self::$opt_center], 1); ?> type="checkbox" class="checkbox">
|
1697 |
+
<label for="<?php echo self::$opt_center; ?>"><?php _e('<b class="chktitle">Centering:</b> Automatically center all your videos (not necessary if all your videos span the whole width of your blog).') ?></label>
|
1698 |
</p>
|
1699 |
<p>
|
1700 |
<input name="<?php echo self::$opt_autoplay; ?>" id="<?php echo self::$opt_autoplay; ?>" <?php checked($all[self::$opt_autoplay], 1); ?> type="checkbox" class="checkbox">
|
1701 |
<label for="<?php echo self::$opt_autoplay; ?>"><?php _e('<b class="chktitle">Autoplay:</b> Automatically start playing your videos.') ?></label>
|
1702 |
</p>
|
|
|
|
|
|
|
|
|
1703 |
<p>
|
1704 |
<input name="<?php echo self::$opt_iv_load_policy; ?>" id="<?php echo self::$opt_iv_load_policy; ?>" <?php checked($all[self::$opt_iv_load_policy], 1); ?> type="checkbox" class="checkbox">
|
1705 |
<label for="<?php echo self::$opt_iv_load_policy; ?>"><?php _e('<b class="chktitle">Annotations:</b> Show annotations by default.') ?></label>
|
1732 |
<input name="<?php echo self::$opt_vq; ?>" id="<?php echo self::$opt_vq; ?>" <?php checked($all[self::$opt_vq], 'hd720'); ?> type="checkbox" class="checkbox">
|
1733 |
<label for="<?php echo self::$opt_vq; ?>"><?php _e('<b class="chktitle">HD Quality:</b> Force HD quality when available. <b>NOTE: YouTube is deprecating this unofficially supported option.</b>') ?> </label>
|
1734 |
</p>
|
|
|
|
|
|
|
|
|
1735 |
<p>
|
1736 |
<input name="<?php echo self::$opt_wmode; ?>" id="<?php echo self::$opt_wmode; ?>" <?php checked($all[self::$opt_wmode], 'opaque'); ?> type="checkbox" class="checkbox">
|
1737 |
<label for="<?php echo self::$opt_wmode; ?>"><?php _e('<b class="chktitle">Wmode:</b> Use "opaque" wmode (uncheck to use "transparent"). Opaque may have higher performance.') ?></label>
|
1738 |
</p>
|
1739 |
+
<p>
|
1740 |
+
<input name="<?php echo self::$opt_defaultdims; ?>" id="<?php echo self::$opt_defaultdims; ?>" <?php checked($all[self::$opt_defaultdims], 1); ?> type="checkbox" class="checkbox">
|
1741 |
+
<span id="boxdefaultdims">
|
1742 |
+
Width: <input type="text" name="<?php echo self::$opt_defaultwidth; ?>" id="<?php echo self::$opt_defaultwidth; ?>" value="<?php echo trim($all[self::$opt_defaultwidth]); ?>" class="textinput" style="width: 50px;">
|
1743 |
+
Height: <input type="text" name="<?php echo self::$opt_defaultheight; ?>" id="<?php echo self::$opt_defaultheight; ?>" value="<?php echo trim($all[self::$opt_defaultheight]); ?>" class="textinput" style="width: 50px;">
|
1744 |
+
</span>
|
1745 |
+
|
1746 |
+
<label for="<?php echo self::$opt_defaultdims; ?>"><?php _e('<b class="chktitle">Default Dimensions:</b> Make your videos have a default size. (NOTE: Checking the responsive option will override this size setting) ') ?></label>
|
1747 |
+
</p>
|
1748 |
<p>
|
1749 |
<input name="<?php echo self::$opt_responsive; ?>" id="<?php echo self::$opt_responsive; ?>" <?php checked($all[self::$opt_responsive], 1); ?> type="checkbox" class="checkbox">
|
1750 |
<label for="<?php echo self::$opt_responsive; ?>"><?php _e('<b class="chktitle">Responsive Video Sizing:</b> Make your videos responsive so that they dynamically fit in all screen sizes (smart phone, PC and tablet). NOTE: While this is checked, any custom hardcoded widths and heights you may have set will dynamically change too. <b>Do not check this if your theme already handles responsive video sizing.</b>') ?></label>
|
1754 |
<label for="<?php echo self::$opt_widgetfit; ?>"><?php _e('<b class="chktitle">Autofit Widget Videos: <sup class="orange">NEW</sup></b> Make each video that you embed in a widget area automatically fit the width of its container.</b>') ?></label>
|
1755 |
</p>
|
1756 |
<p>
|
1757 |
+
<input name="<?php echo self::$opt_playsinline; ?>" id="<?php echo self::$opt_playsinline; ?>" <?php checked($all[self::$opt_playsinline], 1); ?> type="checkbox" class="checkbox">
|
1758 |
+
<label for="<?php echo self::$opt_playsinline; ?>"><?php _e('<b class="chktitle">iOS Playback:</b> Check this to allow your embeds to play inline within your page when viewed on iOS (iPhone and iPad) browsers. Uncheck it to have iOS launch your embeds in fullscreen instead.') ?></label>
|
1759 |
+
</p>
|
1760 |
+
<p>
|
1761 |
+
<input name="<?php echo self::$opt_origin; ?>" id="<?php echo self::$opt_origin; ?>" <?php checked($all[self::$opt_origin], 1); ?> type="checkbox" class="checkbox">
|
1762 |
+
<label for="<?php echo self::$opt_origin; ?>"><b class="chktitle">Extra Player Security: <sup class="orange">NEW</sup></b>
|
1763 |
+
Add site origin information with each embed code as an extra security measure. In YouTube's/Google's own words, checking this option "protects against malicious third-party JavaScript being injected into your page and hijacking control of your YouTube player." We especially recommend checking it as it adds higher security than the built-in YouTube embedding method that comes with the current version of WordPress (i.e. oembed).
|
1764 |
+
</label>
|
1765 |
</p>
|
1766 |
<p>
|
1767 |
<input name="<?php echo self::$opt_nocookie; ?>" id="<?php echo self::$opt_nocookie; ?>" <?php checked($all[self::$opt_nocookie], 1); ?> type="checkbox" class="checkbox">
|
1768 |
+
<span id="boxnocookie">
|
1769 |
+
Reminder: If you see errors while testing your playlist embeds or watching your videos on mobile, please uncheck this option.
|
1770 |
+
</span>
|
1771 |
<label for="<?php echo self::$opt_nocookie; ?>">
|
1772 |
+
<b class="chktitle">No Cookies:</b> Prevent YouTube from leaving tracking cookies on your visitors browsers unless they actual play the videos. This is coded to apply this behavior on links in your past post as well. <b>NOTE: Research shows that YouTube's support of Do Not Track can be error-prone. </b>
|
1773 |
</label>
|
1774 |
</p>
|
1775 |
<p>
|
1776 |
+
<input name="<?php echo self::$opt_controls; ?>" id="<?php echo self::$opt_controls; ?>" <?php checked($all[self::$opt_controls], 2); ?> type="checkbox" class="checkbox">
|
1777 |
+
<label for="<?php echo self::$opt_controls; ?>"><b class="chktitle">Show Controls:</b> Show the player's control bar. Unchecking this option creates a cleaner look but limits what your viewers can control (play position, volume, etc.).</label>
|
1778 |
</p>
|
1779 |
<p>
|
1780 |
+
<input name="<?php echo self::$opt_autohide; ?>" id="<?php echo self::$opt_autohide; ?>" <?php checked($all[self::$opt_autohide], 1); ?> type="checkbox" class="checkbox">
|
1781 |
+
<label for="<?php echo self::$opt_autohide; ?>"><b class="chktitle">Autohide Controls:</b> Slide away the control bar after the video starts playing. It will automatically slide back in again if you mouse over the video. If you unchecked "Show Controls" above, then what you select for Autohide does not matter since there are no controls to even hide.</label>
|
1782 |
</p>
|
1783 |
<p>
|
1784 |
<input name="<?php echo self::$opt_oldspacing; ?>" id="<?php echo self::$opt_oldspacing; ?>" <?php checked($all[self::$opt_oldspacing], 1); ?> type="checkbox" class="checkbox">
|
1804 |
</label>
|
1805 |
</p>
|
1806 |
|
1807 |
+
<p>
|
1808 |
+
<input name="<?php echo self::$opt_cc_load_policy; ?>" id="<?php echo self::$opt_cc_load_policy; ?>" <?php checked($all[self::$opt_cc_load_policy], 1); ?> type="checkbox" class="checkbox">
|
1809 |
+
<label for="<?php echo self::$opt_cc_load_policy; ?>"><?php _e('<b class="chktitle">Closed Captions:</b> Turn on closed captions by default.') ?></label>
|
1810 |
+
</p>
|
1811 |
<p>
|
1812 |
<input name="<?php echo self::$opt_dohl; ?>" id="<?php echo self::$opt_dohl; ?>" <?php checked($all[self::$opt_dohl], 1); ?> type="checkbox" class="checkbox">
|
1813 |
<!-- <span id="boxdohl">
|
1819 |
<p>
|
1820 |
<input name="<?php echo self::$opt_html5; ?>" id="<?php echo self::$opt_html5; ?>" <?php checked($all[self::$opt_html5], 1); ?> type="checkbox" class="checkbox">
|
1821 |
<label for="<?php echo self::$opt_html5; ?>">
|
1822 |
+
<b class="chktitle strike">HTML5 First:</b>
|
1823 |
+
As of January 2015, YouTube began serving the HTML5 player by default; therefore, this plugin no longer needs a special HTML5 setting. This option is simply kept here as a notice.
|
1824 |
</label>
|
1825 |
</p>
|
1826 |
|
1827 |
<p class="smallnote orange">Below are PRO features for enhanced SEO and performance (works for even past embed links). <a href="<?php echo self::$epbase ?>/dashboard/pro-easy-video-analytics.aspx" target="_blank">Activate them »</a></p>
|
1828 |
+
<div class="upgchecks">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1829 |
<?php
|
1830 |
+
if ($all[self::$opt_pro] && strlen(trim($all[self::$opt_pro])) > 0)
|
1831 |
+
{
|
1832 |
+
?>
|
1833 |
+
|
1834 |
+
<p>
|
1835 |
+
<input name="<?php echo self::$opt_dynload; ?>" id="<?php echo self::$opt_dynload; ?>" <?php checked($all[self::$opt_dynload], 1); ?> type="checkbox" class="checkbox">
|
1836 |
+
<span id="boxdyn">
|
1837 |
+
Animation:
|
1838 |
+
<?php $cleandyn = trim($all[self::$opt_dyntype]); ?>
|
1839 |
+
<select name="<?php echo self::$opt_dyntype; ?>" id="<?php echo self::$opt_dyntype; ?>" >
|
1840 |
+
<option value="">Select type</option>
|
1841 |
+
<option value="rotateIn" <?php echo 'rotateIn' === $cleandyn ? 'selected' : '' ?> >rotate in</option>
|
1842 |
+
<option value="slideInRight" <?php echo 'slideInRight' === $cleandyn ? 'selected' : '' ?> >slide from right</option>
|
1843 |
+
<option value="slideInLeft" <?php echo 'slideInLeft' === $cleandyn ? 'selected' : '' ?> >slide from left</option>
|
1844 |
+
<option value="bounceIn" <?php echo 'bounceIn' === $cleandyn ? 'selected' : '' ?> >bounce in</option>
|
1845 |
+
<option value="flipInX" <?php echo 'flipInX' === $cleandyn ? 'selected' : '' ?> >flip up/down</option>
|
1846 |
+
<option value="flipInY" <?php echo 'flipInY' === $cleandyn ? 'selected' : '' ?> >flip left/right</option>
|
1847 |
+
<option value="pulse" <?php echo 'pulse' === $cleandyn ? 'selected' : '' ?> >pulse</option>
|
1848 |
+
<option value="tada" <?php echo 'tada' === $cleandyn ? 'selected' : '' ?> >jiggle</option>
|
1849 |
+
<option value="fadeInDown" <?php echo 'fadeInDown' === $cleandyn ? 'selected' : '' ?> >fade in downward</option>
|
1850 |
+
<option value="fadeInUp" <?php echo 'fadeInUp' === $cleandyn ? 'selected' : '' ?> >fade in upward</option>
|
1851 |
+
<option value="zoomInDown" <?php echo 'zoomInDown' === $cleandyn ? 'selected' : '' ?> >zoom in downward</option>
|
1852 |
+
<option value="zoomInUp" <?php echo 'zoomInUp' === $cleandyn ? 'selected' : '' ?> >zoom in upward</option>
|
1853 |
+
</select>
|
1854 |
+
</span>
|
1855 |
+
<label for="<?php echo self::$opt_dynload; ?>">
|
1856 |
+
<b>(PRO)</b> <b class="chktitle">Special Loading Effects: <sup class="orange">NEW</sup></b>
|
1857 |
+
Add eye-catching special effects that will make your YouTube embeds bounce, flip, pulse, or slide as they load on the screen. Check this box to select your desired effect. <a target="_blank" href="<?php echo self::$epbase ?>/add-special-effects-to-youtube-embeds-in-wordpress.aspx">Read more here »</a>
|
1858 |
+
</label>
|
1859 |
+
</p>
|
1860 |
+
|
1861 |
+
<p>
|
1862 |
+
<input name="<?php echo self::$opt_schemaorg; ?>" id="<?php echo self::$opt_schemaorg; ?>" <?php checked($all[self::$opt_schemaorg], 1); ?> type="checkbox" class="checkbox">
|
1863 |
+
<label for="<?php echo self::$opt_schemaorg; ?>">
|
1864 |
+
<b>(PRO)</b> <b class="chktitle">Video SEO Tags:</b> Update your YouTube embeds with Google, Bing, and Yahoo friendly video SEO markup.
|
1865 |
+
</label>
|
1866 |
+
</p>
|
1867 |
+
<p>
|
1868 |
+
<br>
|
1869 |
+
<img class="ssfb" src="<?php echo plugins_url('images/ssfb.jpg', __FILE__) ?>" />
|
1870 |
+
<input name="<?php echo self::$opt_ogvideo; ?>" id="<?php echo self::$opt_ogvideo; ?>" <?php checked($all[self::$opt_ogvideo], 1); ?> type="checkbox" class="checkbox">
|
1871 |
+
<label for="<?php echo self::$opt_ogvideo; ?>">
|
1872 |
+
<b>(PRO)</b> <b class="chktitle">Facebook Open Graph Markup:</b> <span class="pronon">(NEW: PRO Users)</span> Update YouTube embeds on your pages with Open Graph markup to enhance Facebook sharing and discovery of the pages. Your shared pages, for example, will also display embedded video thumbnails on Facebook Timelines.
|
1873 |
+
</label>
|
1874 |
+
</p>
|
1875 |
+
<?php
|
1876 |
+
}
|
1877 |
+
else
|
1878 |
+
{
|
1879 |
+
?>
|
1880 |
+
<p>
|
1881 |
+
<input disabled type="checkbox" class="checkbox">
|
1882 |
+
<label>
|
1883 |
+
<b class="chktitle">Special Loading Effects:</b> <span class="pronon">(PRO Users)</span>
|
1884 |
+
Add eye-catching special effects that will make your YouTube embeds bounce, flip, pulse, or slide as they load on the screen. Check this box to select your desired effect. <a target="_blank" href="<?php echo self::$epbase ?>/add-special-effects-to-youtube-embeds-in-wordpress.aspx">Read more here »</a>
|
1885 |
+
</label>
|
1886 |
+
</p>
|
1887 |
+
<p>
|
1888 |
+
<input disabled type="checkbox" class="checkbox">
|
1889 |
+
<label>
|
1890 |
+
<b class="chktitle">Video SEO Tags:</b> <span class="pronon">(PRO Users)</span> Update your YouTube embeds with Google, Bing, and Yahoo friendly video SEO markup.
|
1891 |
+
</label>
|
1892 |
+
</p>
|
1893 |
+
<p>
|
1894 |
+
<br>
|
1895 |
+
<img class="ssfb" src="<?php echo plugins_url('images/ssfb.jpg', __FILE__) ?>" />
|
1896 |
+
<input disabled type="checkbox" class="checkbox">
|
1897 |
+
<label>
|
1898 |
+
<b class="chktitle">Facebook Open Graph Markup:</b> <span class="pronon">(NEW: PRO Users)</span> Update YouTube embeds on your pages with Open Graph markup to enhance Facebook sharing and discovery of the pages. Your shared pages, for example, will also display embedded video thumbnails on Facebook Timelines.
|
1899 |
+
</label>
|
1900 |
+
</p>
|
1901 |
+
|
1902 |
+
<?php
|
1903 |
+
}
|
1904 |
?>
|
1905 |
+
<div class="clearboth"></div>
|
1906 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1907 |
<p class="submit">
|
1908 |
<br>
|
1909 |
<input type="submit" onclick="return savevalidate();" name="Submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
|
1919 |
<?php _e("How To Override Defaults / Other Options") ?> <a href="#top" class="totop">▲ top</a>
|
1920 |
</h3>
|
1921 |
<p>Suppose you have a few videos that need to be different from the above defaults. You can add options to the end of a link as displayed below to override the above defaults. Each option should begin with '&'.
|
1922 |
+
<br><span class="smallnote orange">PRO users: You can use the <a href="<?php echo self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=protab' ?>" target="_blank" class="button-primary cuz">► Customize</a> button that you will see inside the wizard, instead of memorizing the following.</span>
|
1923 |
<?php
|
1924 |
_e('<ul>');
|
1925 |
_e("<li><strong>width</strong> - Sets the width of your player. If omitted, the default width will be the width of your theme's content.<em> Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&width=500</strong>&height=350</em></li>");
|
1937 |
_e("<li><strong>controls</strong> - Set this to 0 to completely hide the video controls (or 2 to show it). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&controls=0</strong></em> </li>");
|
1938 |
_e("<li><strong>autohide</strong> - Set this to 1 to slide away the control bar after the video starts playing. It will automatically slide back in again if you mouse over the video. (Set to 2 to always show it). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&autohide=1</strong></em> </li>");
|
1939 |
_e("<li><strong>playsinline</strong> - Set this to 1 to allow videos play inline with the page on iOS browsers. (Set to 0 to have iOS launch videos in fullscreen instead). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&playsinline=1</strong></em> </li>");
|
1940 |
+
_e("<li><strong>origin</strong> - Set this to 1 to add the 'origin' parameter for extra JavaScript security. <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&origin=1</strong></em> </li>");
|
1941 |
_e('</ul>');
|
1942 |
|
1943 |
_e("<p>You can also start and end each individual video at particular times. Like the above, each option should begin with '&'</p>");
|
2079 |
<li>Finally, there's a slight chance your custom theme is the issue, if you have one. To know for sure, we suggest temporarily switching to one of the default WordPress themes (e.g., "Twenty Thirteen") just to see if your video does appear. If it suddenly works, then your custom theme is the issue. You can switch back when done testing.</li>
|
2080 |
<li>If none of the above work, you can contact us here if you still have issues: ext@embedplus.com. We'll try to respond within a week. PRO users should use the priority form below for faster replies.</li>
|
2081 |
</ul>
|
2082 |
+
<p>
|
2083 |
+
Deactivating the No Cookies option has also been proven to solve player errors.
|
2084 |
+
</p>
|
2085 |
+
<p>
|
2086 |
+
We also have a YouTube channel with some helper videos. <a href="https://www.youtube.com/subscription_center?add_user=EmbedPlus" target="_blank">Subscribe for tips and updates here »</a>
|
2087 |
+
</p>
|
2088 |
</div>
|
2089 |
<br>
|
2090 |
<h3 class="sect">
|
2111 |
<a href="#jumpwiz">Visual YouTube Wizard</a>
|
2112 |
<a href="#jumpdefaults">Set Defaults</a>
|
2113 |
<a href="#jumpoverride">How To Override Defaults</a>
|
2114 |
+
<a target="_blank" href="<?php echo self::$epbase . "/dashboard/pro-easy-video-analytics.aspx?ref=protab" ?>" style="border-color: #888888;">Why Upgrade?</a>
|
2115 |
<a href="#jumpsupport">Support</a>
|
2116 |
</div>
|
2117 |
|
2155 |
}
|
2156 |
}
|
2157 |
|
2158 |
+
// if (jQuery("#<?php echo self::$opt_dohl; ?>").is(":checked"))
|
2159 |
+
// {
|
2160 |
+
// if (!(/^[A-Za-z][A-Za-z]$/.test(jQuery.trim(jQuery("#<?php echo self::$opt_hl; ?>").val()))))
|
2161 |
+
// {
|
2162 |
+
// alertmessage += "Please enter a valid 2-letter language code.";
|
2163 |
+
// jQuery("#boxdohl input").css("background-color", "#ffcccc").css("border", "2px solid #000000");
|
2164 |
+
// valid = false;
|
2165 |
+
// }
|
2166 |
+
// }
|
2167 |
|
2168 |
if (!valid)
|
2169 |
{
|
2203 |
});
|
2204 |
|
2205 |
|
2206 |
+
jQuery('#<?php echo self::$opt_nocookie; ?>').change(function()
|
2207 |
+
{
|
2208 |
+
if (jQuery(this).is(":checked"))
|
2209 |
+
{
|
2210 |
+
jQuery("#boxnocookie").show(500);
|
2211 |
+
}
|
2212 |
+
else
|
2213 |
+
{
|
2214 |
+
jQuery("#boxnocookie").hide(500);
|
2215 |
+
}
|
2216 |
+
|
2217 |
+
});
|
2218 |
+
|
2219 |
|
2220 |
+
// jQuery('#<?php echo self::$opt_dohl; ?>').change(function()
|
2221 |
+
// {
|
2222 |
+
// if (jQuery(this).is(":checked"))
|
2223 |
+
// {
|
2224 |
+
// jQuery("#boxdohl").show(500);
|
2225 |
+
// }
|
2226 |
+
// else
|
2227 |
+
// {
|
2228 |
+
// jQuery("#boxdohl").hide(500);
|
2229 |
+
// }
|
2230 |
+
//
|
2231 |
+
// });
|
2232 |
|
2233 |
|
2234 |
|