YouTube - Version 11.7.1

Version Description

Download this release

Release Info

Developer embedplus
Plugin Icon 128x128 YouTube
Version 11.7.1
Comparing to
See all releases

Code changes from version 11.7 to 11.7.1

readme.txt CHANGED
@@ -1,44 +1,42 @@
1
  === YouTube ===
2
  Contributors: embedplus
3
  Plugin Name: YouTube Embed
4
- Tags: youtube live, live stream, 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, 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, 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.6.1
6
  Tested up to: 4.7
7
- Stable tag: 11.7
8
  License: GPLv3 or later
9
 
10
- YouTube Embed WordPress Plugin. Embed a responsive video, YouTube channel gallery, playlist gallery, or live YouTube.com stream
11
 
12
  == Description ==
13
 
14
- **WordPress YouTube embeds and galleries can be customized in a wide variety of ways with this plugin. Here are a few recently added features:**
15
 
16
- * YouTube Channel and Playlist Gallery - The ability to make playlist (and channel) embeds have a gallery layout. By default, the plugin can generate a grid-based [responsive playlist or channel gallery >>](http://www.embedplus.com/responsive-youtube-playlist-channel-gallery-for-wordpress.aspx). Your visitors can browse through pages of video thumbnails and choose from videos that are pulled from an entire YouTube channel or playlist.
17
- * Auto continuous play for playlist and channel gallery embeds
18
  * YouTube Live Stream - Given a link to a YouTube channel, the plugin wizard automatically finds a live stream if one is active in that channel and generates the embed code for you. On the settings page, you can also set defaults of what to automatically display if a live stream is not active at a given moment. For example, you can have your site display a gallery of a channel's entire video library so that users can have something to watch in the meantime. We hope it's a time saver.
19
  * Improved accessibility by using title attributes for screen reader support. It should help your site pass functional accessibility evaluations (FAE).
20
  * Improved ajax theme support
21
  * 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).
22
- * Easy "Insert" button for both the Visual and Text mode of the editor
23
- * Embed an entire channel as a (non-gallery, single embedded player) playlist
24
- * Start video settings for playlist embeds. You can now choose to start a playlist with a specific video or have the plugin automatically start with the most recently added video.
25
- * [Volume level initialization](http://www.embedplus.com/mute-volume-youtube-wordpress.aspx) - helpful when autoplay is checked
26
  * iOS playback preferences
27
  * Automatic localization/internationalization so you can set the player's interface language from English to another
28
  * 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?
29
  * "At a Glance" direct access to your YouTube posts/pages
30
  * Shortcode support for embedding multiple videos on one line
31
  * General playlist embedding support
32
- * Default HTML5 YouTube player support
33
  * YouTube plugin migration support
34
 
35
- **Click the Download button to start exploring now, or take a look at some details below.**
36
 
37
- This plugin helps you easily manage the growing complexity of YouTube embedding. It provides a spectrum of basic and advanced features of the YouTube embedded player and will have you posting videos in seconds after installing it. **All you have to do is simply paste an unformatted YouTube link on its own line (shortcodes are also supported).** Your YouTube embeds will then show up when you preview or publish the post.
38
 
39
- The settings page has plenty of default options that you can automatically apply to all your embedded YouTube videos:
40
 
41
- * Make your videos, galleries, and live streams responsive so that they dynamically fit in all screen sizes (smart phone, PC and tablet)
42
  * Modest branding - hide YouTube logo while playing (note that the YouTube watermark is shown instead)
43
  * Turn on/off all annotations by default
44
  * Automatically center all your videos
@@ -50,27 +48,25 @@ The settings page has plenty of default options that you can automatically apply
50
  * Use the light theme
51
  * Show/hide player controls
52
  * Turn on/off closed captions by default
53
- * Use "opaque" wmode
54
 
55
  Customizations can be also made to each YouTube embed by adding more to the link as shown below. Adding these will override the above global defaults that you set:
56
 
57
- * width - Sets the width of your player. If omitted, the default width will be the width of your theme's content. Example: `"http://www.youtube.com/watch?v=quwebVjAEJA&width=500&height=350"`
58
- * height - Sets the height of your player. If omitted, this will be calculated for you automatically. Example: `"http://www.youtube.com/watch?v=quwebVjAEJA&width=500&height=350"`
59
- * vq - Set this to `hd720` or `hd1080` to force the video to play in HD quality, if available. Example: `"http://www.youtube.com/watch?v=quwebVjAEJA&vq=hd720"`
60
- * autoplay - Set this to 1 to autoplay the video (or 0 to play the video once). Example: `"http://www.youtube.com/watch?v=quwebVjAEJA&autoplay=1"`
61
- * cc_load_policy - Set this to 1 to turn on closed captioning (or 0 to leave them off). Example: `"http://www.youtube.com/watch?v=quwebVjAEJA&cc_load_policy=1"`
62
- * iv_load_policy - Set this to 3 to turn off annotations (or 1 to show them). Example: `"http://www.youtube.com/watch?v=quwebVjAEJA&iv_load_policy=3"`
63
- * loop - Set this to 1 to loop the video (or 0 to not loop). Example: `"http://www.youtube.com/watch?v=quwebVjAEJA&loop=1"`
64
- * modestbranding - Set this to 1 to remove the YouTube logo while playing (or 0 to show the logo). Example: `"http://www.youtube.com/watch?v=quwebVjAEJA&modestbranding=1"`
65
- * rel - Set this to 0 to not show related videos at the end of playing (or 1 to show them). Example: `"http://www.youtube.com/watch?v=quwebVjAEJA&rel=0"`
66
- * showinfo - Set this to 0 to hide the video title and other info (or 1 to show it). Example: `"http://www.youtube.com/watch?v=quwebVjAEJA&showinfo=0"`
67
- * theme - Set this to 'light' to make the player have the light-colored theme (or 'dark' for the dark theme). Example: `"http://www.youtube.com/watch?v=quwebVjAEJA&theme=light"`
68
- * autohide - 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). Example: `"http://www.youtube.com/watch?v=quwebVjAEJA&autohide=1"`
69
 
70
  You can also start and end each individual video at particular times. Like the above, each option should begin with '&'
71
 
72
- * start - Sets the time (in seconds) to start the video. Example: `"http://www.youtube.com/watch?v=quwebVjAEJA&width=500&height=350&start=20"`
73
- * end - Sets the time (in seconds) to stop the video. Example: `"http://www.youtube.com/watch?v=quwebVjAEJA&width=500&height=350&end=100"`
74
 
75
  > **About [YouTube PRO](https://www.embedplus.com/dashboard/pro-easy-video-analytics.aspx)**
76
  >
@@ -80,7 +76,7 @@ You can also start and end each individual video at particular times. Like the a
80
  > * Alternate playlist and channel gallery styling (list layouts and slider layouts, popup/lightbox player, and more)
81
  > * Caching to avoid making frequent requests to YouTube.com and speed up your page loads
82
  > * Automatic video thumbnail images: each post or page that contains at least one video will have the thumbnail of its first video serve as its featured image
83
- > * [Lazy loading YouTube embeds >>](http://www.embedplus.com/add-special-effects-to-youtube-embeds-in-wordpress.aspx) with eye-catching effects and animations
84
  > * Automatic tagging for video SEO
85
  > * Automatic Open Graph tagging for Facebook
86
  > * Deleted video alerts (i.e., did Google remove or take down videos I previously embedded?)
@@ -99,40 +95,38 @@ You can also start and end each individual video at particular times. Like the a
99
 
100
  See more details after installing. Enjoy!
101
 
102
- [Maintained by EmbedPlus for YouTube >>](http://www.embedplus.com/)
103
 
104
  == Installation ==
105
 
106
  1. Use the WordPress plugin installer to install the plugin. Alternatively, you can just extract the folder in our download package and upload it to your plugin directory.
107
  1. Access the Plugins admin menu to activate the YouTube embed plugin.
108
  1. Make your default settings after clicking the new YouTube menu item that shows up in your admin panel.
109
- 1. To embed videos in your post, start pasting the links with any desired additional codes needed for your YouTube embed (see below section for additional codes). Make sure each link is on its own line. Or, if you need multiple videos on the same line, make sure each URL is wrapped properly with the shortcode. Example: `[embedyt]http://www.youtube.com/watch?v=ABCDEFGHIJK&width=400&height=250[/embedyt]` If you don't know exactly which video you want to embed, use the free built-in search feature to find and insert one.
110
- 1. You can also [embed a playlist and channel gallery with this plugin >>](http://www.embedplus.com/responsive-youtube-playlist-channel-gallery-for-wordpress.aspx). Please install the plugin and visit the settings page for instructions.
111
  1. To get video SEO, an analytics dashboard and many other premium features, [sign up for one of the options here >>](https://www.embedplus.com/dashboard/pro-easy-video-analytics.aspx)
112
 
113
  **Additional codes (adding these will override the default settings in the admin):**
114
 
115
- * width - Sets the width of your player. If omitted, the default width will be the width of your theme's content. Example: `"http://www.youtube.com/watch?v=quwebVjAEJA&width=500&height=350"`
116
- * height - Sets the height of your player. If omitted, this will be calculated for you automatically. Example: `"http://www.youtube.com/watch?v=quwebVjAEJA&width=500&height=350"`
117
- * vq - Set this to `hd720` or `hd1080` to force the video to play in HD quality. Example: `"http://www.youtube.com/watch?v=quwebVjAEJA&vq=hd720"`
118
- * autoplay - Set this to 1 to autoplay the video (or 0 to play the video once). Example: `"http://www.youtube.com/watch?v=quwebVjAEJA&autoplay=1"`
119
- * cc_load_policy - Set this to 1 to turn on closed captioning (or 0 to leave them off). Example: `"http://www.youtube.com/watch?v=quwebVjAEJA&cc_load_policy=1"`
120
- * iv_load_policy - Set this to 3 to turn off annotations (or 1 to show them). Example: `"http://www.youtube.com/watch?v=quwebVjAEJA&iv_load_policy=3"`
121
- * loop - Set this to 1 to loop the video (or 0 to not loop). Example: `"http://www.youtube.com/watch?v=quwebVjAEJA&loop=1"`
122
- * modestbranding - Set this to 1 to remove the YouTube logo while playing (or 0 to show the logo). Example: `"http://www.youtube.com/watch?v=quwebVjAEJA&modestbranding=1"`
123
- * rel - Set this to 0 to not show related videos at the end of playing (or 1 to show them). Example: `"http://www.youtube.com/watch?v=quwebVjAEJA&rel=0"`
124
- * showinfo - Set this to 0 to hide the video title and other info (or 1 to show it). Example: `"http://www.youtube.com/watch?v=quwebVjAEJA&showinfo=0"`
125
- * theme - Set this to 'light' to make the player have the light-colored theme (or 'dark' for the dark theme). Example: `"http://www.youtube.com/watch?v=quwebVjAEJA&theme=light"`
126
- * autohide - 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). Example: `"http://www.youtube.com/watch?v=quwebVjAEJA&autohide=1"`
127
 
128
  You can also start and end each individual video at particular times. Like the above, each option should begin with '&'
129
 
130
- * start - Sets the time (in seconds) to start the video. Example: `"http://www.youtube.com/watch?v=quwebVjAEJA&width=500&height=350&start=20"`
131
- * end - Sets the time (in seconds) to stop the video. Example: `"http://www.youtube.com/watch?v=quwebVjAEJA&width=500&height=350&end=100"`
132
 
133
  **Always follow these rules when pasting a link:**
134
 
135
- * Make sure the url is really on its own line by itself. Or, if you need multiple videos on the same line, make sure each URL is wrapped properly with the shortcode. Example: `[embedyt]http://www.youtube.com/watch?v=ABCDEFGHIJK&width=400&height=250[/embedyt]`
136
  * Make sure the url is not an active hyperlink (i.e., it should just be plain text). Otherwise, highlight the url and click the "unlink" button in your editor.
137
  * Make sure you did **not** format or align the url in any way. If your url still appears in your actual post instead of a video, highlight it and click the "remove formatting" button (formatting can be invisible sometimes).
138
  * 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.
@@ -151,6 +145,11 @@ You can also start and end each individual video at particular times. Like the a
151
 
152
  == Changelog ==
153
 
 
 
 
 
 
154
  = WordPress YouTube Embed 11.7 =
155
  * Separate Free and Pro codebases
156
  * Remove deprecated features
@@ -219,7 +218,7 @@ Enhanced gallery settings for scrolling, video titles, and thumbnail styling.
219
  Addresses limitations some users were getting when pasting a YouTube channel and/or playlist gallery.
220
 
221
  = WordPress YouTube Embed 10.3 =
222
- Adds the ability to make playlist and channel embeds have a gallery layout. By the default, the plugin can generate a grid-based [responsive playlist and channel gallery >>](http://www.embedplus.com/responsive-youtube-playlist-channel-gallery-for-wordpress.aspx)
223
 
224
  = WordPress YouTube Embed 10.2 =
225
  Adds start video settings for playlist embeds. You can now choose to start a playlist with a specific video or have the plugin automatically start with the most recently added video.
@@ -240,10 +239,10 @@ Adds improved accessibility for screen readers and video thumbnail as featured i
240
  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).
241
 
242
  = WordPress YouTube Embed 9.4 =
243
- 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)
244
 
245
  = WordPress YouTube Embed 9.3 =
246
- 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)
247
 
248
  = WordPress YouTube Embed 9.2 =
249
  HTTPS/SSL detection is now fully automatic. The manual checkbox is no longer needed.
@@ -259,7 +258,7 @@ Allows volume level initialization.
259
 
260
  = WordPress YouTube Embed 8.8 =
261
  * Better embedplus plugin conflict notifications.
262
- * Greater emphasis on HTTPS support due to Google's recent announcement about [HTTPS/SSL as an SEO/SERP signal](http://embedplus.com/convert-old-youtube-embeds-to-https-ssl.aspx).
263
  * Supports latest version of WordPress (3.9.2).
264
 
265
  = WordPress YouTube Embed 8.7 =
@@ -383,7 +382,7 @@ Compatible with WP 3.6
383
 
384
  = WordPress YouTube Embed 2.4 =
385
  Added auto HD support
386
- Support for shorthand (i.e. `"http://www.youtu.be"`)
387
  Fixed editor issue
388
 
389
  = WordPress YouTube Embed 2.3 =
1
  === YouTube ===
2
  Contributors: embedplus
3
  Plugin Name: YouTube Embed
4
+ Tags: youtube gallery, video gallery, youtube channel, youtube live, live stream
5
  Requires at least: 3.6.1
6
  Tested up to: 4.7
7
+ Stable tag: 11.7.1
8
  License: GPLv3 or later
9
 
10
+ YouTube Embed and YouTube Gallery WordPress Plugin. Embed a responsive video, YouTube channel, playlist gallery, or live stream
11
 
12
  == Description ==
13
 
14
+ **Your WordPress YouTube embed, YouTube gallery (channel and playlist), and even YouTube live stream can be customized in a wide variety of ways with this plugin. Here are a few recently added features:**
15
 
16
+ * YouTube gallery capability (channel and playlist) The ability to make playlist and channel embeds have a gallery layout. By default, the plugin can generate a grid-based [responsive playlist or channel gallery >>](https://www.embedplus.com/responsive-youtube-playlist-channel-gallery-for-wordpress.aspx). Your visitors can browse through pages of video thumbnails and choose from videos that are pulled from an entire YouTube channel or playlist.
17
+ * YouTube gallery auto continuous play - embed a playlist or channel gallery and allow it to play one video after the next without requiring viewers to click a thumbnail
18
  * YouTube Live Stream - Given a link to a YouTube channel, the plugin wizard automatically finds a live stream if one is active in that channel and generates the embed code for you. On the settings page, you can also set defaults of what to automatically display if a live stream is not active at a given moment. For example, you can have your site display a gallery of a channel's entire video library so that users can have something to watch in the meantime. We hope it's a time saver.
19
  * Improved accessibility by using title attributes for screen reader support. It should help your site pass functional accessibility evaluations (FAE).
20
  * Improved ajax theme support
21
  * 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).
22
+ * Easy "Insert" button for both the Visual and Text mode of the editor (for YouTube gallery and live stream embedding as well)
23
+ * Embed an entire YouTube channel as a (non-gallery, single embedded player) playlist
24
+ * Start video settings for playlist embeds. You can now choose to start a playlist with a specific video or have the plugin automatically start with the most recently added video. **Note: If you’re embedding a YouTube gallery, the order will be defined by the order of the channel or playlist on YouTube.com**
25
+ * [Volume level initialization](https://www.embedplus.com/mute-volume-youtube-wordpress.aspx) - helpful when autoplay is checked
26
  * iOS playback preferences
27
  * Automatic localization/internationalization so you can set the player's interface language from English to another
28
  * 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?
29
  * "At a Glance" direct access to your YouTube posts/pages
30
  * Shortcode support for embedding multiple videos on one line
31
  * General playlist embedding support
 
32
  * YouTube plugin migration support
33
 
34
+ **Click the Download button to start exploring now, or take a look at some more introductory details below.**
35
 
36
+ This plugin helps you easily manage the growing complexity of YouTube embedding. It provides a spectrum of basic and advanced features of the YouTube embedded player and will have you posting videos in seconds after installing it.
37
 
38
+ The settings page has plenty of default options that you can automatically apply to your embedded YouTube video, gallery, and/or live stream:
39
 
 
40
  * Modest branding - hide YouTube logo while playing (note that the YouTube watermark is shown instead)
41
  * Turn on/off all annotations by default
42
  * Automatically center all your videos
48
  * Use the light theme
49
  * Show/hide player controls
50
  * Turn on/off closed captions by default
51
+ * Make your video, gallery, or live stream responsive so that it dynamically fits in all screen sizes (smart phone, PC and tablet)
52
 
53
  Customizations can be also made to each YouTube embed by adding more to the link as shown below. Adding these will override the above global defaults that you set:
54
 
55
+ * width - Sets the width of your player. If omitted, the default width will be the width of your theme's content. Example: `"https://www.youtube.com/watch?v=quwebVjAEJA&width=500&height=350"`
56
+ * height - Sets the height of your player. If omitted, this will be calculated for you automatically. Example: `"https://www.youtube.com/watch?v=quwebVjAEJA&width=500&height=350"`
57
+ * autoplay - Set this to 1 to autoplay the video (or 0 to play the video once). Example: `"https://www.youtube.com/watch?v=quwebVjAEJA&autoplay=1"`
58
+ * cc_load_policy - Set this to 1 to turn on closed captioning (or 0 to leave them off). Example: `"https://www.youtube.com/watch?v=quwebVjAEJA&cc_load_policy=1"`
59
+ * iv_load_policy - Set this to 3 to turn off annotations (or 1 to show them). Example: `"https://www.youtube.com/watch?v=quwebVjAEJA&iv_load_policy=3"`
60
+ * loop - Set this to 1 to loop the video (or 0 to not loop). Example: `"https://www.youtube.com/watch?v=quwebVjAEJA&loop=1"`
61
+ * modestbranding - Set this to 1 to remove the YouTube logo while playing (or 0 to show the logo). Example: `"https://www.youtube.com/watch?v=quwebVjAEJA&modestbranding=1"`
62
+ * rel - Set this to 0 to not show related videos at the end of playing (or 1 to show them). Example: `"https://www.youtube.com/watch?v=quwebVjAEJA&rel=0"`
63
+ * showinfo - Set this to 0 to hide the video title and other info (or 1 to show it). Example: `"https://www.youtube.com/watch?v=quwebVjAEJA&showinfo=0"`
64
+ * autohide - 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). Example: `"https://www.youtube.com/watch?v=quwebVjAEJA&autohide=1"`
 
 
65
 
66
  You can also start and end each individual video at particular times. Like the above, each option should begin with '&'
67
 
68
+ * start - Sets the time (in seconds) to start the video. Example: `"https://www.youtube.com/watch?v=quwebVjAEJA&width=500&height=350&start=20"`
69
+ * end - Sets the time (in seconds) to stop the video. Example: `"https://www.youtube.com/watch?v=quwebVjAEJA&width=500&height=350&end=100"`
70
 
71
  > **About [YouTube PRO](https://www.embedplus.com/dashboard/pro-easy-video-analytics.aspx)**
72
  >
76
  > * Alternate playlist and channel gallery styling (list layouts and slider layouts, popup/lightbox player, and more)
77
  > * Caching to avoid making frequent requests to YouTube.com and speed up your page loads
78
  > * Automatic video thumbnail images: each post or page that contains at least one video will have the thumbnail of its first video serve as its featured image
79
+ > * [Lazy loading YouTube embeds >>](https://www.embedplus.com/add-special-effects-to-youtube-embeds-in-wordpress.aspx) with eye-catching effects and animations
80
  > * Automatic tagging for video SEO
81
  > * Automatic Open Graph tagging for Facebook
82
  > * Deleted video alerts (i.e., did Google remove or take down videos I previously embedded?)
95
 
96
  See more details after installing. Enjoy!
97
 
98
+ [Maintained by EmbedPlus for YouTube >>](https://www.embedplus.com/)
99
 
100
  == Installation ==
101
 
102
  1. Use the WordPress plugin installer to install the plugin. Alternatively, you can just extract the folder in our download package and upload it to your plugin directory.
103
  1. Access the Plugins admin menu to activate the YouTube embed plugin.
104
  1. Make your default settings after clicking the new YouTube menu item that shows up in your admin panel.
105
+ 1. To embed videos in your post, start pasting the links with any desired additional codes needed for your YouTube embed (see below section for additional codes). Make sure each link is on its own line. Or, if you need multiple videos on the same line, make sure each URL is wrapped properly with the shortcode. Example: `[embedyt]https://www.youtube.com/watch?v=ABCDEFGHIJK&width=400&height=250[/embedyt]` If you don't know exactly which video you want to embed, use the free built-in search feature to find and insert one.
106
+ 1. You can also [embed a playlist and channel gallery with this plugin >>](https://www.embedplus.com/responsive-youtube-playlist-channel-gallery-for-wordpress.aspx). Please install the plugin and visit the settings page for instructions.
107
  1. To get video SEO, an analytics dashboard and many other premium features, [sign up for one of the options here >>](https://www.embedplus.com/dashboard/pro-easy-video-analytics.aspx)
108
 
109
  **Additional codes (adding these will override the default settings in the admin):**
110
 
111
+ * width - Sets the width of your player. If omitted, the default width will be the width of your theme's content. Example: `"https://www.youtube.com/watch?v=quwebVjAEJA&width=500&height=350"`
112
+ * height - Sets the height of your player. If omitted, this will be calculated for you automatically. Example: `"https://www.youtube.com/watch?v=quwebVjAEJA&width=500&height=350"`
113
+ * autoplay - Set this to 1 to autoplay the video (or 0 to play the video once). Example: `"https://www.youtube.com/watch?v=quwebVjAEJA&autoplay=1"`
114
+ * cc_load_policy - Set this to 1 to turn on closed captioning (or 0 to leave them off). Example: `"https://www.youtube.com/watch?v=quwebVjAEJA&cc_load_policy=1"`
115
+ * iv_load_policy - Set this to 3 to turn off annotations (or 1 to show them). Example: `"https://www.youtube.com/watch?v=quwebVjAEJA&iv_load_policy=3"`
116
+ * loop - Set this to 1 to loop the video (or 0 to not loop). Example: `"https://www.youtube.com/watch?v=quwebVjAEJA&loop=1"`
117
+ * modestbranding - Set this to 1 to remove the YouTube logo while playing (or 0 to show the logo). Example: `"https://www.youtube.com/watch?v=quwebVjAEJA&modestbranding=1"`
118
+ * rel - Set this to 0 to not show related videos at the end of playing (or 1 to show them). Example: `"https://www.youtube.com/watch?v=quwebVjAEJA&rel=0"`
119
+ * showinfo - Set this to 0 to hide the video title and other info (or 1 to show it). Example: `"https://www.youtube.com/watch?v=quwebVjAEJA&showinfo=0"`
120
+ * autohide - 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). Example: `"https://www.youtube.com/watch?v=quwebVjAEJA&autohide=1"`
 
 
121
 
122
  You can also start and end each individual video at particular times. Like the above, each option should begin with '&'
123
 
124
+ * start - Sets the time (in seconds) to start the video. Example: `"https://www.youtube.com/watch?v=quwebVjAEJA&width=500&height=350&start=20"`
125
+ * end - Sets the time (in seconds) to stop the video. Example: `"https://www.youtube.com/watch?v=quwebVjAEJA&width=500&height=350&end=100"`
126
 
127
  **Always follow these rules when pasting a link:**
128
 
129
+ * Make sure the url is really on its own line by itself. Or, if you need multiple videos on the same line, make sure each URL is wrapped properly with the shortcode. Example: `[embedyt]https://www.youtube.com/watch?v=ABCDEFGHIJK&width=400&height=250[/embedyt]`
130
  * Make sure the url is not an active hyperlink (i.e., it should just be plain text). Otherwise, highlight the url and click the "unlink" button in your editor.
131
  * Make sure you did **not** format or align the url in any way. If your url still appears in your actual post instead of a video, highlight it and click the "remove formatting" button (formatting can be invisible sometimes).
132
  * 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.
145
 
146
  == Changelog ==
147
 
148
+ = WordPress YouTube Embed 11.7.1 =
149
+ * Remove gallery thumbnail translucency
150
+ * Various bug fixes for galleries and the wizard
151
+
152
+
153
  = WordPress YouTube Embed 11.7 =
154
  * Separate Free and Pro codebases
155
  * Remove deprecated features
218
  Addresses limitations some users were getting when pasting a YouTube channel and/or playlist gallery.
219
 
220
  = WordPress YouTube Embed 10.3 =
221
+ Adds the ability to make playlist and channel embeds have a gallery layout. By the default, the plugin can generate a grid-based [responsive playlist and channel gallery >>](https://www.embedplus.com/responsive-youtube-playlist-channel-gallery-for-wordpress.aspx)
222
 
223
  = WordPress YouTube Embed 10.2 =
224
  Adds start video settings for playlist embeds. You can now choose to start a playlist with a specific video or have the plugin automatically start with the most recently added video.
239
  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).
240
 
241
  = WordPress YouTube Embed 9.4 =
242
+ Adds Autofit Widget option for Free and PRO users. Also adds slide from left animation to [PRO effects >>](https://www.embedplus.com/add-special-effects-to-youtube-embeds-in-wordpress.aspx)
243
 
244
  = WordPress YouTube Embed 9.3 =
245
+ Improved volume functionality and interface updates (Free and PRO). [Special effects added to PRO version >>](https://www.embedplus.com/add-special-effects-to-youtube-embeds-in-wordpress.aspx)
246
 
247
  = WordPress YouTube Embed 9.2 =
248
  HTTPS/SSL detection is now fully automatic. The manual checkbox is no longer needed.
258
 
259
  = WordPress YouTube Embed 8.8 =
260
  * Better embedplus plugin conflict notifications.
261
+ * Greater emphasis on HTTPS support due to Google's recent announcement about [HTTPS/SSL as an SEO/SERP signal](https://embedplus.com/convert-old-youtube-embeds-to-https-ssl.aspx).
262
  * Supports latest version of WordPress (3.9.2).
263
 
264
  = WordPress YouTube Embed 8.7 =
382
 
383
  = WordPress YouTube Embed 2.4 =
384
  Added auto HD support
385
+ Support for shorthand (i.e. `"https://www.youtu.be"`)
386
  Fixed editor issue
387
 
388
  = WordPress YouTube Embed 2.3 =
scripts/embedplus_mce.css CHANGED
@@ -37,8 +37,12 @@
37
  background-image: url("../images/btnwizon.png");
38
  }
39
 
40
- body #TB_overlay, body #TB_window {
41
- z-index: 100000000;
 
 
 
 
42
  }
43
 
44
  #media-buttons a.ytprefs_media_link, .wp-core-ui a.ytprefs_media_link, a.ytprefs_media_link
37
  background-image: url("../images/btnwizon.png");
38
  }
39
 
40
+ body #TB_overlay.epyt-thickbox {
41
+ z-index: 100000000 !important;
42
+ }
43
+
44
+ body #TB_window.epyt-thickbox {
45
+ z-index: 100000001 !important;
46
  }
47
 
48
  #media-buttons a.ytprefs_media_link, .wp-core-ui a.ytprefs_media_link, a.ytprefs_media_link
scripts/embedplus_mce.min.css CHANGED
@@ -1 +1,2 @@
1
- .wp_themeSkin span.mce_embedplus_youtubeprefs,span.mce_embedplus_youtubeprefs{background:url(../images/btnprefsoff.png) center center no-repeat!important}.wp_themeSkin span.mce_embedplus_youtubeprefs:hover,span.mce_embedplus_youtubeprefs:hover{background-image:url(../images/btnprefson.png)!important}.wp_themeSkin span.mce_embedplus_youtubeprefs_wiz,span.mce_embedplus_youtubeprefs_wiz{background:url(../images/btnwizoff.png) center center no-repeat!important}.wp_themeSkin span.mce_embedplus_youtubeprefs_wiz:hover,span.mce_embedplus_youtubeprefs_wiz:hover{background-image:url(../images/btnwizon.png)!important}#media-buttons a.ytprefs_media_link span,.wp-core-ui a.ytprefs_media_link span,a.ytprefs_media_link span{background:url(../images/btnwizoff.png) top left no-repeat;display:inline-block;height:16px;margin:2px 2px 0 0;vertical-align:top;width:16px}#media-buttons a.ytprefs_media_link:hover span,.wp-core-ui a.ytprefs_media_link:hover span,a.ytprefs_media_link:hover span{background-image:url(../images/btnwizon.png)}body #TB_overlay,body #TB_window{z-index:100000000}#media-buttons a.ytprefs_media_link,.wp-core-ui a.ytprefs_media_link,a.ytprefs_media_link{background-attachment:scroll;background-clip:border-box;background-color:#F3F3F3;background-image:linear-gradient(#FEFEFE,#F4F4F4);background-origin:padding-box;background-size:auto;border-radius:3px;border:1px solid #bbb;box-sizing:border-box;cursor:pointer;display:inline-block;margin:0 5px 0 0;padding:0 10px 1px .4em;text-decoration:none;text-shadow:#FFF 0 1px 0;white-space:nowrap;outline:#333 0}#dashboard_right_now .page-count a.ytprefs_glance_button:before,#dashboard_right_now .page-count span.ytprefs_glance_button:before{content:'';width:20px;height:20px;background:url(../images/youtubeicon16off.png) 0 1px no-repeat}#toplevel_page_youtube-my-preferences>ul>li.wp-first-item{display:none}#wpadminbar #wp-admin-bar-ytprefs-bar-cache>.ab-item:before{content:"\f311";top:2px}
 
1
+
2
+ .wp_themeSkin span.mce_embedplus_youtubeprefs,span.mce_embedplus_youtubeprefs{background:transparent url("../images/btnprefsoff.png") no-repeat scroll center center!important}.wp_themeSkin span.mce_embedplus_youtubeprefs:hover,span.mce_embedplus_youtubeprefs:hover{background-image:url("../images/btnprefson.png")!important}.wp_themeSkin span.mce_embedplus_youtubeprefs_wiz,span.mce_embedplus_youtubeprefs_wiz{background:transparent url("../images/btnwizoff.png") no-repeat scroll center center!important}.wp_themeSkin span.mce_embedplus_youtubeprefs_wiz:hover,span.mce_embedplus_youtubeprefs_wiz:hover{background-image:url("../images/btnwizon.png")!important}.wp-core-ui a.ytprefs_media_link span,a.ytprefs_media_link span,#media-buttons a.ytprefs_media_link span{background:transparent url("../images/btnwizoff.png") no-repeat scroll top left;display:inline-block;height:16px;margin:2px 2px 0 0;vertical-align:top;width:16px}.wp-core-ui a.ytprefs_media_link:hover span,a.ytprefs_media_link:hover span,#media-buttons a.ytprefs_media_link:hover span{background-image:url("../images/btnwizon.png")}body #TB_overlay.epyt-thickbox{z-index:100000000!important}body #TB_window.epyt-thickbox{z-index:100000001!important}#media-buttons a.ytprefs_media_link,.wp-core-ui a.ytprefs_media_link,a.ytprefs_media_link{background-attachment:scroll;background-clip:border-box;background-color:#f3f3f3;background-image:linear-gradient(#fefefe,#f4f4f4);background-origin:padding-box;background-size:auto;border-radius:3px;border:1px solid #bbb;box-sizing:border-box;cursor:pointer;display:inline-block;margin:0 5px 0 0;outline-color:#333;outline-style:none;outline-width:0;padding:0 10px 1px .4em;text-decoration:none;text-shadow:#FFF 0 1px 0;white-space:nowrap}#dashboard_right_now .page-count a.ytprefs_glance_button:before,#dashboard_right_now .page-count span.ytprefs_glance_button:before{content:'';width:20px;height:20px;background:transparent url('../images/youtubeicon16off.png') no-repeat scroll 0 1px}#toplevel_page_youtube-my-preferences>ul>li.wp-first-item{display:none}#wpadminbar #wp-admin-bar-ytprefs-bar-cache>.ab-item:before{content:"\f311";top:2px}
scripts/fitvids.js CHANGED
@@ -1,11 +1,11 @@
1
  var epdofitvids = epdofitvids || function ($)
2
  {
3
- if (_EPYT_.epresponsiveselector.constructor !== Array)
4
- {
5
- _EPYT_.epresponsiveselector = JSON.parse(_EPYT_.epresponsiveselector);
6
- }
7
 
8
  $.fn.fitVidsEP = function (options) {
 
 
 
 
9
  var settings = {
10
  customSelector: null
11
  };
1
  var epdofitvids = epdofitvids || function ($)
2
  {
 
 
 
 
3
 
4
  $.fn.fitVidsEP = function (options) {
5
+ if (_EPYT_.epresponsiveselector.constructor !== Array)
6
+ {
7
+ _EPYT_.epresponsiveselector = JSON.parse(_EPYT_.epresponsiveselector);
8
+ }
9
  var settings = {
10
  customSelector: null
11
  };
scripts/fitvids.min.js CHANGED
@@ -1,4 +1,2 @@
1
- var epdofitvids=epdofitvids||function(c){_EPYT_.epresponsiveselector.constructor!==Array&&(_EPYT_.epresponsiveselector=JSON.parse(_EPYT_.epresponsiveselector));c.fn.fitVidsEP=function(e){var b={customSelector:null};if(!document.getElementById("fit-vids-style")){var a=document.createElement("div"),f=document.getElementsByTagName("base")[0]||document.getElementsByTagName("script")[0];a.className="fit-vids-style";a.id="fit-vids-style";a.style.display="none";a.innerHTML="&shy;<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
- f.parentNode.insertBefore(a,f)}e&&c.extend(b,e);return this.each(function(){var a=_EPYT_.epresponsiveselector;b.customSelector&&a.push(b.customSelector);a=c(this).find(a.join(","));a=a.not("object object");a.each(function(){var a=c(this);if(!("embed"===this.tagName.toLowerCase()&&a.parent("object").length||a.parent(".fluid-width-video-wrapper").length)){var b="object"===this.tagName.toLowerCase()||a.attr("height")&&!isNaN(parseInt(a.attr("height"),10))?parseInt(a.attr("height"),10):a.height(),d=isNaN(parseInt(a.attr("width"),
3
- 10))?a.width():parseInt(a.attr("width"),10),b=b/d;a.attr("id")||a.attr("id","fitvid"+Math.floor(999999*Math.random()));d=document.createElement("div");d.className="fluid-width-video-wrapper";try{a.wrap(d).parent(".fluid-width-video-wrapper").attr("style","padding-top: "+100*b+"% !important;"),a.removeAttr("height").removeAttr("width")}catch(g){}}})})};c(document).ready(function(){c("body").fitVidsEP();c(document).ajaxSuccess(function(e,b,a){b&&b.responseText&&-1!==b.responseText.indexOf("<iframe ")&&
4
- c("body").fitVidsEP()})});return!0};try{epdofitvids(window.jQuery)}catch(c){};
1
+
2
+ var epdofitvids=epdofitvids||function(a){a.fn.fitVidsEP=function(b){if(_EPYT_.epresponsiveselector.constructor!==Array){_EPYT_.epresponsiveselector=JSON.parse(_EPYT_.epresponsiveselector)}var c={customSelector:null};if(!document.getElementById("fit-vids-style")){var f=document.createElement("div"),d=document.getElementsByTagName("base")[0]||document.getElementsByTagName("script")[0],e="&shy;<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>";f.className="fit-vids-style";f.id="fit-vids-style";f.style.display="none";f.innerHTML=e;d.parentNode.insertBefore(f,d)}if(b){a.extend(c,b)}return this.each(function(){var g=_EPYT_.epresponsiveselector;if(c.customSelector){g.push(c.customSelector)}var h=a(this).find(g.join(","));h=h.not("object object");h.each(function(){var o=a(this);if(this.tagName.toLowerCase()==="embed"&&o.parent("object").length||o.parent(".fluid-width-video-wrapper").length){return}var i=(this.tagName.toLowerCase()==="object"||(o.attr("height")&&!isNaN(parseInt(o.attr("height"),10))))?parseInt(o.attr("height"),10):o.height(),l=!isNaN(parseInt(o.attr("width"),10))?parseInt(o.attr("width"),10):o.width(),m=i/l;if(!o.attr("id")){var n="fitvid"+Math.floor(Math.random()*999999);o.attr("id",n)}var k=document.createElement("div");k.className="fluid-width-video-wrapper";try{o.wrap(k).parent(".fluid-width-video-wrapper").attr("style","padding-top: "+(m*100)+"% !important;");o.removeAttr("height").removeAttr("width")}catch(j){}})})};a(document).ready(function(){a("body").fitVidsEP();a(document).ajaxSuccess(function(c,d,b){if(d&&d.responseText&&d.responseText.indexOf("<iframe ")!==-1){a("body").fitVidsEP()}})});return true};try{epdofitvids(window.jQuery)}catch(err){};
 
 
scripts/ytprefs-admin.js CHANGED
@@ -1,13 +1,76 @@
1
  function widen_ytprefs_wiz() {
2
  setTimeout(function () {
3
- jQuery("#TB_window").animate({marginLeft: '-475px', width: '950px'}, 150, 'swing', function () {
4
  jQuery("#TB_window").get(0).style.setProperty('width', '950px', 'important');
5
  });
 
 
6
 
7
  jQuery("#TB_window iframe").animate({width: '950px'}, 150);
8
  }, 750);
9
  }
 
10
  jQuery(document).ready(function () {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  jQuery('body').on('click.tbyt', "#ytprefs_wiz_button", function () {
12
  widen_ytprefs_wiz();
13
  });
1
  function widen_ytprefs_wiz() {
2
  setTimeout(function () {
3
+ jQuery("#TB_window").addClass('epyt-thickbox').animate({marginLeft: '-475px', width: '950px'}, 150, 'swing', function () {
4
  jQuery("#TB_window").get(0).style.setProperty('width', '950px', 'important');
5
  });
6
+
7
+ jQuery("#TB_overlay").addClass('epyt-thickbox');
8
 
9
  jQuery("#TB_window iframe").animate({width: '950px'}, 150);
10
  }, 750);
11
  }
12
+
13
  jQuery(document).ready(function () {
14
+
15
+ if (window.location.toString().indexOf('https://') === 0)
16
+ {
17
+ window._EPYTA_.wpajaxurl = window._EPYTA_.wpajaxurl.replace("http://", "https://");
18
+ }
19
+ // Create IE + others compatible event handler
20
+ var epeventMethod = window.addEventListener ? "addEventListener" : "attachEvent";
21
+ var epeventer = window[epeventMethod];
22
+ var epmessageEvent = epeventMethod === "attachEvent" ? "onmessage" : "message";
23
+ // Listen to message from child window
24
+ epeventer(epmessageEvent, function (e)
25
+ {
26
+ var embedcode = "";
27
+ try
28
+ {
29
+ if (e.data.indexOf("youtubeembedplus") === 0)
30
+ {
31
+ embedcode = e.data.split("|")[1];
32
+ if (embedcode.indexOf("[") !== 0)
33
+ {
34
+ embedcode = "<p>" + embedcode + "</p>";
35
+ }
36
+
37
+ if (window.tinyMCE !== null && window.tinyMCE.activeEditor !== null && !window.tinyMCE.activeEditor.isHidden())
38
+ {
39
+ if (typeof window.tinyMCE.execInstanceCommand !== 'undefined')
40
+ {
41
+ window.tinyMCE.execInstanceCommand(
42
+ window.tinyMCE.activeEditor.id,
43
+ 'mceInsertContent',
44
+ false,
45
+ embedcode);
46
+ }
47
+ else
48
+ {
49
+ send_to_editor(embedcode);
50
+ }
51
+ }
52
+ else
53
+ {
54
+ embedcode = embedcode.replace('<p>', '\n').replace('</p>', '\n');
55
+ if (typeof QTags.insertContent === 'function')
56
+ {
57
+ QTags.insertContent(embedcode);
58
+ }
59
+ else
60
+ {
61
+ send_to_editor(embedcode);
62
+ }
63
+ }
64
+ tb_remove();
65
+ }
66
+ }
67
+ catch (err)
68
+ {
69
+
70
+ }
71
+ }, false);
72
+
73
+
74
  jQuery('body').on('click.tbyt', "#ytprefs_wiz_button", function () {
75
  widen_ytprefs_wiz();
76
  });
scripts/ytprefs-admin.min.js CHANGED
@@ -1 +1,2 @@
1
- function widen_ytprefs_wiz(){setTimeout(function(){jQuery("#TB_window").animate({marginLeft:"-475px",width:"950px"},150,"swing",function(){jQuery("#TB_window").get(0).style.setProperty("width","950px","important")});jQuery("#TB_window iframe").animate({width:"950px"},150)},750)}jQuery(document).ready(function(){jQuery("body").on("click.tbyt","#ytprefs_wiz_button",function(){widen_ytprefs_wiz()});jQuery(window).resize(widen_ytprefs_wiz)});
 
1
+
2
+ function widen_ytprefs_wiz(){setTimeout(function(){jQuery("#TB_window").addClass("epyt-thickbox").animate({marginLeft:"-475px",width:"950px"},150,"swing",function(){jQuery("#TB_window").get(0).style.setProperty("width","950px","important")});jQuery("#TB_overlay").addClass("epyt-thickbox");jQuery("#TB_window iframe").animate({width:"950px"},150)},750)}jQuery(document).ready(function(){if(window.location.toString().indexOf("https://")===0){window._EPYTA_.wpajaxurl=window._EPYTA_.wpajaxurl.replace("http://","https://")}var c=window.addEventListener?"addEventListener":"attachEvent";var b=window[c];var a=c==="attachEvent"?"onmessage":"message";b(a,function(g){var d="";try{if(g.data.indexOf("youtubeembedplus")===0){d=g.data.split("|")[1];if(d.indexOf("[")!==0){d="<p>"+d+"</p>"}if(window.tinyMCE!==null&&window.tinyMCE.activeEditor!==null&&!window.tinyMCE.activeEditor.isHidden()){if(typeof window.tinyMCE.execInstanceCommand!=="undefined"){window.tinyMCE.execInstanceCommand(window.tinyMCE.activeEditor.id,"mceInsertContent",false,d)}else{send_to_editor(d)}}else{d=d.replace("<p>","\n").replace("</p>","\n");if(typeof QTags.insertContent==="function"){QTags.insertContent(d)}else{send_to_editor(d)}}tb_remove()}}catch(f){}},false);jQuery("body").on("click.tbyt","#ytprefs_wiz_button",function(){widen_ytprefs_wiz()});jQuery(window).resize(widen_ytprefs_wiz)});
scripts/ytprefs-wizard.min.js CHANGED
@@ -1,6 +1,2 @@
1
- var _EPYTWIZ_=_EPYTWIZ_||{};
2
- (function(a){_EPYTWIZ_.selectText=_EPYTWIZ_.selectText||function(a){if(document.selection){var b=document.body.createTextRange();b.moveToElementText(a);b.select()}else window.getSelection&&(b=document.createRange(),b.selectNode(a),window.getSelection().addRange(b))};_EPYTWIZ_.loadmovieplain=_EPYTWIZ_.loadmovieplain||function(b){var c;c='<iframe width="600" height="368" src="//www.youtube.com/embed/~ytid?showinfo=0&autoplay=1" frameborder="0" allowfullscreen ></iframe>'.replace(/~ytid/g,b);a("#watch"+
3
- b).html(c);a("#closeme"+b).css("display","inline");a("#moviecontainer"+b).css("display","block");document.getElementById("scrollwatch"+b)&&setTimeout(function(){a("html, body").animate({scrollTop:a("#scrollwatch"+b).offset().top-50},250,function(){})},800)};_EPYTWIZ_.closeme=_EPYTWIZ_.closeme||function(b){a("#moviecontainer"+b).css("display","none");a("#watch"+b).html("")};a(document).ready(function(){a(".wiz-accordion").accordion({header:"h3",collapsible:!0,active:!1,icons:{header:"ui-icon-circle-arrow-e",
4
- activeHeader:"ui-icon-circle-arrow-s"},heightStyle:"content",autoHeight:!1}).find("h3.header-go").click(function(){window.open(a(this).find("a").attr("href"),"_blank");return!1});a(".playlist-tabs").tabs();_EPYTWIZ_.acc_expand&&a(".wiz-accordion #"+_EPYTWIZ_.acc_expand).click();a("form.wizform").each(function(){$thisForm=a(this);$thisForm.find(".txturlpastecustom").on("paste",function(){$thisTxtUrl=a(this);setTimeout(function(){var b=a.trim($thisTxtUrl.val());/<.*/i.test(b)?((b=RegExp("(?:https?://)?(?:www\\.)?(?:youtu\\.be/|youtube\\.com(?:/embed/|/v/|/watch\\?v=))([\\w-]{10,12})",
5
- "ig").exec(b))?$thisTxtUrl.val("https://www.youtube.com/watch?v="+b[1]):$thisTxtUrl.val("https://www.youtube.com/watch?v="),$thisForm.find(".badpaste").show()):$thisForm.find(".badpaste").hide()},100)})});a("#epyt_wiz_wrap").on("click",".copycode",function(){_EPYTWIZ_.selectText(this)});a("#epyt_wiz_wrap").on("click",".inserttopost",function(){var b=window.location.toString().split("/")[0]+"//"+window.location.toString().split("/")[2],c=a(this).attr("rel");parent.postMessage("youtubeembedplus|"+c,
6
- b)});a("#epyt_wiz_wrap").on("click",".resultdiv .load-movie",function(){_EPYTWIZ_.loadmovieplain(a(this).closest(".resultdiv").data("vid"));return!1});a("#epyt_wiz_wrap").on("click",".moviecontainer a.closeme",function(){_EPYTWIZ_.closeme(a(this).data("vid"))})})})(jQuery);
1
+
2
+ var _EPYTWIZ_=_EPYTWIZ_||{};(function(a){_EPYTWIZ_.selectText=_EPYTWIZ_.selectText||function(c){if(document.selection){var b=document.body.createTextRange();b.moveToElementText(c);b.select()}else{if(window.getSelection){var b=document.createRange();b.selectNode(c);window.getSelection().addRange(b)}}};_EPYTWIZ_.loadmovieplain=_EPYTWIZ_.loadmovieplain||function(b){var c='<iframe width="600" height="368" src="//www.youtube.com/embed/~ytid?showinfo=0&autoplay=1" frameborder="0" allowfullscreen ></iframe>';c=c.replace(/~ytid/g,b);a("#watch"+b).html(c);a("#closeme"+b).css("display","inline");a("#moviecontainer"+b).css("display","block");if(document.getElementById("scrollwatch"+b)){setTimeout(function(){a("html, body").animate({scrollTop:a("#scrollwatch"+b).offset().top-50},250,function(){})},800)}};_EPYTWIZ_.closeme=_EPYTWIZ_.closeme||function(b){a("#moviecontainer"+b).css("display","none");a("#watch"+b).html("")};a(document).ready(function(){a(".wiz-accordion").accordion({header:"h3",collapsible:true,active:false,icons:{header:"ui-icon-circle-arrow-e",activeHeader:"ui-icon-circle-arrow-s"},heightStyle:"content",autoHeight:false}).find("h3.header-go").click(function(){window.open(a(this).find("a").attr("href"),"_blank");return false});a(".playlist-tabs").tabs();if(_EPYTWIZ_.acc_expand){a(".wiz-accordion #"+_EPYTWIZ_.acc_expand).click()}a("form.wizform").each(function(){$thisForm=a(this);$thisForm.find(".txturlpastecustom").on("paste",function(){$thisTxtUrl=a(this);setTimeout(function(){var c=a.trim($thisTxtUrl.val());var b=/<.*/i;if(b.test(c)){var d=new RegExp("(?:https?://)?(?:www\\.)?(?:youtu\\.be/|youtube\\.com(?:/embed/|/v/|/watch\\?v=))([\\w-]{10,12})","ig");var e=d.exec(c);if(e){var f=e[1];$thisTxtUrl.val("https://www.youtube.com/watch?v="+f)}else{$thisTxtUrl.val("https://www.youtube.com/watch?v=")}$thisForm.find(".badpaste").show()}else{$thisForm.find(".badpaste").hide()}},100)})});a("#epyt_wiz_wrap").on("click",".copycode",function(){_EPYTWIZ_.selectText(this)});a("#epyt_wiz_wrap").on("click",".inserttopost",function(){var b=window.location.toString().split("/")[0]+"//"+window.location.toString().split("/")[2];var c=a(this).attr("rel");parent.postMessage("youtubeembedplus|"+c,b)});a("#epyt_wiz_wrap").on("click",".resultdiv .load-movie",function(){_EPYTWIZ_.loadmovieplain(a(this).closest(".resultdiv").data("vid"));return false});a("#epyt_wiz_wrap").on("click",".moviecontainer a.closeme",function(){_EPYTWIZ_.closeme(a(this).data("vid"))})})})(jQuery);
 
 
 
 
scripts/ytprefs.js CHANGED
@@ -12,6 +12,11 @@
12
  usingdefault: true
13
  };
14
 
 
 
 
 
 
15
  window._EPYT_.pageLoaded = false;
16
  $(window).on('load._EPYT_', function () {
17
  window._EPYT_.pageLoaded = true;
@@ -88,7 +93,7 @@
88
  $currvid = $gallery.find('.epyt-gallery-thumb').first();
89
  }
90
  var $nextvid = $currvid.find(' ~ .epyt-gallery-thumb').first();
91
-
92
  if ($nextvid.length)
93
  {
94
  $nextvid.click();
@@ -106,7 +111,6 @@
106
  {
107
  return new RegExp("[\\?&]v=([^&#]*)").exec(s)[1];
108
  },
109
-
110
  setupevents: function (iframeid)
111
  {
112
  window._EPADashboard_.log('Setting up YT API events: ' + iframeid);
@@ -122,24 +126,23 @@
122
  });
123
  }
124
  },
125
-
126
  apiInit: function () {
127
- setTimeout(function ()
 
 
128
  {
129
- if (typeof (window.YT) !== 'undefined')
 
 
130
  {
131
- window._EPADashboard_.initStarted = true;
132
- var __allytifr = document.querySelectorAll(_EPYT_.evselector);
133
- for (var i = 0; i < __allytifr.length; i++)
134
  {
135
- if (!__allytifr[i].hasAttribute("id"))
136
- {
137
- __allytifr[i].id = "_dytid_" + Math.round(Math.random() * 8999 + 1000);
138
- }
139
- window._EPADashboard_.setupevents(__allytifr[i].id);
140
  }
 
141
  }
142
- }, 300);
 
143
  },
144
  log: function (msg) {
145
  try
@@ -187,7 +190,7 @@
187
  {
188
  $(window).on('load._EPYT_', function () {
189
  window._EPADashboard_.apiInit();
190
- window._EPADashboard_.log('YT API ready');
191
  });
192
  }
193
  };
@@ -209,7 +212,7 @@
209
  else
210
  {
211
  $(window).on('load._EPYT_', function () {
212
- window._EPADashboard_.log('YT API available');
213
  window._EPADashboard_.apiInit();
214
  });
215
  }
@@ -226,12 +229,12 @@
226
  });
227
  }
228
 
229
-
230
  $(document).ready(function () {
231
  $('.epyt-gallery').each(function () {
232
  var $container = $(this);
233
  var $iframe = $(this).find('iframe').first();
234
-
235
  var initSrc = $iframe.attr('src');
236
  if (!initSrc)
237
  {
@@ -264,14 +267,14 @@
264
 
265
  $iframe.addClass('epyt-thumbplay');
266
  }
267
-
268
- // https://github.com/jquery/jquery-ui/blob/master/ui/scroll-parent.js
269
- $('html, body').animate({
270
- scrollTop: $iframe.offset().top - parseInt(_EPYT_.gallery_scrolloffset)
271
- }, 500, function () {
272
- $iframe.attr('src', vidSrc);
273
- window._EPADashboard_.setupevents($iframe.attr('id'));
274
- });
275
 
276
 
277
  }).on('keydown', '.epyt-gallery-list .epyt-gallery-thumb, .epyt-pagebutton', function (e) {
@@ -288,7 +291,7 @@
288
  });
289
 
290
  $container.on('mouseleave', '.epyt-gallery-list .epyt-gallery-thumb', function () {
291
- $(this).removeClass('hover');
292
  });
293
 
294
  $container.on('click', '.epyt-pagebutton', function () {
12
  usingdefault: true
13
  };
14
 
15
+ if (window.location.toString().indexOf('https://') === 0)
16
+ {
17
+ window._EPYT_.ajaxurl = window._EPYT_.ajaxurl.replace("http://", "https://");
18
+ }
19
+
20
  window._EPYT_.pageLoaded = false;
21
  $(window).on('load._EPYT_', function () {
22
  window._EPYT_.pageLoaded = true;
93
  $currvid = $gallery.find('.epyt-gallery-thumb').first();
94
  }
95
  var $nextvid = $currvid.find(' ~ .epyt-gallery-thumb').first();
96
+
97
  if ($nextvid.length)
98
  {
99
  $nextvid.click();
111
  {
112
  return new RegExp("[\\?&]v=([^&#]*)").exec(s)[1];
113
  },
 
114
  setupevents: function (iframeid)
115
  {
116
  window._EPADashboard_.log('Setting up YT API events: ' + iframeid);
126
  });
127
  }
128
  },
 
129
  apiInit: function () {
130
+ //setTimeout(function ()
131
+ //{
132
+ if (typeof (window.YT) !== 'undefined')
133
  {
134
+ window._EPADashboard_.initStarted = true;
135
+ var __allytifr = document.querySelectorAll(_EPYT_.evselector);
136
+ for (var i = 0; i < __allytifr.length; i++)
137
  {
138
+ if (!__allytifr[i].hasAttribute("id"))
 
 
139
  {
140
+ __allytifr[i].id = "_dytid_" + Math.round(Math.random() * 8999 + 1000);
 
 
 
 
141
  }
142
+ window._EPADashboard_.setupevents(__allytifr[i].id);
143
  }
144
+ }
145
+ //}, 300);
146
  },
147
  log: function (msg) {
148
  try
190
  {
191
  $(window).on('load._EPYT_', function () {
192
  window._EPADashboard_.apiInit();
193
+ window._EPADashboard_.log('YT API ready 2');
194
  });
195
  }
196
  };
212
  else
213
  {
214
  $(window).on('load._EPYT_', function () {
215
+ window._EPADashboard_.log('YT API available 2');
216
  window._EPADashboard_.apiInit();
217
  });
218
  }
229
  });
230
  }
231
 
232
+
233
  $(document).ready(function () {
234
  $('.epyt-gallery').each(function () {
235
  var $container = $(this);
236
  var $iframe = $(this).find('iframe').first();
237
+
238
  var initSrc = $iframe.attr('src');
239
  if (!initSrc)
240
  {
267
 
268
  $iframe.addClass('epyt-thumbplay');
269
  }
270
+
271
+ // https://github.com/jquery/jquery-ui/blob/master/ui/scroll-parent.js
272
+ $('html, body').animate({
273
+ scrollTop: $iframe.offset().top - parseInt(_EPYT_.gallery_scrolloffset)
274
+ }, 500, function () {
275
+ $iframe.attr('src', vidSrc);
276
+ window._EPADashboard_.setupevents($iframe.attr('id'));
277
+ });
278
 
279
 
280
  }).on('keydown', '.epyt-gallery-list .epyt-gallery-thumb, .epyt-pagebutton', function (e) {
291
  });
292
 
293
  $container.on('mouseleave', '.epyt-gallery-list .epyt-gallery-thumb', function () {
294
+ $(this).removeClass('hover');
295
  });
296
 
297
  $container.on('click', '.epyt-pagebutton', function () {
scripts/ytprefs.min.js CHANGED
@@ -1,13 +1,2 @@
1
- (function(a,c){a._EPYT_=a._EPYT_||{ajaxurl:"/wp-admin/admin-ajax.php",security:"",gallery_scrolloffset:100,eppathtoscripts:"/wp-content/plugins/youtube-embed-plus/scripts/",epresponsiveselector:["iframe.__youtube_prefs_widget__"],epdovol:!0,evselector:'iframe.__youtube_prefs__[src], iframe[src*="youtube.com/embed/"], iframe[src*="youtube-nocookie.com/embed/"]',stopMobileBuffer:!0,usingdefault:!0};a._EPYT_.pageLoaded=!1;c(a).on("load._EPYT_",function(){a._EPYT_.pageLoaded=!0});document.querySelectorAll||
2
- (document.querySelectorAll=function(b){var e=document,c=e.documentElement.firstChild,g=e.createElement("STYLE");c.appendChild(g);e.__qsaels=[];g.styleSheet.cssText=b+"{x:expression(document.__qsaels.push(this))}";a.scrollBy(0,0);return e.__qsaels});"undefined"===typeof a._EPADashboard_&&(a._EPADashboard_={initStarted:!1,checkCount:0,onPlayerReady:function(b){try{if("undefined"!==typeof _EPYT_.epdovol&&_EPYT_.epdovol){var a=parseInt(b.target.getIframe().getAttribute("data-vol"));isNaN(a)||(0===a?b.target.mute():
3
- (b.target.isMuted()&&b.target.unMute(),b.target.setVolume(a)))}}catch(d){}},onPlayerStateChange:function(b){var e=b.target.getIframe();b.data===a.YT.PlayerState.PLAYING&&!0!==b.target.ponce&&-1===e.src.indexOf("autoplay=1")&&(b.target.ponce=!0);var d=c(e).closest(".epyt-gallery");d.length||(d=c("#"+c(e).data("epytgalleryid")));d.length&&"1"==d.find(".epyt-pagebutton").first().data("autonext")&&b.data===a.YT.PlayerState.ENDED&&(b=d.find(".epyt-current-video"),b.length||(b=d.find(".epyt-gallery-thumb").first()),
4
- b=b.find(" ~ .epyt-gallery-thumb").first(),b.length?b.click():d.find('.epyt-pagebutton.epyt-next[data-pagetoken!=""][data-pagetoken]').first().click())},justid:function(b){return/[\?&]v=([^&#]*)/.exec(b)[1]},setupevents:function(b){a._EPADashboard_.log("Setting up YT API events: "+b);if("undefined"!==typeof a.YT&&null!==a.YT&&a.YT.loaded)return document.getElementById(b).epytsetupdone=!0,new a.YT.Player(b,{events:{onReady:a._EPADashboard_.onPlayerReady,onStateChange:a._EPADashboard_.onPlayerStateChange}})},
5
- apiInit:function(){setTimeout(function(){if("undefined"!==typeof a.YT){a._EPADashboard_.initStarted=!0;for(var b=document.querySelectorAll(_EPYT_.evselector),c=0;c<b.length;c++)b[c].hasAttribute("id")||(b[c].id="_dytid_"+Math.round(8999*Math.random()+1E3)),a._EPADashboard_.setupevents(b[c].id)}},300)},log:function(b){try{console.log(b)}catch(e){}},doubleCheck:function(){a._EPADashboard_.checkInterval=setInterval(function(){a._EPADashboard_.checkCount++;5<=a._EPADashboard_.checkCount||a._EPADashboard_.initStarted?
6
- clearInterval(a._EPADashboard_.checkInterval):(a._EPADashboard_.apiInit(),a._EPADashboard_.log("YT API init"))},1E3)},selectText:function(b){if(document.selection){var c=document.body.createTextRange();c.moveToElementText(b);c.select()}else a.getSelection&&(c=document.createRange(),c.selectNode(b),a.getSelection().addRange(c))}});a.onYouTubeIframeAPIReady="undefined"!==typeof a.onYouTubeIframeAPIReady?a.onYouTubeIframeAPIReady:function(){if(a._EPYT_.pageLoaded)a._EPADashboard_.apiInit(),a._EPADashboard_.log("YT API ready");
7
- else c(a).on("load._EPYT_",function(){a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API ready")})};if("undefined"===typeof a.YT){var h=document.createElement("script");h.src="//www.youtube.com/iframe_api";h.type="text/javascript";document.getElementsByTagName("head")[0].appendChild(h)}else if(a.YT.loaded)if(a._EPYT_.pageLoaded)a._EPADashboard_.log("YT API available"),a._EPADashboard_.apiInit();else c(a).on("load._EPYT_",function(){a._EPADashboard_.log("YT API available");a._EPADashboard_.apiInit()});
8
- if(a._EPYT_.pageLoaded)a._EPADashboard_.doubleCheck();else c(a).on("load._EPYT_",function(){a._EPADashboard_.doubleCheck()});c(document).ready(function(){c(".epyt-gallery").each(function(){var b=c(this),e=c(this).find("iframe").first(),d=e.attr("src");d||(d=e.data("ep-src"));var g=c(this).find(".epyt-gallery-list .epyt-gallery-thumb").first().data("videoid"),d=d.replace(g,"GALLERYVIDEOID");e.data("ep-gallerysrc",d);b.find(".epyt-gallery-list");b.on("click",".epyt-gallery-list .epyt-gallery-thumb",
9
- function(){b.find(".epyt-gallery-list .epyt-gallery-thumb").removeClass("epyt-current-video");c(this).addClass("epyt-current-video");var d=c(this).data("videoid");b.data("currvid",d);var f=e.data("ep-gallerysrc").replace("GALLERYVIDEOID",d),d=b.find(".epyt-pagebutton").first().data("thumbplay");"0"!==d&&0!==d&&(f=0<f.indexOf("autoplay")?f.replace("autoplay=0","autoplay=1"):f+"&autoplay=1",e.addClass("epyt-thumbplay"));c("html, body").animate({scrollTop:e.offset().top-parseInt(_EPYT_.gallery_scrolloffset)},
10
- 500,function(){e.attr("src",f);a._EPADashboard_.setupevents(e.attr("id"))})}).on("keydown",".epyt-gallery-list .epyt-gallery-thumb, .epyt-pagebutton",function(b){var a=b.which;if(13===a||32===a)b.preventDefault(),c(this).click()});b.on("mouseenter",".epyt-gallery-list .epyt-gallery-thumb",function(){c(this).addClass("hover")});b.on("mouseleave",".epyt-gallery-list .epyt-gallery-thumb",function(){c(this).removeClass("hover")});b.on("click",".epyt-pagebutton",function(){var a={action:"my_embedplus_gallery_page",
11
- security:_EPYT_.security,options:{playlistId:c(this).data("playlistid"),pageToken:c(this).data("pagetoken"),pageSize:c(this).data("pagesize"),columns:c(this).data("columns"),showTitle:c(this).data("showtitle"),showPaging:c(this).data("showpaging"),autonext:c(this).data("autonext"),thumbplay:c(this).data("thumbplay")}},d=c(this).hasClass("epyt-next"),e=parseInt(b.data("currpage")+"");b.data("currpage",e+(d?1:-1));b.find(".epyt-gallery-list").addClass("epyt-loading");c.post(_EPYT_.ajaxurl,a,function(a){b.find(".epyt-gallery-list").html(a);
12
- b.find(".epyt-current").each(function(){c(this).text(b.data("currpage"))});b.find('.epyt-gallery-thumb[data-videoid="'+b.data("currvid")+'"]').addClass("epyt-current-video");"1"==b.find(".epyt-pagebutton").first().data("autonext")&&b.find(".epyt-gallery-thumb").first().click()}).fail(function(){alert("Sorry, there was an error loading the next page.")}).always(function(){b.find(".epyt-gallery-list").removeClass("epyt-loading");c("html, body").animate({scrollTop:b.find(".epyt-gallery-list").offset().top-
13
- parseInt(_EPYT_.gallery_scrolloffset)},500)})})})})})(window,jQuery);
1
+
2
+ (function(a,b){a._EPYT_=a._EPYT_||{ajaxurl:"/wp-admin/admin-ajax.php",security:"",gallery_scrolloffset:100,eppathtoscripts:"/wp-content/plugins/youtube-embed-plus/scripts/",epresponsiveselector:["iframe.__youtube_prefs_widget__"],epdovol:true,evselector:'iframe.__youtube_prefs__[src], iframe[src*="youtube.com/embed/"], iframe[src*="youtube-nocookie.com/embed/"]',stopMobileBuffer:true,usingdefault:true};if(a.location.toString().indexOf("https://")===0){a._EPYT_.ajaxurl=a._EPYT_.ajaxurl.replace("http://","https://")}a._EPYT_.pageLoaded=false;b(a).on("load._EPYT_",function(){a._EPYT_.pageLoaded=true});if(!document.querySelectorAll){document.querySelectorAll=function(e){var g=document,f=g.documentElement.firstChild,d=g.createElement("STYLE");f.appendChild(d);g.__qsaels=[];d.styleSheet.cssText=e+"{x:expression(document.__qsaels.push(this))}";a.scrollBy(0,0);return g.__qsaels}}if(typeof a._EPADashboard_==="undefined"){a._EPADashboard_={initStarted:false,checkCount:0,onPlayerReady:function(f){try{if(typeof _EPYT_.epdovol!=="undefined"&&_EPYT_.epdovol){var d=parseInt(f.target.getIframe().getAttribute("data-vol"));if(!isNaN(d)){if(d===0){f.target.mute()}else{if(f.target.isMuted()){f.target.unMute()}f.target.setVolume(d)}}}}catch(e){}},onPlayerStateChange:function(g){var f=g.target.getIframe();if(g.data===a.YT.PlayerState.PLAYING&&g.target.ponce!==true&&f.src.indexOf("autoplay=1")===-1){g.target.ponce=true}var d=b(f).closest(".epyt-gallery");if(!d.length){d=b("#"+b(f).data("epytgalleryid"))}if(d.length){var e=d.find(".epyt-pagebutton").first().data("autonext")=="1";if(e&&g.data===a.YT.PlayerState.ENDED){var h=d.find(".epyt-current-video");if(!h.length){h=d.find(".epyt-gallery-thumb").first()}var i=h.find(" ~ .epyt-gallery-thumb").first();if(i.length){i.click()}else{d.find('.epyt-pagebutton.epyt-next[data-pagetoken!=""][data-pagetoken]').first().click()}}}},justid:function(d){return new RegExp("[\\?&]v=([^&#]*)").exec(d)[1]},setupevents:function(e){a._EPADashboard_.log("Setting up YT API events: "+e);if(typeof(a.YT)!=="undefined"&&a.YT!==null&&a.YT.loaded){var d=document.getElementById(e);d.epytsetupdone=true;return new a.YT.Player(e,{events:{onReady:a._EPADashboard_.onPlayerReady,onStateChange:a._EPADashboard_.onPlayerStateChange}})}},apiInit:function(){if(typeof(a.YT)!=="undefined"){a._EPADashboard_.initStarted=true;var d=document.querySelectorAll(_EPYT_.evselector);for(var e=0;e<d.length;e++){if(!d[e].hasAttribute("id")){d[e].id="_dytid_"+Math.round(Math.random()*8999+1000)}a._EPADashboard_.setupevents(d[e].id)}}},log:function(e){try{console.log(e)}catch(d){}},doubleCheck:function(){a._EPADashboard_.checkInterval=setInterval(function(){a._EPADashboard_.checkCount++;if(a._EPADashboard_.checkCount>=5||a._EPADashboard_.initStarted){clearInterval(a._EPADashboard_.checkInterval)}else{a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API init")}},1000)},selectText:function(e){if(document.selection){var d=document.body.createTextRange();d.moveToElementText(e);d.select()}else{if(a.getSelection){var d=document.createRange();d.selectNode(e);a.getSelection().addRange(d)}}}}}a.onYouTubeIframeAPIReady=typeof a.onYouTubeIframeAPIReady!=="undefined"?a.onYouTubeIframeAPIReady:function(){if(a._EPYT_.pageLoaded){a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API ready")}else{b(a).on("load._EPYT_",function(){a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API ready 2")})}};if(typeof a.YT==="undefined"){var c=document.createElement("script");c.src="//www.youtube.com/iframe_api";c.type="text/javascript";document.getElementsByTagName("head")[0].appendChild(c)}else{if(a.YT.loaded){if(a._EPYT_.pageLoaded){a._EPADashboard_.log("YT API available");a._EPADashboard_.apiInit()}else{b(a).on("load._EPYT_",function(){a._EPADashboard_.log("YT API available 2");a._EPADashboard_.apiInit()})}}}if(a._EPYT_.pageLoaded){a._EPADashboard_.doubleCheck()}else{b(a).on("load._EPYT_",function(){a._EPADashboard_.doubleCheck()})}b(document).ready(function(){b(".epyt-gallery").each(function(){var h=b(this);var g=b(this).find("iframe").first();var e=g.attr("src");if(!e){e=g.data("ep-src")}var f=b(this).find(".epyt-gallery-list .epyt-gallery-thumb").first().data("videoid");e=e.replace(f,"GALLERYVIDEOID");g.data("ep-gallerysrc",e);var d=h.find(".epyt-gallery-list");h.on("click",".epyt-gallery-list .epyt-gallery-thumb",function(){h.find(".epyt-gallery-list .epyt-gallery-thumb").removeClass("epyt-current-video");b(this).addClass("epyt-current-video");var i=b(this).data("videoid");h.data("currvid",i);var k=g.data("ep-gallerysrc").replace("GALLERYVIDEOID",i);var j=h.find(".epyt-pagebutton").first().data("thumbplay");if(j!=="0"&&j!==0){if(k.indexOf("autoplay")>0){k=k.replace("autoplay=0","autoplay=1")}else{k+="&autoplay=1"}g.addClass("epyt-thumbplay")}b("html, body").animate({scrollTop:g.offset().top-parseInt(_EPYT_.gallery_scrolloffset)},500,function(){g.attr("src",k);a._EPADashboard_.setupevents(g.attr("id"))})}).on("keydown",".epyt-gallery-list .epyt-gallery-thumb, .epyt-pagebutton",function(j){var i=j.which;if((i===13)||(i===32)){j.preventDefault();b(this).click()}});h.on("mouseenter",".epyt-gallery-list .epyt-gallery-thumb",function(){b(this).addClass("hover")});h.on("mouseleave",".epyt-gallery-list .epyt-gallery-thumb",function(){b(this).removeClass("hover")});h.on("click",".epyt-pagebutton",function(){var k={action:"my_embedplus_gallery_page",security:_EPYT_.security,options:{playlistId:b(this).data("playlistid"),pageToken:b(this).data("pagetoken"),pageSize:b(this).data("pagesize"),columns:b(this).data("columns"),showTitle:b(this).data("showtitle"),showPaging:b(this).data("showpaging"),autonext:b(this).data("autonext"),thumbplay:b(this).data("thumbplay")}};var i=b(this).hasClass("epyt-next");var j=parseInt(h.data("currpage")+"");j+=i?1:-1;h.data("currpage",j);h.find(".epyt-gallery-list").addClass("epyt-loading");b.post(_EPYT_.ajaxurl,k,function(l){h.find(".epyt-gallery-list").html(l);h.find(".epyt-current").each(function(){b(this).text(h.data("currpage"))});h.find('.epyt-gallery-thumb[data-videoid="'+h.data("currvid")+'"]').addClass("epyt-current-video");if(h.find(".epyt-pagebutton").first().data("autonext")=="1"){h.find(".epyt-gallery-thumb").first().click()}}).fail(function(){alert("Sorry, there was an error loading the next page.")}).always(function(){h.find(".epyt-gallery-list").removeClass("epyt-loading");b("html, body").animate({scrollTop:h.find(".epyt-gallery-list").offset().top-parseInt(_EPYT_.gallery_scrolloffset)},500)})})})})})(window,jQuery);
 
 
 
 
 
 
 
 
 
 
 
styles/ytprefs-wizard.min.css CHANGED
@@ -1 +1,2 @@
1
- #adminmenu,#adminmenuback,#footer,#wpadminbar,#wpfooter,#wphead,.auto-fold #wpfooter,adminmenuwrap{display:none}.epyt-search-results .resulttitle .ui-icon,.ui-button .ui-icon{transform:scale(1.35,1.35)}#epyt_wiz_wrap .ui-button,.bold,.epyt-search-results .closeme,.epyt-search-results .resulttitle,.ui-tabs .ui-tabs-anchor{font-weight:700}#wpfooter,.clearboth,a.ythealth{clear:both}#wpbody,#wpcontent,.auto-fold #wpcontent{margin-left:0}html.wp-toolbar{padding:0}.pad20{padding:20px}.center{text-align:center}.orange{color:#f85d00}.smallnote{font-size:small;font-style:italic}.ui-accordion .ui-accordion-header{margin-top:15px;font-weight:700}.ui-accordion .ui-accordion-content.header-go-content{display:none!important;height:0!important}input.ui-widget[type=text]{margin:0;padding:.4em 1em;width:450px}.txt-button-align button,.txt-button-align input.ui-widget[type=text]{vertical-align:top}.copycode{background-color:#eef;border:2px solid #c7d6e4;display:inline-block;font-size:.9em;overflow-x:hidden;vertical-align:middle;white-space:nowrap;width:400px;padding-left:15px;padding-right:15px}.pointer{cursor:pointer}.relative{position:relative}.epyt-search-results a.pointer.thumb.load-movie{float:left;width:160px;height:90px;background-position:center;background-size:cover;display:block;margin:0 25px 10px 0}.epyt-search-results .resultdiv{margin-bottom:40px}.epyt-search-results .resultinfo{text-align:left}.epyt-search-results .moviecontainer{margin-bottom:40px;margin-top:-30px}.epyt-search-results .closeme{right:110px;top:-10px;position:absolute;font-size:50px;cursor:pointer}.epyt-pagination{clear:both;text-align:center;padding:10px 8px;display:none}.epyt-pagenumbers>div,.epyt-pagination>div{display:inline-block;padding:0 2px;vertical-align:middle}.epyt-pagination .epyt-pagebutton{cursor:pointer;display:inline-block;padding:0 10px}.epyt-pagebutton>div{display:inline}.epyt-pagination .epyt-loader{display:none}.epyt-gallery-list.epyt-loading .epyt-pagination .epyt-loader{display:inline-block}.epyt-pagebutton.hide,.epyt-pagenumbers.hide{display:none!important;opacity:0!important;visibility:hidden!important}.playlist-tabs{margin-bottom:20px}.icon-playlist{float:left;height:auto;margin:15px 30px 0 0;max-width:150px}a.ythealth{float:right;margin-top:15px;position:relative}a.ythealth .tip{position:absolute;width:450px;right:0;top:-100px;display:none;background-color:#fff;padding:20px;border:2px solid #ddd;border-radius:5px}a.ythealth:hover .tip{display:block}
 
1
+
2
+ #wphead{display:none}#wpbody{margin-left:0}#adminmenuback{display:none}#adminmenu,adminmenuwrap{display:none}#wpcontent,.auto-fold #wpcontent{margin-left:0}#wpadminbar{display:none}html.wp-toolbar{padding:0}#footer,#wpfooter,.auto-fold #wpfooter{display:none}#wpfooter{clear:both}.clearboth{clear:both}.pad20{padding:20px}.center{text-align:center}.bold{font-weight:bold}.orange{color:#f85d00}.smallnote{font-size:small;font-style:italic}.ui-accordion .ui-accordion-header{margin-top:15px;font-weight:bold}.ui-accordion .ui-accordion-content.header-go-content{display:none!important;height:0!important}input.ui-widget[type=text]{margin:0;padding:.4em 1em;width:450px}.txt-button-align input.ui-widget[type=text],.txt-button-align button{vertical-align:top}#epyt_wiz_wrap .ui-button{font-weight:bold}.ui-button .ui-icon{transform:scale(1.35,1.35)}.copycode{background-color:#eef;border:2px solid #c7d6e4;display:inline-block;font-size:.9em;overflow-x:hidden;vertical-align:middle;white-space:nowrap;width:400px;padding-left:15px;padding-right:15px}.pointer{cursor:pointer}.relative{position:relative}.epyt-search-results a.pointer.thumb.load-movie{float:left;width:160px;height:90px;background-position:center;background-size:cover;display:block;margin:0 25px 10px 0}.epyt-search-results .resultdiv{margin-bottom:40px}.epyt-search-results .resultinfo{text-align:left}.epyt-search-results .resulttitle{font-weight:bold}.epyt-search-results .moviecontainer{margin-bottom:40px;margin-top:-30px}.epyt-search-results .closeme{right:110px;top:-10px;position:absolute;font-weight:bold;font-size:50px;cursor:pointer}.epyt-search-results .resulttitle .ui-icon{transform:scale(1.35,1.35)}.epyt-pagination{clear:both;text-align:center;padding:10px 8px 10px 8px;display:none}.epyt-pagination>div,.epyt-pagenumbers>div{display:inline-block;padding:0 2px 0 2px;vertical-align:middle}.epyt-pagination .epyt-pagebutton{cursor:pointer;display:inline-block;padding:0 10px 0 10px}.epyt-pagebutton>div{display:inline}.epyt-pagination .epyt-loader{display:none}.epyt-gallery-list.epyt-loading .epyt-pagination .epyt-loader{display:inline-block}.epyt-pagebutton.hide,.epyt-pagenumbers.hide{display:none!important;opacity:0!important;visibility:hidden!important}.ui-tabs .ui-tabs-anchor{font-weight:bold}.playlist-tabs{margin-bottom:20px}.icon-playlist{float:left;height:auto;margin:15px 30px 0 0;max-width:150px}a.ythealth{clear:both;float:right;margin-top:15px;position:relative}a.ythealth .tip{position:absolute;width:450px;right:0;top:-100px;display:none;background-color:#fff;padding:20px;border:2px solid #ddd;border-radius:5px}a.ythealth:hover .tip{display:block}
styles/ytprefs.css CHANGED
@@ -48,7 +48,7 @@ iframe.__youtube_prefs__
48
  overflow-y: hidden;
49
  display: block !important;
50
  cursor: pointer;
51
- opacity: .8;
52
  float: left;
53
  padding: 0 8px 10px 8px;
54
  }
@@ -301,5 +301,7 @@ columns
301
  padding: 0 6px 3px 0;
302
  display: inline-block;
303
  background: transparent;
 
 
304
  }
305
 
48
  overflow-y: hidden;
49
  display: block !important;
50
  cursor: pointer;
51
+ opacity: 1;
52
  float: left;
53
  padding: 0 8px 10px 8px;
54
  }
301
  padding: 0 6px 3px 0;
302
  display: inline-block;
303
  background: transparent;
304
+ -webkit-box-shadow: none;
305
+ box-shadow: none;
306
  }
307
 
styles/ytprefs.min.css CHANGED
@@ -1 +1,2 @@
1
- .epyt-gallery-clear,.epyt-gallery-rowbreak,.epyt-pagination{clear:both}.epyt-debug{cursor:pointer;text-align:left;background-color:#ddd;color:#000}iframe.__youtube_prefs__{border-width:0}.epyt-gallery{text-align:center}.epyt-gallery iframe{margin-bottom:0}.epyt-gallery.epyt-lb iframe{display:none;height:0!important}.epyt-gallery-list{margin:0 -8px;position:relative;transition:opacity ease-out .3s;display:block}.epyt-gallery-list p{display:none}.epyt-gallery-list.epyt-loading{opacity:.5;transition:opacity ease-out .3s}.epyt-gallery-thumb{box-sizing:border-box;overflow-y:hidden;display:block!important;cursor:pointer;opacity:.8;float:left;padding:0 8px 10px}.epyt-gallery-thumb.hover{position:relative;opacity:1;transition:opacity ease-out .3s}.epyt-gallery-img-box{width:100%}.epyt-gallery-img{height:0;width:100%;padding-top:56.25%!important;position:relative;overflow:hidden!important;background-size:cover!important;background-position:center!important}.epyt-gallery-playhover{opacity:0;position:absolute;top:-10px;left:0;width:100%;height:100%;vertical-align:middle;text-align:center;transition:opacity ease-out .3s}.epyt-gallery-thumb.epyt-current-video .epyt-gallery-playhover,.epyt-gallery-thumb.hover .epyt-gallery-playhover{opacity:1;top:0;transition:all ease-out .3s}.epyt-gallery-thumb .epyt-gallery-playcrutch{display:inline-block;height:100%;vertical-align:middle;width:0}.epyt-gallery-playhover .epyt-play-img{height:auto!important;max-width:15%!important;padding:0!important;margin:0!important;min-width:30px!important;vertical-align:middle!important;display:inline-block!important;width:auto;border:none;box-sizing:border-box}.epyt-gallery-notitle span,.epyt-gallery-thumb.epyt-listview+.epyt-gallery-rowbreak{display:none}.epyt-gallery-title{font-size:80%;line-height:120%;padding:10px}.epyt-gallery-notitle{padding:4px}.epyt-gallery-rowtitle{text-align:center;width:100%;position:absolute;left:0;top:100%;opacity:0;z-index:10;overflow-x:hidden;text-overflow:ellipsis;white-space:nowrap}.epyt-gallery-rowtitle.hover{opacity:1;transition:opacity linear .2s}.epyt-gallery-list.epyt-gallery-style-listview{margin-left:0;margin-right:0;margin-bottom:25px}.epyt-gallery-thumb.epyt-listview{width:100%!important;padding:0;margin:8px 0}.epyt-gallery-thumb.epyt-listview .epyt-gallery-img-box{float:left;width:150px;max-width:25%;margin-right:20px;margin-bottom:6px}.epyt-gallery-thumb.epyt-listview .epyt-gallery-title{padding:10px;text-align:left}.epyt-gallery-thumb.epyt-listview .epyt-gallery-dsc{font-size:75%;line-height:120%;padding:5px 10px 12px;text-align:left}.epyt-gallery-thumb.epyt-listview.hover{position:relative;background-color:#ddd;color:#000;transition:background-color ease-out .3s,color ease-out .3s}.epyt-pagination{text-align:center;padding:10px 8px}.epyt-pagenumbers>div,.epyt-pagination>div{display:inline-block;padding:0 2px;vertical-align:middle}.epyt-pagination .epyt-pagebutton{cursor:pointer;display:inline-block;padding:0 10px}.epyt-pagebutton>div{display:inline}.epyt-pagination .epyt-loader{display:none}.epyt-gallery-list.epyt-loading .epyt-pagination .epyt-loader{display:inline-block}body .lity-container{width:100%;max-width:964px}.epyt-curtain .lity-opened iframe{opacity:0;transition:opacity .3s linear .5s}.epyt-gallery-allthumbs.epyt-cols-1 .epyt-gallery-thumb{width:100%}.epyt-gallery-allthumbs.epyt-cols-2 .epyt-gallery-thumb{width:50%}.epyt-gallery-allthumbs.epyt-cols-3 .epyt-gallery-thumb{width:33.333%}.epyt-gallery-allthumbs.epyt-cols-4 .epyt-gallery-thumb{width:25%}.epyt-gallery-allthumbs.epyt-cols-5 .epyt-gallery-thumb{width:20%}.epyt-gallery-allthumbs.epyt-cols-6 .epyt-gallery-thumb{width:16.666%}.epyt-gallery-allthumbs.epyt-cols-7 .epyt-gallery-thumb{width:14.285%}.epyt-gallery-allthumbs.epyt-cols-8 .epyt-gallery-thumb{width:12.5%}.epyt-gallery-allthumbs.epyt-cols-9 .epyt-gallery-thumb{width:11.111%}.epyt-gallery-allthumbs.epyt-cols-10 .epyt-gallery-thumb{width:10%}.epyt-gallery-allthumbs.epyt-cols-11 .epyt-gallery-thumb{width:9.090%}.epyt-gallery-allthumbs.epyt-cols-12 .epyt-gallery-thumb{width:8.333%}.epyt-gallery-allthumbs.epyt-cols-13 .epyt-gallery-thumb{width:7.692%}.epyt-gallery-allthumbs.epyt-cols-14 .epyt-gallery-thumb{width:7.142%}.epyt-gallery-allthumbs.epyt-cols-15 .epyt-gallery-thumb{width:6.666%}.epyt-gallery-allthumbs.epyt-cols-16 .epyt-gallery-thumb{width:6.25%}.epyt-gallery-allthumbs.epyt-cols-17 .epyt-gallery-thumb{width:5.882%}.epyt-gallery-allthumbs.epyt-cols-18 .epyt-gallery-thumb{width:5.555%}.epyt-gallery-allthumbs.epyt-cols-19 .epyt-gallery-thumb{width:5.263%}.epyt-gallery-allthumbs.epyt-cols-20 .epyt-gallery-thumb{width:5%}.epyt-gallery-allthumbs.epyt-thumb-portal .epyt-gallery-thumb .epyt-gallery-img{border-radius:50%;padding-top:100%!important}.epyt-gallery-list.epyt-gallery-style-carousel{margin:0 0 50px}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagination{display:none}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagination:first-child{position:absolute;width:100%;display:block;margin:auto;top:0;bottom:0;padding:0;height:30px}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagenumbers.hide{opacity:0}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-gallery-allthumbs{margin:15px 35px}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-gallery-thumb{padding-bottom:0;float:none;display:inline-block!important}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagebutton>div{display:none}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagebutton>div.arrow{background:url(../images/arrow-right.svg) no-repeat;background-size:contain;width:20px;height:100%;display:block;text-indent:-99999px;opacity:.7}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagebutton>div.arrow:hover{opacity:1}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagebutton.epyt-prev>div.arrow{background-image:url(../images/arrow-left.svg)}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagebutton{padding:0;margin-top:-2px}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-next{float:right}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-prev{float:left}.epyt-gallery-list.epyt-gallery-style-carousel .epyt-pagenumbers{position:absolute;top:100%;left:0;right:0}.epyt-pagebutton.hide,.epyt-pagenumbers.hide{display:none!important;opacity:0!important;visibility:hidden!important}.epyt-gallery-subscribe{text-align:center;padding:15px 0 10px;clear:both}.epyt-gallery-subscribe a.epyt-gallery-subbutton,.epyt-gallery-subscribe a.epyt-gallery-subbutton:hover{display:inline-block;padding:5px 10px;background-color:#E62117!important;color:#fff!important;text-decoration:none!important;border-radius:3px}.epyt-gallery-subscribe a.epyt-gallery-subbutton img{width:20px!important;height:auto!important;vertical-align:middle!important;padding:0 6px 3px 0;display:inline-block;background:0 0}#wpadminbar #wp-admin-bar-ytprefs-bar-cache>.ab-item:before{content:"\f311";top:2px}
 
1
+
2
+ .epyt-debug{cursor:pointer;text-align:left;background-color:#ddd;color:#000}iframe.__youtube_prefs__{border-width:0}.epyt-gallery{text-align:center}.epyt-gallery iframe{margin-bottom:0}.epyt-gallery.epyt-lb iframe{display:none;height:0!important}.epyt-gallery-list{margin:0 -8px 0 -8px;position:relative;transition:opacity ease-out .3s;display:block}.epyt-gallery-list p{display:none}.epyt-gallery-clear{clear:both}.epyt-gallery-list.epyt-loading{opacity:.5;transition:opacity ease-out .3s}.epyt-gallery-thumb{box-sizing:border-box;overflow-y:hidden;display:block!important;cursor:pointer;opacity:1;float:left;padding:0 8px 10px 8px}.epyt-gallery-thumb.hover{position:relative;opacity:1;transition:opacity ease-out .3s}.epyt-gallery-img-box{width:100%}.epyt-gallery-img{height:0;width:100%;padding-top:56.25%!important;position:relative;overflow:hidden!important;background-size:cover!important;background-position:center!important}.epyt-gallery-playhover{opacity:0;position:absolute;top:-10px;left:0;width:100%;height:100%;vertical-align:middle;text-align:center;transition:opacity ease-out .3s}.epyt-gallery-thumb.hover .epyt-gallery-playhover,.epyt-gallery-thumb.epyt-current-video .epyt-gallery-playhover{opacity:1;top:0;transition:all ease-out .3s}.epyt-gallery-thumb .epyt-gallery-playcrutch{display:inline-block;height:100%;vertical-align:middle;width:0}.epyt-gallery-playhover .epyt-play-img{height:auto!important;max-width:15%!important;padding:0!important;margin:0!important;min-width:30px!important;vertical-align:middle!important;display:inline-block!important;width:auto;border:0;box-sizing:border-box}.epyt-gallery-title{font-size:80%;line-height:120%;padding:10px}.epyt-gallery-notitle{padding:4px}.epyt-gallery-notitle span{display:none}.epyt-gallery-rowtitle{text-align:center;width:100%;position:absolute;left:0;top:100%;opacity:0;z-index:10;overflow-x:hidden;text-overflow:ellipsis;white-space:nowrap}.epyt-gallery-rowtitle.hover{opacity:1;transition:opacity linear .2s}.epyt-gallery-rowbreak{clear:both}.epyt-pagination{clear:both;text-align:center;padding:10px 8px 10px 8px}.epyt-pagination>div,.epyt-pagenumbers>div{display:inline-block;padding:0 2px 0 2px;vertical-align:middle}.epyt-pagination .epyt-pagebutton{cursor:pointer;display:inline-block;padding:0 10px 0 10px}.epyt-pagebutton>div{display:inline}.epyt-pagination .epyt-loader{display:none}.epyt-gallery-list.epyt-loading .epyt-pagination .epyt-loader{display:inline-block}body .lity-container{width:100%;max-width:964px}.epyt-curtain .lity-opened iframe{opacity:0;transition:opacity .3s linear .5s}.epyt-gallery-allthumbs.epyt-cols-1 .epyt-gallery-thumb{width:100%}.epyt-gallery-allthumbs.epyt-cols-2 .epyt-gallery-thumb{width:50%}.epyt-gallery-allthumbs.epyt-cols-3 .epyt-gallery-thumb{width:33.333%}.epyt-gallery-allthumbs.epyt-cols-4 .epyt-gallery-thumb{width:25%}.epyt-gallery-allthumbs.epyt-cols-5 .epyt-gallery-thumb{width:20%}.epyt-gallery-allthumbs.epyt-cols-6 .epyt-gallery-thumb{width:16.666%}.epyt-gallery-allthumbs.epyt-cols-7 .epyt-gallery-thumb{width:14.285%}.epyt-gallery-allthumbs.epyt-cols-8 .epyt-gallery-thumb{width:12.5%}.epyt-gallery-allthumbs.epyt-cols-9 .epyt-gallery-thumb{width:11.111%}.epyt-gallery-allthumbs.epyt-cols-10 .epyt-gallery-thumb{width:10%}.epyt-gallery-allthumbs.epyt-cols-11 .epyt-gallery-thumb{width:9.090%}.epyt-gallery-allthumbs.epyt-cols-12 .epyt-gallery-thumb{width:8.333%}.epyt-gallery-allthumbs.epyt-cols-13 .epyt-gallery-thumb{width:7.692%}.epyt-gallery-allthumbs.epyt-cols-14 .epyt-gallery-thumb{width:7.142%}.epyt-gallery-allthumbs.epyt-cols-15 .epyt-gallery-thumb{width:6.666%}.epyt-gallery-allthumbs.epyt-cols-16 .epyt-gallery-thumb{width:6.25%}.epyt-gallery-allthumbs.epyt-cols-17 .epyt-gallery-thumb{width:5.882%}.epyt-gallery-allthumbs.epyt-cols-18 .epyt-gallery-thumb{width:5.555%}.epyt-gallery-allthumbs.epyt-cols-19 .epyt-gallery-thumb{width:5.263%}.epyt-gallery-allthumbs.epyt-cols-20 .epyt-gallery-thumb{width:5%}.epyt-pagebutton.hide,.epyt-pagenumbers.hide{display:none!important;opacity:0!important;visibility:hidden!important}.epyt-gallery-subscribe{text-align:center;padding:15px 0 10px 0;clear:both}.epyt-gallery-subscribe a.epyt-gallery-subbutton,.epyt-gallery-subscribe a.epyt-gallery-subbutton:hover{display:inline-block;padding:5px 10px;background-color:#e62117!important;color:#fff!important;text-decoration:none!important;border-radius:3px}.epyt-gallery-subscribe a.epyt-gallery-subbutton img{width:20px!important;height:auto!important;vertical-align:middle!important;padding:0 6px 3px 0;display:inline-block;background:transparent;-webkit-box-shadow:none;box-shadow:none}
youtube.php CHANGED
@@ -2,8 +2,8 @@
2
  /*
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.7
7
  Author: EmbedPlus Team
8
  Author URI: http://www.embedplus.com
9
  */
@@ -33,7 +33,7 @@ class YouTubePrefs
33
  {
34
 
35
  public static $curltimeout = 20;
36
- public static $version = '11.7';
37
  public static $opt_version = 'version';
38
  public static $optembedwidth = null;
39
  public static $optembedheight = null;
@@ -124,16 +124,22 @@ class YouTubePrefs
124
 
125
  public function __construct()
126
  {
127
- add_action('admin_init', array("YouTubePrefs", 'check_double_plugin_warning'));
 
128
  self::$alloptions = get_option(self::$opt_alloptions);
129
-
 
 
 
 
130
  add_action('admin_notices', array(get_class(), 'separate_version_message'));
131
-
132
  if (self::$alloptions == false || version_compare(self::$alloptions[self::$opt_version], self::$version, '<'))
133
  {
134
  self::initoptions();
135
  }
136
 
 
137
  if (self::$alloptions[self::$opt_oldspacing] == 1)
138
  {
139
  self::$ytregex = self::$oldytregex;
@@ -163,41 +169,36 @@ class YouTubePrefs
163
  'end'
164
  );
165
 
166
- add_action('media_buttons', 'YouTubePrefs::media_button_wizard', 11);
167
 
168
 
169
  self::do_ytprefs();
170
- add_action('admin_menu', 'YouTubePrefs::ytprefs_plugin_menu');
171
- add_filter('plugin_action_links_' . plugin_basename(__FILE__), array('YouTubePrefs', 'my_plugin_action_links'));
172
 
173
  if (!is_admin())
174
  {
175
  if (self::$alloptions[self::$opt_old_script_method] == 1)
176
  {
177
- add_action('wp_print_scripts', array('YouTubePrefs', 'jsvars'));
178
- add_action('wp_enqueue_scripts', array('YouTubePrefs', 'jsvars'));
179
  }
180
 
181
- add_action('wp_enqueue_scripts', array('YouTubePrefs', 'ytprefsscript'), 100);
182
- add_action('wp_enqueue_scripts', array('YouTubePrefs', 'fitvids'), 101);
183
- }
184
-
185
- if (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG)
186
- {
187
- self::$min = '';
188
  }
189
 
190
- add_action("wp_ajax_my_embedplus_glance_vids", array('YouTubePrefs', 'my_embedplus_glance_vids'));
191
- add_action("wp_ajax_my_embedplus_glance_count", array('YouTubePrefs', 'my_embedplus_glance_count'));
192
- add_action("wp_ajax_my_embedplus_dismiss_double_plugin_warning", array('YouTubePrefs', 'my_embedplus_dismiss_double_plugin_warning'));
193
- add_action("wp_ajax_my_embedplus_gallery_page", array('YouTubePrefs', 'my_embedplus_gallery_page'));
194
- add_action("wp_ajax_nopriv_my_embedplus_gallery_page", array('YouTubePrefs', 'my_embedplus_gallery_page'));
195
- add_action('admin_enqueue_scripts', array('YouTubePrefs', 'admin_enqueue_scripts'), 10, 1);
196
  }
197
-
198
  public static function separate_version_message()
199
  {
200
- if (self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 10)
201
  {
202
  $class = 'notice notice-error is-dismissible';
203
  $message = 'Important message to YouTube Pro users: From version 11.7 onward, you must <a href="https://www.embedplus.com/youtube-pro/download/?prokey=' . esc_attr(self::$alloptions[self::$opt_pro]) . '" target="_blank">download the separate plugin here</a> to regain your Pro features. All your settings will automatically migrate after installing the separate Pro download. Thank you for your support and patience during this transition.';
@@ -293,9 +294,9 @@ class YouTubePrefs
293
  $step1_playlist_errors = '';
294
  $step1_playlist_error_invalid = 'Sorry, that does not seem to be a link to an existing playlist. Please confirm that the link works in your browser, and then copy that full link in your address bar to paste here.';
295
  $step1_channel_errors = '';
296
- $step1_channel_error_invalid = 'Sorry, that does not seem to be a link to an existing video. Please confirm that the link works in your browser, and then copy that full link in your address bar to paste here.';
297
  $step1_live_errors = '';
298
- $step1_live_error_invalid = 'Sorry, that does not seem to be a valid link to an existing video or channel. Please confirm that the link works in your browser, and then copy that full link in your address bar to paste here.';
299
  $if_live_preview = false;
300
  if (isset($_POST['wizform_submit']))
301
  {
@@ -732,7 +733,7 @@ class YouTubePrefs
732
  <img src="<?php echo plugins_url('/images/icon-playlist-self.jpg', __FILE__) ?>" class="icon-playlist" />
733
  <ol>
734
  <li>Go to the page for the playlist that lists all of its videos (<a href="https://www.youtube.com/playlist?list=PL70DEC2B0568B5469" target="_blank">Example &raquo;</a>). </li>
735
- <li>You may then click on the video that you want the playlist to start with.</li>
736
  <li>Copy the URL in your browser and paste it in the textbox below. You'll notice that a playlist URL contains the playlist ID (e.g. "PL...")</li>
737
  <li>Click "Get Playlist" to continue.</li>
738
  </ol>
@@ -1135,7 +1136,7 @@ class YouTubePrefs
1135
  type: "post",
1136
  dataType: "json",
1137
  timeout: 30000,
1138
- url: wpajaxurl,
1139
  data: {action: 'my_embedplus_glance_vids', postid: pid},
1140
  success: function (response) {
1141
  if (response.type === "success") {
@@ -1368,11 +1369,6 @@ class YouTubePrefs
1368
  add_thickbox();
1369
 
1370
  $wizhref = admin_url('admin.php?page=youtube-ep-wizard') .
1371
- // '&wpversion=' . get_bloginfo('version') .
1372
- // '&settingsurl=' . urlencode(admin_url('admin.php?page=youtube-my-preferences#jumpdefaults')) .
1373
- // '&blogwidth=' . YouTubePrefs::get_blogwidth() .
1374
- // '&domain=' . urlencode(site_url()) .
1375
- // '&myytdefaults=' . urlencode(http_build_query(YouTubePrefs::$alloptions)) .
1376
  '&random=' . rand(1, 1000) .
1377
  '&TB_iframe=true&width=950&height=800';
1378
  ?>
@@ -1384,7 +1380,7 @@ class YouTubePrefs
1384
  {
1385
  if (is_plugin_active('embedplus-for-wordpress/embedplus.php'))
1386
  {
1387
- add_action('admin_notices', array("YouTubePrefs", "double_plugin_warning"));
1388
  }
1389
  }
1390
 
@@ -1430,10 +1426,10 @@ class YouTubePrefs
1430
  type: "post",
1431
  dataType: "json",
1432
  timeout: 30000,
1433
- url: wpajaxurl,
1434
  data: {action: 'my_embedplus_dismiss_double_plugin_warning'},
1435
  success: function (response) {
1436
- if (response.type == "success") {
1437
  $(".embedpluswarningbox").hide();
1438
  }
1439
  },
@@ -1716,22 +1712,24 @@ class YouTubePrefs
1716
 
1717
  public static function do_ytprefs()
1718
  {
1719
- add_filter('autoptimize_filter_js_exclude', 'YouTubePrefs::ao_override_jsexclude', 10, 1);
1720
  if (!is_admin())
1721
  {
1722
- add_filter('the_content', 'YouTubePrefs::apply_prefs_content', 1);
1723
- add_filter('widget_text', 'YouTubePrefs::apply_prefs_widget', 1);
1724
- add_shortcode('embedyt', array('YouTubePrefs', 'apply_prefs_shortcode'));
 
 
1725
  if (self::$alloptions[self::$opt_migrate] == 1)
1726
  {
1727
  if (self::$alloptions[self::$opt_migrate_youtube] == 1)
1728
  {
1729
- add_shortcode('youtube', array('YouTubePrefs', 'apply_prefs_shortcode_youtube'));
1730
- add_shortcode('youtube_video', array('YouTubePrefs', 'apply_prefs_shortcode_youtube'));
1731
  }
1732
  if (self::$alloptions[self::$opt_migrate_embedplusvideo] == 1)
1733
  {
1734
- add_shortcode('embedplusvideo', array('YouTubePrefs', 'apply_prefs_shortcode_embedplusvideo'));
1735
  }
1736
  }
1737
  }
@@ -1741,7 +1739,7 @@ class YouTubePrefs
1741
  {
1742
  if (strpos($exclude, 'ytprefs' . self::$min . '.js') === false)
1743
  {
1744
- return $exclude . ",ytprefs' . self::$min . '.js,__ytprefs__";
1745
  }
1746
  return $exclude;
1747
  }
@@ -1804,13 +1802,13 @@ class YouTubePrefs
1804
 
1805
  public static function apply_prefs_content($content)
1806
  {
1807
- $content = preg_replace_callback(self::$ytregex, "YouTubePrefs::get_html_content", $content);
1808
  return $content;
1809
  }
1810
 
1811
  public static function apply_prefs_widget($content)
1812
  {
1813
- $content = preg_replace_callback(self::$ytregex, "YouTubePrefs::get_html_widget", $content);
1814
  return $content;
1815
  }
1816
 
@@ -2239,7 +2237,7 @@ class YouTubePrefs
2239
  $code1 = '<iframe ' . $centercode . ' id="_ytid_' . rand(10000, 99999) . '" width="' . self::$defaultwidth . '" height="' . self::$defaultheight .
2240
  '" src="https://www.' . $youtubebaseurl . '.com/embed/' . $videoidoutput . '?';
2241
  $code2 = '" class="__youtube_prefs__' . ($iscontent ? '' : ' __youtube_prefs_widget__') .
2242
- '"' . $voloutput . $acctitle . $galleryid_ifm_data . ' allowfullscreen data-no-lazy="1"></iframe>';
2243
 
2244
  $origin = '';
2245
 
@@ -2434,11 +2432,11 @@ class YouTubePrefs
2434
 
2435
  public static function ytprefs_plugin_menu()
2436
  {
2437
- add_menu_page('YouTube Settings', 'YouTube Free', 'manage_options', 'youtube-my-preferences', 'YouTubePrefs::ytprefs_show_options', plugins_url('images/youtubeicon16.png', __FILE__), '10.000392854349');
2438
- add_submenu_page('youtube-my-preferences', '', '', 'manage_options', 'youtube-my-preferences', 'YouTubePrefs::ytprefs_show_options');
2439
 
2440
- add_submenu_page(null, 'YouTube Posts', 'YouTube Posts', 'manage_options', 'youtube-ep-glance', 'YouTubePrefs::glance_page');
2441
- self::$wizard_hook = add_submenu_page(null, 'YouTube Wizard', 'YouTube Wizard', 'edit_posts', 'youtube-ep-wizard', 'YouTubePrefs::wizard');
2442
  }
2443
 
2444
  public static function custom_admin_pointers_check()
@@ -2474,7 +2472,7 @@ class YouTubePrefs
2474
  type: "post",
2475
  dataType: "json",
2476
  timeout: 30000,
2477
- url: wpajaxurl,
2478
  data: {action: 'my_embedplus_glance_count'},
2479
  success: function (response) {
2480
  if (response.type === "success") {
@@ -2521,7 +2519,7 @@ class YouTubePrefs
2521
  align: '<?php echo $array['align']; ?>'
2522
  },
2523
  close: function () {
2524
- $.post(wpajaxurl, {
2525
  pointer: '<?php echo $pointer; ?>',
2526
  action: 'dismiss-wp-pointer'
2527
  });
@@ -2550,11 +2548,11 @@ class YouTubePrefs
2550
  $new_pointer_content .= '<p>'; // ooopointer
2551
  if (!(self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0))
2552
  {
2553
- $new_pointer_content .= __("This update has code refactoring to separate and streamline the Free and <a target=_blank href=" . self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=frompointer' . ">Pro versions &raquo;</a>");
2554
  }
2555
  else
2556
  {
2557
- $new_pointer_content .= __("This update has code refactoring to separate and streamline the Free and Pro versions. " . '<strong>Important message to YouTube Pro users</strong>: From version 11.7 onward, you must <a href="https://www.embedplus.com/youtube-pro/download/?prokey=' . esc_attr(self::$alloptions[self::$opt_pro]) . '" target="_blank">download the separate plugin here</a> to regain your Pro features. All your settings will automatically migrate after installing the separate Pro download. Thank you for your support and patience during this transition.');
2558
  }
2559
  $new_pointer_content .= '</p>';
2560
 
@@ -2574,7 +2572,7 @@ class YouTubePrefs
2574
  return isset($_POST[$idx]) && $_POST[$idx] == (true || 'on');
2575
  }
2576
 
2577
- public static function output_scriptvars()
2578
  {
2579
  self::$scriptsprinted++;
2580
  if (self::$scriptsprinted == 1)
@@ -2596,6 +2594,8 @@ class YouTubePrefs
2596
  var epversion = '<?php echo self::$version; ?>';
2597
  var myytdefaults = '<?php echo $myytdefaults; ?>';
2598
  var eppluginadminurl = '<?php echo admin_url('admin.php?page=youtube-my-preferences'); ?>';
 
 
2599
  // Create IE + others compatible event handler
2600
  var epeventMethod = window.addEventListener ? "addEventListener" : "attachEvent";
2601
  var epeventer = window[epeventMethod];
@@ -2862,6 +2862,7 @@ class YouTubePrefs
2862
  }
2863
  $new_options[self::$opt_gallery_customnext] = $_gallery_custom_next;
2864
 
 
2865
  $_not_live_content = '';
2866
  try
2867
  {
@@ -2874,33 +2875,18 @@ class YouTubePrefs
2874
  $new_options[self::$opt_not_live_content] = $_not_live_content;
2875
 
2876
 
2877
- $_apikey = $all[self::$opt_apikey];
2878
  try
2879
  {
2880
- $_curr_apikey = $all[self::$opt_apikey];
2881
- $_schema_apikey = '';
2882
- if (isset($_POST[self::$opt_apikey]))
2883
- {
2884
- $_schema_apikey = trim(str_replace(array(' ', "'", '"'), array('', '', ''), strip_tags($_POST[self::$opt_apikey])));
2885
- }
2886
-
2887
- $_gallery_apikey = trim(str_replace(array(' ', "'", '"'), array('', '', ''), strip_tags($_POST[self::$opt_gallery_apikey])));
2888
-
2889
- if (!empty($_schema_apikey) && $_schema_apikey != $_curr_apikey)
2890
- {
2891
- $_apikey = $_schema_apikey;
2892
- }
2893
- if (!empty($_gallery_apikey) && $_gallery_apikey != $_curr_apikey)
2894
- {
2895
- $_apikey = $_gallery_apikey;
2896
- }
2897
  }
2898
  catch (Exception $ex)
2899
  {
2900
-
2901
  }
2902
  $new_options[self::$opt_apikey] = $_apikey;
2903
 
 
2904
  $all = $new_options + $all;
2905
 
2906
  update_option(self::$opt_alloptions, $all);
@@ -3022,16 +3008,14 @@ class YouTubePrefs
3022
 
3023
  <div class="ytindent">
3024
  <br>
3025
- <div id="jumphowto"></div>
3026
  <div class="ytnav">
3027
  <a href="#jumpapikey">API Key</a>
3028
- <a href="#jumphowto">How To</a>
3029
- <a href="#jumpwiz">Visual Wizard</a>
3030
  <a href="#jumpdefaults">Defaults</a>
 
3031
  <a href="#jumpcompat">Compatibility</a>
3032
  <a href="#jumpgallery">Galleries</a>
3033
- <a href="#jumpoverride">Override Defaults</a>
3034
  <a target="_blank" href="<?php echo self::$epbase . "/dashboard/pro-easy-video-analytics.aspx?ref=protab" ?>" style="border-color: #888888;">Upgrade?</a>
 
3035
  <a href="#jumpsupport">Support</a>
3036
  </div>
3037
 
@@ -3047,59 +3031,11 @@ class YouTubePrefs
3047
  </p>
3048
  <p>
3049
  <b class="chktitle">YouTube API Key:</b>
3050
- <input type="text" name="<?php echo self::$opt_gallery_apikey; ?>" id="<?php echo self::$opt_gallery_apikey; ?>" value="<?php echo trim($all[self::$opt_apikey]); ?>" class="textinput" style="width: 250px;">
3051
  <a href="https://www.youtube.com/watch?v=LpKDFT40V0U" target="_blank">Click this link &raquo;</a> and follow the video to get your API key. Don't worry, it's an easy process.
3052
  </p>
3053
 
3054
- <h3 class="sect">
3055
- How to Insert a YouTube Video or Playlist &nbsp; <a class="smallnote" href="#jumpgallery">(For gallery directions, go here &raquo;)</a>
3056
- </h3>
3057
- <p>
3058
- <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 https:// part). Easy, eh?<br>
3059
- <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).
3060
- </p>
3061
- <p>
3062
- <b>For galleries:</b> <a href="#jumpgallery">Click here</a> to scroll down to gallery settings and directions.
3063
- </p>
3064
- <p>
3065
- <b>For self-contained playlists:</b> Go to the page for the playlist that lists all of its videos (<a target="_blank" href="http://www.youtube.com/playlist?list=PL70DEC2B0568B5469">Example &raquo;</a>). Click on the video that you want the playlist to start with. Copy and paste that browser URL into your blog on its own line. If you want the first video to always be the latest video in your playlist, check the option "Playlist Ordering" in the settings down below (you will also see this option available if you use the Pro Wizard). If you want to have two or more playlists next to each other on the same line, wrap each link with the <code>[embedyt]...[/embedyt]</code> shortcode.
3066
- </p>
3067
- <p>
3068
- <b>For self-contained channel playlists:</b> At your editor, click on the <img style="vertical-align: text-bottom;" src="<?php echo plugins_url('images/wizbuttonbig.png', __FILE__) ?>"> wizard button and choose the option <i>Search for a video or channel to insert in my editor.</i> Then, click on the <i>channel playlist</i> option there (instead of <i>single video</i>). Search for the channel username and follow the rest of the directions there.
3069
- </p>
3070
- <p>
3071
- <b>Examples:</b><br><br>
3072
- <img style="width: 900px; height: auto;" class="shadow" src="<?php echo plugins_url('images/sshowto.png', __FILE__) ?>" />
3073
- </p>
3074
- <p>
3075
- Always follow these rules for any URL:
3076
- </p>
3077
- <ul class="reglist">
3078
- <li>Make sure the URL is really on its own line by itself. Or, if you need multiple videos on the same line, make sure each URL is wrapped properly with the shortcode (Example: <code>[embedyt]http://www.youtube.com/watch?v=ABCDEFGHIJK&width=400&height=250[/embedyt]</code>)</li>
3079
- <li>Make sure the URL is <strong>not</strong> an active hyperlink (i.e., it should just be plain text). Otherwise, highlight the URL and click the "unlink" button in your editor: <img src="<?php echo plugins_url('images/unlink.png', __FILE__) ?>"/></li>
3080
- <li>Make sure you did <strong>not</strong> format or align the URL in any way. If your URL still appears in your actual post instead of a video, highlight it and click the "remove formatting" button (formatting can be invisible sometimes): <img src="<?php echo plugins_url('images/erase.png', __FILE__) ?>"/></li>
3081
- <li>If you really want to align the video, try wrapping the link with the shortcode first. For example: <code>[embedyt]http://www.youtube.com/watch?v=ABCDEFGHIJK[/embedyt]</code> Using the shortcode also allows you to have two or more videos next to each other on the same line. Just put the shortcoded links together on the same line. For example:<br>
3082
- <code>[embedyt]http://www.youtube.com/watch?v=ABCDEF[/embedyt] [embedyt]http://www.youtube.com/watch?v=GHIJK[/embedyt]</code>
3083
- </ul>
3084
-
3085
- <div class="jumper" id="jumpwiz"></div>
3086
- <h3 class="sect">Visual YouTube Wizard <a href="#top" class="totop">&#9650; top</a></h3>
3087
-
3088
- <p>
3089
- Let's say you don't know the exact URL of the video you wish to embed. Well, we've made the ability to directly search YouTube and insert videos right from your editor tab as a free feature to all users.
3090
- Simply click the <img style="vertical-align: text-bottom;" src="<?php echo plugins_url('images/wizbuttonbig.png', __FILE__) ?>"> wizard button found above
3091
- your editor to start the wizard (see image above to locate this button). There, you'll be given the option to enter your search terms.
3092
- Click the "Search" button to view the results. Each result will have an <span class="button-primary cuz">&#9660; Insert Into Editor</span> button that
3093
- you can click to directly embed the desired video link to your post without having to copy and paste.
3094
- </p>
3095
- <p>
3096
- <b class="orange">Even more options are available to PRO users!</b> If you download our PRO version, you can simply click the <a href="<?php echo self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=protab' ?>" target="_blank" class="button-primary cuz">&#9658; Customize</a> button within the wizard to further personalize your embeds without having to enter special codes yourself.
3097
- <br>
3098
- <br>
3099
-
3100
- <a href="<?php echo self::$epbase ?>/dashboard/pro-easy-video-analytics.aspx" target="_blank" style="text-decoration: none;"><img style="width: 500px; margin: 0 auto; display: block;" src="<?php echo plugins_url('images/ssprowizard.png', __FILE__) ?>" ></a>
3101
 
3102
- </p>
3103
  <div class="jumper" id="jumpdefaults"></div>
3104
  <h3 class="sect">
3105
  <?php _e("Default YouTube Options") ?> <a href="#top" class="totop">&#9650; top</a>
@@ -3135,7 +3071,7 @@ class YouTubePrefs
3135
  </p>
3136
  <p>
3137
  <input name="<?php echo self::$opt_rel; ?>" id="<?php echo self::$opt_rel; ?>" <?php checked($all[self::$opt_rel], 1); ?> type="checkbox" class="checkbox">
3138
- <label for="<?php echo self::$opt_rel; ?>"><?php _e('<b class="chktitle">Related Videos:</b> Show related videos at the end.') ?></label>
3139
  </p>
3140
  <p>
3141
  <input name="<?php echo self::$opt_showinfo; ?>" id="<?php echo self::$opt_showinfo; ?>" <?php checked($all[self::$opt_showinfo], 1); ?> type="checkbox" class="checkbox">
@@ -3174,7 +3110,7 @@ class YouTubePrefs
3174
  </p>
3175
  <p>
3176
  <input name="<?php echo self::$opt_widgetfit; ?>" id="<?php echo self::$opt_widgetfit; ?>" <?php checked($all[self::$opt_widgetfit], 1); ?> type="checkbox" class="checkbox">
3177
- <label for="<?php echo self::$opt_widgetfit; ?>"><?php _e('<b class="chktitle">Autofit Widget Videos:</b> Make each video that you embed in a widget area automatically fit the width of its container.</b>') ?></label>
3178
  </p>
3179
  <p>
3180
  <input name="<?php echo self::$opt_playsinline; ?>" id="<?php echo self::$opt_playsinline; ?>" <?php checked($all[self::$opt_playsinline], 1); ?> type="checkbox" class="checkbox">
@@ -3251,6 +3187,139 @@ class YouTubePrefs
3251
 
3252
  </div>
3253
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3254
  <div class="jumper" id="jumpcompat"></div>
3255
  <h3 class="sect">Compatibility Settings <a href="#top" class="totop">&#9650; top</a></h3>
3256
  <p>
@@ -3315,12 +3384,16 @@ class YouTubePrefs
3315
  </p>
3316
 
3317
  </div>
 
 
 
 
3318
  <div class="jumper" id="jumpgallery"></div>
3319
  <h3 class="sect">Gallery Settings and Directions <a href="#top" class="totop">&#9650; top</a></h3>
3320
  <img class="ssgallery" src="<?php echo plugins_url('images/ssgallery.png', __FILE__) ?>">
3321
  <p>
3322
  <a target="_blank" href="<?php echo self::$epbase ?>/responsive-youtube-playlist-channel-gallery-for-wordpress.aspx">You can now make playlist embeds (and channel-playlist embeds) have a gallery layout &raquo;</a>. <strong>First, you must obtain your YouTube API key</strong>.
3323
- Don't worry, it's an easy process. Just <a href="https://www.youtube.com/watch?v=LpKDFT40V0U" target="_blank">click this link &raquo;</a> and follow the video on that page to get your API key. Since Google updates their API Key generation directions frequently, follow the general steps shown in the video.
3324
  Then paste your API key in the "YouTube API Key" box at the top of this screen, and click the "Save Changes" button.
3325
  </p>
3326
 
@@ -3427,120 +3500,48 @@ class YouTubePrefs
3427
  </div>
3428
 
3429
 
3430
- <div class="jumper" id="jumpprosettings"></div>
3431
- <div class="upgchecks">
3432
- <h3 class="sect">Want the PRO Features?</h3>
3433
- <p class="orange">Below are descriptions for some of our PRO features for enhanced SEO and performance, once you purchase and install our separate PRO plugin (the PRO plugin works for all your past embed links).</p>
3434
- <p>
3435
- <img class="ssaltgallery" src="<?php echo plugins_url('images/ssaltgalleryall.jpg', __FILE__) ?>" />
3436
- <select disabled>
3437
- <option value="">Gallery Style</option>
3438
- </select>
3439
- <label>
3440
- <b class="chktitle">Alternate Gallery Styling: </b> <span class="pronon">(PRO Users)</span>
3441
- Switch from the grid style of the FREE version to another gallery style. Right now, we provide a vertical (single column) and horizontal (single row) list style as alternatives to the grid, with more designs coming. These current alternatives were inspired by the standard YouTube playlist player's "table of contents," except our gallery's video lists are always visible and shown under the playing video.
3442
- <a target="_blank" href="<?php echo self::$epbase ?>/responsive-youtube-playlist-channel-gallery-for-wordpress.aspx">Read more here &raquo;</a>
3443
- </label>
3444
- </p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3445
 
3446
- <div class="hr"></div>
3447
- <p>
3448
- <img class="ssaltgallery" src="<?php echo plugins_url('images/ssverticallayout.png', __FILE__) ?>" />
3449
- <input disabled type="checkbox" class="checkbox">
3450
- <label>
3451
- <b class="chktitle">Show Gallery Descriptions (for vertical list styling): </b> <span class="pronon">(PRO Users)</span>
3452
- For the vertical list layout, this option will show full video descriptions (taken directly from YouTube.com) with each thumbnail. Note: these descriptions only apply the vertical list layout; other layouts don't have enough room.
3453
- </label>
3454
- </p>
3455
- <div class="hr"></div>
3456
- <p>
3457
- <img class="ssaltgallery" src="<?php echo plugins_url('images/ssaltgallerycircles.jpg', __FILE__) ?>" />
3458
- <select disabled>
3459
- <option value="">Select Thumbnail Shape</option>
3460
- </select>
3461
- <label>
3462
- <b class="chktitle">Gallery Thumbnail Shape: </b> <span class="pronon">(PRO Users)</span>
3463
- Differentiate your gallery by showing different thumbnail shapes. We currently offer rectangle and circle shapes.
3464
- <a target="_blank" href="<?php echo self::$epbase ?>/responsive-youtube-playlist-channel-gallery-for-wordpress.aspx">Read more here &raquo;</a>
3465
- </label>
3466
- </p>
3467
-
3468
- <div class="hr"></div>
3469
- <p>
3470
- <img class="sspopupplayer" src="<?php echo plugins_url('images/sspopupplayer.jpg', __FILE__) ?>" />
3471
- <label>
3472
- <b class="chktitle">Gallery Video Display Mode: </b> <sup class="orange">NEW</sup> <span class="pronon">(PRO Users)</span>
3473
- Display your gallery videos simply above the thumbnails (default), or as a popup lightbox.
3474
- </label>
3475
- <br>
3476
- <input type="radio" disabled> Default &nbsp; <input type="radio" disabled> Popup lightbox
3477
- </p>
3478
-
3479
- <div class="hr"></div>
3480
- <p>
3481
- <input disabled type="checkbox" class="checkbox">
3482
- <label>
3483
- <b class="chktitle">Faster Page Loads (Caching): </b> <span class="pronon">(PRO Users)</span>
3484
- Use embed caching to speed up your page loads. By default, WordPress needs to request information from YouTube.com's servers for every video you embed, every time a page is loaded. These data requests can add time to your total page load time. Turn on this feature to cache that data (instead of having to request for the same information every time you load a page). This should then make your pages that have videos load faster. It's been noted that even small speed ups in page load can help increase visitor engagement, retention, and conversions. Caching also makes galleries run faster.
3485
- </label>
3486
- <div class="indent-option">
3487
- <label>
3488
- <b class="chktitle">Cache Lifetime (hours): </b>
3489
- <input disabled value="24" type="number">
3490
- Tip: If your pages rarely change, you may wish to set this to a much higher value than 24 hours.
3491
- </label>
3492
- </div>
3493
- </p>
3494
- <div class="hr"></div>
3495
-
3496
- <p>
3497
- <input disabled type="checkbox" class="checkbox">
3498
- <label>
3499
- <b class="chktitle">Video SEO Tags:</b> <span class="pronon">(PRO Users)</span> Update your YouTube embeds with Google, Bing, and Yahoo friendly schema markup for videos.
3500
- </label>
3501
- </p>
3502
- <div class="hr"></div>
3503
- <p>
3504
- <input disabled type="checkbox" class="checkbox">
3505
- <label>
3506
- <b class="chktitle">Special Lazy-Loading Effects:</b> <span class="pronon">(PRO Users)</span>
3507
- Add eye-catching special effects that will make your YouTube embeds bounce, flip, pulse, or slide as they lazy 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 &raquo;</a>
3508
- </label>
3509
- </p>
3510
- <div class="hr"></div>
3511
- <p>
3512
- <input disabled type="checkbox" class="checkbox">
3513
- <label>
3514
- <b class="chktitle">Facebook Open Graph Markup:</b> <span class="pronon">(PRO Users)</span> Include Facebook Open Graph markup with the videos you embed with this plugin. We follow the guidelines for videos as described here: <a href="https://developers.facebook.com/docs/sharing/webmasters#media" target="_blank">https://developers.facebook.com/docs/sharing/webmasters#media</a>
3515
- </label>
3516
- </p>
3517
- <div class="hr"></div>
3518
- <p>
3519
- <img class="ssfb" src="<?php echo plugins_url('images/youtube_thumbnail_sample.jpg', __FILE__) ?>" />
3520
- <input disabled type="checkbox" class="checkbox">
3521
- <label>
3522
- <b class="chktitle">Featured Thumbnail Images:</b> <span class="pronon">(PRO Users)</span>
3523
- Automatically grab the thumbnail image of the first video embedded in each post or page, and use it as the featured image.
3524
- All you have to do is click Update on a post or page and the plugin does the rest!
3525
- (Example shown on the right) <a target="_blank" href="<?php echo self::$epbase ?>/add-youtube-video-thumbnails-featured-image-wordpress.aspx">Read more here &raquo;</a>
3526
- </label>
3527
- </p>
3528
- <div class="hr"></div>
3529
- <p>
3530
- <a href="<?php echo self::$epbase ?>/dashboard/pro-easy-video-analytics.aspx" target="_blank">Purchase and download the PRO plugin to get the above and several other features &raquo;</a>
3531
- </p>
3532
- <div class="clearboth"></div>
3533
- </div>
3534
-
3535
- <hr>
3536
-
3537
- <div class="jumper" id="jumpoverride"></div>
3538
 
3539
  <h3 class="sect">
3540
- <?php _e("How To Override Defaults / Other Options") ?> <a href="#top" class="totop">&#9650; top</a>
3541
  </h3>
3542
  <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 '&'.
3543
- <br><span class="smallnote orange">PRO users: You can use the big blue <a href="<?php echo self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=protab' ?>" target="_blank">customize</a> buttons that you will see inside the wizard, instead of memorizing the following.</span>
3544
  <?php
3545
  _e('<ul>');
3546
  _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>");
@@ -3552,7 +3553,6 @@ class YouTubePrefs
3552
  _e("<li><strong>modestbranding</strong> - Set this to 1 to remove the YouTube logo while playing (or 0 to show the logo). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&modestbranding=1</strong></em> </li>");
3553
  _e("<li><strong>rel</strong> - Set this to 0 to not show related videos at the end of playing (or 1 to show them). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&rel=0</strong></em> </li>");
3554
  _e("<li><strong>showinfo</strong> - Set this to 0 to hide the video title and other info (or 1 to show it). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&showinfo=0</strong></em> </li>");
3555
- _e("<li><strong>theme</strong> - Set this to 'light' to make the player have the light-colored theme (or 'dark' for the dark theme). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&theme=light</strong></em> </li>");
3556
  _e("<li><strong>color</strong> - Set this to 'white' to make the player have a white progress bar (or 'red' for a red progress bar). Note: Using white will disable the modestbranding option. <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&color=white</strong></em> </li>");
3557
  _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>");
3558
  _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>");
@@ -3682,264 +3682,263 @@ class YouTubePrefs
3682
 
3683
  <div class="ytnav">
3684
  <a href="#jumpapikey">API Key</a>
3685
- <a href="#jumphowto">How To</a>
3686
- <a href="#jumpwiz">Visual Wizard</a>
3687
  <a href="#jumpdefaults">Defaults</a>
 
3688
  <a href="#jumpcompat">Compatibility</a>
3689
  <a href="#jumpgallery">Galleries</a>
3690
- <a href="#jumpoverride">Override Defaults</a>
3691
  <a target="_blank" href="<?php echo self::$epbase . "/dashboard/pro-easy-video-analytics.aspx?ref=protab" ?>" style="border-color: #888888;">Upgrade?</a>
 
3692
  <a href="#jumpsupport">Support</a>
3693
  </div>
3694
 
 
 
3695
 
3696
- <script type="text/javascript">
3697
-
3698
- function savevalidate()
 
 
3699
  {
3700
- var valid = true;
3701
- var alertmessage = '';
3702
- if (jQuery("#<?php echo self::$opt_defaultdims; ?>").is(":checked"))
3703
  {
3704
- if (!(jQuery.isNumeric(jQuery.trim(jQuery("#<?php echo self::$opt_defaultwidth; ?>").val())) &&
3705
- jQuery.isNumeric(jQuery.trim(jQuery("#<?php echo self::$opt_defaultheight; ?>").val()))))
3706
- {
3707
- alertmessage += "Please enter valid numbers for default height and width, or uncheck the option.";
3708
- jQuery("#boxdefaultdims input").css("background-color", "#ffcccc").css("border", "2px solid #000000");
3709
- valid = false;
3710
- }
3711
  }
 
3712
 
3713
- if (jQuery("#<?php echo self::$opt_gallery_customarrows; ?>").is(":checked"))
 
 
 
3714
  {
3715
- if (!jQuery.trim(jQuery("#<?php echo self::$opt_gallery_customprev; ?>").val()) ||
3716
- !jQuery.trim(jQuery("#<?php echo self::$opt_gallery_customnext; ?>").val()))
3717
- {
3718
- alertmessage += "Please enter valid text for both the custom gallery Prev and Next buttons, or uncheck the option.";
3719
- jQuery("#boxcustomarrows input").css("background-color", "#ffcccc").css("border", "2px solid #000000");
3720
- valid = false;
3721
- }
3722
  }
 
3723
 
3724
 
3725
- if (jQuery("#<?php echo self::$opt_gallery_channelsub; ?>").is(":checked"))
 
 
 
3726
  {
3727
- if (!jQuery.trim(jQuery("#<?php echo self::$opt_gallery_channelsublink; ?>").val()) ||
3728
- !jQuery.trim(jQuery("#<?php echo self::$opt_gallery_channelsubtext; ?>").val()))
3729
- {
3730
- alertmessage += "Please enter valid text for both the subscribe text and subscribe URL, or uncheck the option.";
3731
- jQuery("#boxchannelsub input").css("background-color", "#ffcccc").css("border", "2px solid #000000");
3732
- valid = false;
3733
- }
3734
  }
 
3735
 
3736
 
3737
- if (jQuery("#<?php echo self::$opt_gallery_collapse_grid; ?>").is(":checked"))
3738
- {
3739
- var emptyStacks = [];
3740
- jQuery("#box_collapse_grid input").each(function () {
3741
- var val = jQuery(this).val();
3742
- if (jQuery.trim(val) === '' || !jQuery.isNumeric(val))
3743
- {
3744
- emptyStacks.push(this);
3745
- jQuery(this).css("background-color", "#ffcccc").css("outline", "2px solid #000000");
3746
- }
3747
- });
3748
- if (emptyStacks.length)
3749
  {
3750
- alertmessage += "Please enter a valid number for the gallery stacking screen width.";
3751
- valid = false;
3752
  }
 
 
 
 
 
3753
  }
 
3754
 
3755
 
3756
 
3757
- if (jQuery("#<?php echo self::$opt_defaultvol; ?>").is(":checked"))
 
 
3758
  {
3759
- if (!(jQuery.isNumeric(jQuery.trim(jQuery("#<?php echo self::$opt_vol; ?>").val()))))
3760
- {
3761
- alertmessage += "Please enter a number between 0 and 100 for the default volume, or uncheck the option.";
3762
- jQuery("#boxdefaultvol input").css("background-color", "#ffcccc").css("border", "2px solid #000000");
3763
- valid = false;
3764
- }
3765
  }
 
3766
 
3767
- if (!valid)
3768
- {
3769
- alert(alertmessage);
3770
- }
3771
- return valid;
3772
  }
 
 
3773
 
3774
 
3775
- jQuery(document).ready(function ($) {
3776
- jQuery('#<?php echo self::$opt_defaultdims; ?>').change(function ()
 
 
3777
  {
3778
- if (jQuery(this).is(":checked"))
3779
- {
3780
- jQuery("#boxdefaultdims").show(500);
3781
- }
3782
- else
3783
- {
3784
- jQuery("#boxdefaultdims").hide(500);
3785
- }
3786
-
3787
- });
3788
- jQuery('#<?php echo self::$opt_gallery_customarrows; ?>').change(function ()
3789
  {
3790
- if (jQuery(this).is(":checked"))
3791
- {
3792
- jQuery("#boxcustomarrows").show(500);
3793
- }
3794
- else
3795
- {
3796
- jQuery("#boxcustomarrows").hide(500);
3797
- }
3798
 
3799
- });
3800
- jQuery('#<?php echo self::$opt_gallery_collapse_grid; ?>').change(function ()
 
 
3801
  {
3802
- if (jQuery(this).is(":checked"))
3803
- {
3804
- jQuery("#box_collapse_grid").show(500);
3805
- }
3806
- else
3807
- {
3808
- jQuery("#box_collapse_grid").hide(500);
3809
- }
3810
- });
3811
- jQuery('#<?php echo self::$opt_gallery_channelsub; ?>').change(function ()
3812
  {
3813
- if (jQuery(this).is(":checked"))
3814
- {
3815
- jQuery("#boxchannelsub").show(500);
3816
- }
3817
- else
3818
- {
3819
- jQuery("#boxchannelsub").hide(500);
3820
- }
3821
 
3822
- });
3823
- jQuery('#<?php echo self::$opt_responsive; ?>').change(function ()
 
 
3824
  {
3825
- if (jQuery(this).is(":checked"))
3826
- {
3827
- jQuery("#boxresponsive_all").show(500);
3828
- }
3829
- else
3830
- {
3831
- jQuery("#boxresponsive_all").hide(500);
3832
- }
3833
- });
3834
- jQuery('#<?php echo self::$opt_migrate; ?>').change(function ()
3835
  {
3836
- if (jQuery(this).is(":checked"))
3837
- {
3838
- jQuery("#boxmigratelist").show(500);
3839
- }
3840
- else
3841
- {
3842
- jQuery("#boxmigratelist").hide(500);
3843
- }
3844
- });
3845
- jQuery('#<?php echo self::$opt_nocookie; ?>').change(function ()
3846
  {
3847
- if (jQuery(this).is(":checked"))
3848
- {
3849
- jQuery("#boxnocookie").show(500);
3850
- }
3851
- else
3852
- {
3853
- jQuery("#boxnocookie").hide(500);
3854
- }
3855
 
3856
- });
3857
- jQuery('#<?php echo self::$opt_defaultvol; ?>').change(function ()
 
 
3858
  {
3859
- if (jQuery(this).is(":checked"))
3860
- {
3861
- jQuery("#boxdefaultvol").show(500);
3862
- }
3863
- else
3864
- {
3865
- jQuery("#boxdefaultvol").hide(500);
3866
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3867
 
3868
- });
3869
- var rangedetect = document.createElement("input");
3870
- rangedetect.setAttribute("type", "range");
3871
- var canrange = rangedetect.type !== "text";
3872
- //canrange = false;
3873
- if (canrange)
3874
  {
3875
- $("input#vol").prop("type", "range").addClass("vol-range").on("input change", function () {
3876
- $('.vol-output').text($(this).val() > 0 ? $(this).val() + '%' : 'Mute');
3877
- });
3878
- $('.vol-output').css("display", "inline-block").text($("input#vol").val() > 0 ? $("input#vol").val() + '%' : 'Mute');
3879
- $('.vol-seeslider').show();
3880
- $('.vol-seetextbox').hide();
3881
  }
3882
  else
3883
  {
3884
- $("input#vol").width(40);
3885
  }
3886
 
3887
- });</script>
3888
- <?php
3889
- if (function_exists('add_thickbox'))
3890
- {
3891
- add_thickbox();
3892
- }
3893
- ?>
 
 
 
 
 
 
 
 
 
 
 
3894
 
3895
- <?php
 
 
 
 
3896
  }
 
3897
 
3898
- public static function save_changes_button($submitted)
 
 
 
 
 
 
3899
  {
3900
- $button_label = 'Save Changes';
3901
- if ($submitted)
3902
- {
3903
- $button_label = 'Changes Saved';
3904
- ?>
3905
- <script type="text/javascript">
3906
- jQuery(document).ready(function () {
3907
- setTimeout(function () {
3908
- jQuery('input.ytprefs-submit').val('Save Changes');
3909
- }, 3000);
3910
- });</script>
3911
- <?php
3912
- }
3913
  ?>
3914
- <p class="submit">
3915
- <input type="submit" onclick="return savevalidate();" name="Submit" class="button-primary ytprefs-submit" value="<?php _e($button_label) ?>" />
3916
- <em>If you're using a separate caching plugin and you do not see your changes after saving, you might want to reset your cache.</em>
3917
- </p>
 
 
3918
  <?php
3919
  }
 
 
 
 
 
 
 
3920
 
3921
- public static function ytprefsscript()
 
 
 
3922
  {
3923
- $loggedin = current_user_can('edit_posts');
3924
- if (!($loggedin && self::$alloptions[self::$opt_admin_off_scripts]))
3925
- {
3926
- wp_enqueue_style(
3927
- '__EPYT__style', plugins_url('styles/ytprefs' . self::$min . '.css', __FILE__)
3928
- );
3929
- $cols = floatval(self::$alloptions[self::$opt_gallery_columns]);
3930
- $cols = $cols == 0 ? 3.0 : $cols;
3931
- $colwidth = 100.0 / $cols;
3932
- $custom_css = "
3933
  .epyt-gallery-thumb {
3934
  width: " . round($colwidth, 3) . "%;
3935
  }
3936
  ";
3937
 
3938
- if (self::$alloptions[self::$opt_gallery_collapse_grid] == 1)
 
 
3939
  {
3940
- foreach (self::$alloptions[self::$opt_gallery_collapse_grid_breaks] as $idx => $bpts)
3941
- {
3942
- $custom_css .= "
3943
  @media (min-width:" . $bpts['bp']['min'] . "px) and (max-width: " . $bpts['bp']['max'] . "px) {
3944
  .epyt-gallery-rowbreak {
3945
  display: none;
@@ -3948,133 +3947,145 @@ class YouTubePrefs
3948
  width: " . round(100.0 / intval($bpts['cols']), 3) . "% !important;
3949
  }
3950
  }";
3951
- }
3952
  }
 
3953
 
3954
- wp_add_inline_style('__EPYT__style', $custom_css);
3955
 
3956
- wp_enqueue_script('__ytprefs__', plugins_url('scripts/ytprefs' . self::$min . '.js', __FILE__), array('jquery'));
3957
 
3958
- if (self::$alloptions[self::$opt_old_script_method] != 1)
3959
- {
3960
- $my_script_vars = array(
3961
- 'ajaxurl' => admin_url('admin-ajax.php'),
3962
- 'security' => wp_create_nonce('embedplus-nonce'),
3963
- 'gallery_scrolloffset' => intval(self::$alloptions[self::$opt_gallery_scrolloffset]),
3964
- 'eppathtoscripts' => plugins_url('scripts/', __FILE__),
3965
- 'epresponsiveselector' => self::get_responsiveselector(),
3966
- 'epdovol' => true,
3967
- 'version' => self::$alloptions[self::$opt_version],
3968
- 'evselector' => self::get_evselector(),
3969
- 'stopMobileBuffer' => self::$alloptions[self::$opt_stop_mobile_buffer] == '1' ? true : false
3970
- );
3971
-
3972
- wp_localize_script('__ytprefs__', '_EPYT_', $my_script_vars);
3973
- }
3974
 
3975
- ////////////////////// cloudflare accomodation
3976
- //add_filter('script_loader_tag', 'YouTubePrefs::set_cfasync', 10, 3);
3977
  }
 
 
 
3978
  }
 
3979
 
3980
- public static function set_cfasync($tag, $handle, $src)
 
 
3981
  {
3982
- if ('__ytprefs__' !== $handle)
3983
- {
3984
- return $tag;
3985
- }
3986
- return str_replace('<script', '<script data-cfasync="false" ', $tag);
3987
  }
 
 
3988
 
3989
- public static function get_evselector()
 
 
 
 
3990
  {
3991
- $evselector = 'iframe.__youtube_prefs__[src], iframe[src*="youtube.com/embed/"], iframe[src*="youtube-nocookie.com/embed/"]';
 
3992
 
3993
- if (self::$alloptions[self::$opt_evselector_light] == 1)
3994
- {
3995
- $evselector = 'iframe.__youtube_prefs__[src]';
3996
- }
3997
 
3998
- return $evselector;
 
 
 
 
 
3999
  }
4000
-
4001
- public static function get_responsiveselector()
4002
  {
4003
- $responsiveselector = '[]';
4004
- if (self::$alloptions[self::$opt_widgetfit] == 1)
4005
  {
4006
- $responsiveselector = '["iframe.__youtube_prefs_widget__"]';
4007
  }
4008
- if (self::$alloptions[self::$opt_responsive] == 1)
4009
  {
4010
- if (self::$alloptions[self::$opt_responsive_all] == 1)
4011
- {
4012
- $responsiveselector = '["iframe[src*=\'youtube.com\']","iframe[src*=\'youtube-nocookie.com\']","iframe[data-ep-src*=\'youtube.com\']","iframe[data-ep-src*=\'youtube-nocookie.com\']","iframe[data-ep-gallerysrc*=\'youtube.com\']"]';
4013
- }
4014
- else
4015
- {
4016
- $responsiveselector = '["iframe.__youtube_prefs__"]';
4017
- }
4018
  }
4019
- return $responsiveselector;
4020
  }
 
 
4021
 
4022
- public static function admin_enqueue_scripts($hook)
4023
- {
4024
- wp_enqueue_style('embedplusyoutube', plugins_url() . '/youtube-embed-plus/scripts/embedplus_mce' . self::$min . '.css');
4025
- add_action('wp_print_scripts', array('YouTubePrefs', 'output_scriptvars'));
4026
- wp_enqueue_script('__ytprefs_admin__', plugins_url('scripts/ytprefs-admin' . self::$min . '.js', __FILE__), array('jquery'));
 
 
 
 
 
 
 
 
 
 
4027
 
4028
- if ((get_bloginfo('version') >= '3.3') && YouTubePrefs::custom_admin_pointers_check())
4029
- {
4030
- add_action('admin_print_footer_scripts', array('YouTubePrefs', 'custom_admin_pointers_footer'));
4031
- wp_enqueue_script('wp-pointer');
4032
- wp_enqueue_style('wp-pointer');
4033
- }
4034
 
4035
- if (YouTubePrefs::$alloptions['glance'] == 1)
4036
- {
4037
- add_action('admin_print_footer_scripts', 'YouTubePrefs::glance_script');
4038
- }
4039
 
4040
- if ($hook == self::$wizard_hook)
4041
- {
4042
- wp_enqueue_style('__ytprefs_admin__wizard_ui', plugins_url() . '/youtube-embed-plus/styles/jquery-ui' . self::$min . '.css');
4043
- wp_enqueue_style('__ytprefs_admin__wizard', plugins_url() . '/youtube-embed-plus/styles/ytprefs-wizard' . self::$min . '.css');
4044
- wp_enqueue_script('__ytprefs_admin__wizard_script', plugins_url('scripts/ytprefs-wizard' . self::$min . '.js', __FILE__), array('jquery-ui-accordion', 'jquery-ui-tabs'));
4045
- }
4046
  }
4047
 
4048
- public static function get_blogwidth()
4049
  {
4050
- $blogwidth = null;
4051
- try
4052
- {
4053
- $embed_size_w = intval(get_option('embed_size_w'));
4054
 
4055
- global $content_width;
4056
- if (empty($content_width))
4057
- {
4058
- $content_width = $GLOBALS['content_width'];
4059
- }
 
 
4060
 
4061
- $blogwidth = $embed_size_w ? $embed_size_w : ($content_width ? $content_width : 450);
4062
- }
4063
- catch (Exception $ex)
 
 
 
 
 
 
4064
  {
4065
-
4066
  }
4067
 
4068
- $blogwidth = preg_replace('/\D/', '', $blogwidth); //may have px
4069
-
4070
- return $blogwidth;
 
 
4071
  }
4072
 
 
 
 
4073
  }
4074
 
4075
- $youtubeplgplus = new YouTubePrefs();
 
 
4076
 
4077
 
4078
 
4079
 
4080
-
2
  /*
3
  Plugin Name: YouTube
4
  Plugin URI: http://www.embedplus.com/dashboard/pro-easy-video-analytics.aspx
5
+ Description: YouTube Embed and YouTube Gallery WordPress Plugin. Embed a responsive video, YouTube channel, playlist gallery, or live stream
6
+ Version: 11.7.1
7
  Author: EmbedPlus Team
8
  Author URI: http://www.embedplus.com
9
  */
33
  {
34
 
35
  public static $curltimeout = 20;
36
+ public static $version = '11.7.1';
37
  public static $opt_version = 'version';
38
  public static $optembedwidth = null;
39
  public static $optembedheight = null;
124
 
125
  public function __construct()
126
  {
127
+ add_action('admin_init', array(get_class(), 'check_double_plugin_warning'));
128
+
129
  self::$alloptions = get_option(self::$opt_alloptions);
130
+ if (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG || self::$alloptions[self::$opt_debugmode] == 1)
131
+ {
132
+ self::$min = '';
133
+ }
134
+
135
  add_action('admin_notices', array(get_class(), 'separate_version_message'));
136
+
137
  if (self::$alloptions == false || version_compare(self::$alloptions[self::$opt_version], self::$version, '<'))
138
  {
139
  self::initoptions();
140
  }
141
 
142
+
143
  if (self::$alloptions[self::$opt_oldspacing] == 1)
144
  {
145
  self::$ytregex = self::$oldytregex;
169
  'end'
170
  );
171
 
172
+ add_action('media_buttons', array(get_class(), 'media_button_wizard'), 11);
173
 
174
 
175
  self::do_ytprefs();
176
+ add_action('admin_menu', array(get_class(), 'ytprefs_plugin_menu'));
177
+ add_filter('plugin_action_links_' . plugin_basename(__FILE__), array(get_class(), 'my_plugin_action_links'));
178
 
179
  if (!is_admin())
180
  {
181
  if (self::$alloptions[self::$opt_old_script_method] == 1)
182
  {
183
+ add_action('wp_print_scripts', array(get_class(), 'jsvars'));
184
+ add_action('wp_enqueue_scripts', array(get_class(), 'jsvars'));
185
  }
186
 
187
+ add_action('wp_enqueue_scripts', array(get_class(), 'ytprefsscript'), 100);
188
+ add_action('wp_enqueue_scripts', array(get_class(), 'fitvids'), 101);
 
 
 
 
 
189
  }
190
 
191
+ add_action("wp_ajax_my_embedplus_glance_vids", array(get_class(), 'my_embedplus_glance_vids'));
192
+ add_action("wp_ajax_my_embedplus_glance_count", array(get_class(), 'my_embedplus_glance_count'));
193
+ add_action("wp_ajax_my_embedplus_dismiss_double_plugin_warning", array(get_class(), 'my_embedplus_dismiss_double_plugin_warning'));
194
+ add_action("wp_ajax_my_embedplus_gallery_page", array(get_class(), 'my_embedplus_gallery_page'));
195
+ add_action("wp_ajax_nopriv_my_embedplus_gallery_page", array(get_class(), 'my_embedplus_gallery_page'));
196
+ add_action('admin_enqueue_scripts', array(get_class(), 'admin_enqueue_scripts'), 10, 1);
197
  }
198
+
199
  public static function separate_version_message()
200
  {
201
+ if (current_user_can('manage_options') && self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 10)
202
  {
203
  $class = 'notice notice-error is-dismissible';
204
  $message = 'Important message to YouTube Pro users: From version 11.7 onward, you must <a href="https://www.embedplus.com/youtube-pro/download/?prokey=' . esc_attr(self::$alloptions[self::$opt_pro]) . '" target="_blank">download the separate plugin here</a> to regain your Pro features. All your settings will automatically migrate after installing the separate Pro download. Thank you for your support and patience during this transition.';
294
  $step1_playlist_errors = '';
295
  $step1_playlist_error_invalid = 'Sorry, that does not seem to be a link to an existing playlist. Please confirm that the link works in your browser, and then copy that full link in your address bar to paste here.';
296
  $step1_channel_errors = '';
297
+ $step1_channel_error_invalid = 'Sorry, that does not seem to be a link to an existing video. Please confirm that the link works in your browser, and then copy that full link in your address bar to paste here. If you are sure your link is correct, then your API key may be too restrictive (<a target="_blank" href="https://console.developers.google.com/apis/credentials">https://console.developers.google.com/apis/credentials</a>).';
298
  $step1_live_errors = '';
299
+ $step1_live_error_invalid = 'Sorry, that does not seem to be a valid link to an existing video or channel. Please confirm that the link works in your browser, and then copy that full link in your address bar to paste here. If you are sure your link is correct, then your API key may be too restrictive (<a target="_blank" href="https://console.developers.google.com/apis/credentials">https://console.developers.google.com/apis/credentials</a>).';
300
  $if_live_preview = false;
301
  if (isset($_POST['wizform_submit']))
302
  {
733
  <img src="<?php echo plugins_url('/images/icon-playlist-self.jpg', __FILE__) ?>" class="icon-playlist" />
734
  <ol>
735
  <li>Go to the page for the playlist that lists all of its videos (<a href="https://www.youtube.com/playlist?list=PL70DEC2B0568B5469" target="_blank">Example &raquo;</a>). </li>
736
+ <li>You may then click on the video that you want the playlist to start with (this step only applies to self-contained playlists. You cannot pick a starter for gallery layout directions).</li>
737
  <li>Copy the URL in your browser and paste it in the textbox below. You'll notice that a playlist URL contains the playlist ID (e.g. "PL...")</li>
738
  <li>Click "Get Playlist" to continue.</li>
739
  </ol>
1136
  type: "post",
1137
  dataType: "json",
1138
  timeout: 30000,
1139
+ url: window._EPYTA_.wpajaxurl,
1140
  data: {action: 'my_embedplus_glance_vids', postid: pid},
1141
  success: function (response) {
1142
  if (response.type === "success") {
1369
  add_thickbox();
1370
 
1371
  $wizhref = admin_url('admin.php?page=youtube-ep-wizard') .
 
 
 
 
 
1372
  '&random=' . rand(1, 1000) .
1373
  '&TB_iframe=true&width=950&height=800';
1374
  ?>
1380
  {
1381
  if (is_plugin_active('embedplus-for-wordpress/embedplus.php'))
1382
  {
1383
+ add_action('admin_notices', array(get_class(), "double_plugin_warning"));
1384
  }
1385
  }
1386
 
1426
  type: "post",
1427
  dataType: "json",
1428
  timeout: 30000,
1429
+ url: window._EPYTA_.wpajaxurl,
1430
  data: {action: 'my_embedplus_dismiss_double_plugin_warning'},
1431
  success: function (response) {
1432
+ if (response.type === "success") {
1433
  $(".embedpluswarningbox").hide();
1434
  }
1435
  },
1712
 
1713
  public static function do_ytprefs()
1714
  {
1715
+ //add_filter('autoptimize_filter_js_exclude', array(get_class(), 'ao_override_jsexclude'), 10, 1);
1716
  if (!is_admin())
1717
  {
1718
+ add_filter('the_content', array(get_class(), 'apply_prefs_content'), 1);
1719
+ add_filter('widget_text', array(get_class(), 'apply_prefs_widget'), 1);
1720
+ //add_filter('bjll/skip_classes', array(get_class(), 'bjll_skip_classes'), 10, 2);
1721
+
1722
+ add_shortcode('embedyt', array(get_class(), 'apply_prefs_shortcode'));
1723
  if (self::$alloptions[self::$opt_migrate] == 1)
1724
  {
1725
  if (self::$alloptions[self::$opt_migrate_youtube] == 1)
1726
  {
1727
+ add_shortcode('youtube', array(get_class(), 'apply_prefs_shortcode_youtube'));
1728
+ add_shortcode('youtube_video', array(get_class(), 'apply_prefs_shortcode_youtube'));
1729
  }
1730
  if (self::$alloptions[self::$opt_migrate_embedplusvideo] == 1)
1731
  {
1732
+ add_shortcode('embedplusvideo', array(get_class(), 'apply_prefs_shortcode_embedplusvideo'));
1733
  }
1734
  }
1735
  }
1739
  {
1740
  if (strpos($exclude, 'ytprefs' . self::$min . '.js') === false)
1741
  {
1742
+ return $exclude . ',ytprefs' . self::$min . '.js,__ytprefs__';
1743
  }
1744
  return $exclude;
1745
  }
1802
 
1803
  public static function apply_prefs_content($content)
1804
  {
1805
+ $content = preg_replace_callback(self::$ytregex, array(get_class(), "get_html_content"), $content);
1806
  return $content;
1807
  }
1808
 
1809
  public static function apply_prefs_widget($content)
1810
  {
1811
+ $content = preg_replace_callback(self::$ytregex, array(get_class(), "get_html_widget"), $content);
1812
  return $content;
1813
  }
1814
 
2237
  $code1 = '<iframe ' . $centercode . ' id="_ytid_' . rand(10000, 99999) . '" width="' . self::$defaultwidth . '" height="' . self::$defaultheight .
2238
  '" src="https://www.' . $youtubebaseurl . '.com/embed/' . $videoidoutput . '?';
2239
  $code2 = '" class="__youtube_prefs__' . ($iscontent ? '' : ' __youtube_prefs_widget__') .
2240
+ '"' . $voloutput . $acctitle . $galleryid_ifm_data . ' allowfullscreen data-no-lazy="1" data-skipgform_ajax_framebjll=""></iframe>';
2241
 
2242
  $origin = '';
2243
 
2432
 
2433
  public static function ytprefs_plugin_menu()
2434
  {
2435
+ add_menu_page('YouTube Settings', 'YouTube Free', 'manage_options', 'youtube-my-preferences', array(get_class(), 'ytprefs_show_options'), plugins_url('images/youtubeicon16.png', __FILE__), '10.000392854349');
2436
+ add_submenu_page('youtube-my-preferences', '', '', 'manage_options', 'youtube-my-preferences', array(get_class(), 'ytprefs_show_options'));
2437
 
2438
+ add_submenu_page(null, 'YouTube Posts', 'YouTube Posts', 'manage_options', 'youtube-ep-glance', array(get_class(), 'glance_page'));
2439
+ self::$wizard_hook = add_submenu_page(null, 'YouTube Wizard', 'YouTube Wizard', 'edit_posts', 'youtube-ep-wizard', array(get_class(), 'wizard'));
2440
  }
2441
 
2442
  public static function custom_admin_pointers_check()
2472
  type: "post",
2473
  dataType: "json",
2474
  timeout: 30000,
2475
+ url: window._EPYTA_.wpajaxurl,
2476
  data: {action: 'my_embedplus_glance_count'},
2477
  success: function (response) {
2478
  if (response.type === "success") {
2519
  align: '<?php echo $array['align']; ?>'
2520
  },
2521
  close: function () {
2522
+ $.post(window._EPYTA_.wpajaxurl, {
2523
  pointer: '<?php echo $pointer; ?>',
2524
  action: 'dismiss-wp-pointer'
2525
  });
2548
  $new_pointer_content .= '<p>'; // ooopointer
2549
  if (!(self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0))
2550
  {
2551
+ $new_pointer_content .= __("This update includes some bug fixes for galleries and the wizard for the Free and <a target=_blank href=" . self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=frompointer' . ">Pro versions &raquo;</a>");
2552
  }
2553
  else
2554
  {
2555
+ $new_pointer_content .= __("This update includes some bug fixes for galleries and the wizard for the Free and Pro versions. " . '<strong>Important message to YouTube Pro users</strong>: From version 11.7 onward, you must <a href="https://www.embedplus.com/youtube-pro/download/?prokey=' . esc_attr(self::$alloptions[self::$opt_pro]) . '" target="_blank">download the separate plugin here</a> to regain your Pro features. All your settings will automatically migrate after installing the separate Pro download. Thank you for your support and patience during this transition.');
2556
  }
2557
  $new_pointer_content .= '</p>';
2558
 
2572
  return isset($_POST[$idx]) && $_POST[$idx] == (true || 'on');
2573
  }
2574
 
2575
+ public static function output_scriptvars() // deprecated
2576
  {
2577
  self::$scriptsprinted++;
2578
  if (self::$scriptsprinted == 1)
2594
  var epversion = '<?php echo self::$version; ?>';
2595
  var myytdefaults = '<?php echo $myytdefaults; ?>';
2596
  var eppluginadminurl = '<?php echo admin_url('admin.php?page=youtube-my-preferences'); ?>';
2597
+ //////////////////BEGIN SCRIPT HERE///////////////////////
2598
+
2599
  // Create IE + others compatible event handler
2600
  var epeventMethod = window.addEventListener ? "addEventListener" : "attachEvent";
2601
  var epeventer = window[epeventMethod];
2862
  }
2863
  $new_options[self::$opt_gallery_customnext] = $_gallery_custom_next;
2864
 
2865
+
2866
  $_not_live_content = '';
2867
  try
2868
  {
2875
  $new_options[self::$opt_not_live_content] = $_not_live_content;
2876
 
2877
 
2878
+ $_apikey = '';
2879
  try
2880
  {
2881
+ $_apikey = trim(str_replace(array(' ', "'", '"'), array('', '', ''), strip_tags($_POST[self::$opt_apikey])));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2882
  }
2883
  catch (Exception $ex)
2884
  {
2885
+ $_apikey = '';
2886
  }
2887
  $new_options[self::$opt_apikey] = $_apikey;
2888
 
2889
+
2890
  $all = $new_options + $all;
2891
 
2892
  update_option(self::$opt_alloptions, $all);
3008
 
3009
  <div class="ytindent">
3010
  <br>
 
3011
  <div class="ytnav">
3012
  <a href="#jumpapikey">API Key</a>
 
 
3013
  <a href="#jumpdefaults">Defaults</a>
3014
+ <a href="#jumpwiz">Visual Wizard</a>
3015
  <a href="#jumpcompat">Compatibility</a>
3016
  <a href="#jumpgallery">Galleries</a>
 
3017
  <a target="_blank" href="<?php echo self::$epbase . "/dashboard/pro-easy-video-analytics.aspx?ref=protab" ?>" style="border-color: #888888;">Upgrade?</a>
3018
+ <a href="#jumphowto">Embed Manually</a>
3019
  <a href="#jumpsupport">Support</a>
3020
  </div>
3021
 
3031
  </p>
3032
  <p>
3033
  <b class="chktitle">YouTube API Key:</b>
3034
+ <input type="text" name="<?php echo self::$opt_apikey; ?>" id="<?php echo self::$opt_apikey; ?>" value="<?php echo trim($all[self::$opt_apikey]); ?>" class="textinput" style="width: 250px;">
3035
  <a href="https://www.youtube.com/watch?v=LpKDFT40V0U" target="_blank">Click this link &raquo;</a> and follow the video to get your API key. Don't worry, it's an easy process.
3036
  </p>
3037
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3038
 
 
3039
  <div class="jumper" id="jumpdefaults"></div>
3040
  <h3 class="sect">
3041
  <?php _e("Default YouTube Options") ?> <a href="#top" class="totop">&#9650; top</a>
3071
  </p>
3072
  <p>
3073
  <input name="<?php echo self::$opt_rel; ?>" id="<?php echo self::$opt_rel; ?>" <?php checked($all[self::$opt_rel], 1); ?> type="checkbox" class="checkbox">
3074
+ <label for="<?php echo self::$opt_rel; ?>"><?php _e('<b class="chktitle">Related Videos:</b> Show related and recommended videos during pause and at the end of playback.') ?></label>
3075
  </p>
3076
  <p>
3077
  <input name="<?php echo self::$opt_showinfo; ?>" id="<?php echo self::$opt_showinfo; ?>" <?php checked($all[self::$opt_showinfo], 1); ?> type="checkbox" class="checkbox">
3110
  </p>
3111
  <p>
3112
  <input name="<?php echo self::$opt_widgetfit; ?>" id="<?php echo self::$opt_widgetfit; ?>" <?php checked($all[self::$opt_widgetfit], 1); ?> type="checkbox" class="checkbox">
3113
+ <label for="<?php echo self::$opt_widgetfit; ?>"><?php _e('<b class="chktitle">Autofit Widget Videos:</b> Make each video that you embed in a widget area automatically fit the width of its container.') ?></label>
3114
  </p>
3115
  <p>
3116
  <input name="<?php echo self::$opt_playsinline; ?>" id="<?php echo self::$opt_playsinline; ?>" <?php checked($all[self::$opt_playsinline], 1); ?> type="checkbox" class="checkbox">
3187
 
3188
  </div>
3189
 
3190
+
3191
+
3192
+ <div class="jumper" id="jumpwiz"></div>
3193
+ <h3 class="sect">Visual YouTube Wizard <a href="#top" class="totop">&#9650; top</a></h3>
3194
+
3195
+ <p>
3196
+ While you're writing your post or page, you have the ability to search YouTube and insert videos, playlists, and even galleries right from your editor tab.
3197
+ Simply click the <img style="vertical-align: text-bottom;" src="<?php echo plugins_url('images/wizbuttonbig.png', __FILE__) ?>"> wizard button found above
3198
+ your editor to start the wizard (see image below to locate this button). There, you'll have several options for different types of embeds.
3199
+ Each embed code will have an <span class="button-primary cuz">&#9660; Insert Into Editor</span> button that
3200
+ you can click to directly embed the desired video link to your post without having to copy and paste.
3201
+ </p>
3202
+ <p>
3203
+ <b class="orange">Even more options are available to PRO users!</b> If you download our PRO version, you can simply click the <a href="<?php echo self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=protab' ?>" target="_blank" class="button-primary cuz">&#9658; Customize</a> button within the wizard to further personalize your embeds without having to enter special codes yourself. The customize button will allow you to easily override most of the above default options for that embed.
3204
+ <br>
3205
+ <br>
3206
+ <a href="<?php echo self::$epbase ?>/dashboard/pro-easy-video-analytics.aspx" target="_blank" style="text-decoration: none;"><img style="width: 500px; margin: 0 auto; display: block;" src="<?php echo plugins_url('images/ssprowizard.png', __FILE__) ?>" ></a>
3207
+ </p>
3208
+
3209
+
3210
+ <div class="jumper" id="jumpprosettings"></div>
3211
+ <div class="upgchecks">
3212
+ <h3 class="sect">Want the PRO Features?</h3>
3213
+ <p class="orange">Below are descriptions for some of our PRO features for enhanced SEO and performance, once you purchase and install our separate PRO plugin (the PRO plugin works for all your past embed links).</p>
3214
+ <p>
3215
+ <img class="ssaltgallery" src="<?php echo plugins_url('images/ssaltgalleryall.jpg', __FILE__) ?>" />
3216
+ <select disabled>
3217
+ <option value="">Gallery Style</option>
3218
+ </select>
3219
+ <label>
3220
+ <b class="chktitle">Alternate Gallery Styling: </b> <span class="pronon">(PRO Users)</span>
3221
+ Switch from the grid style of the FREE version to another gallery style. Right now, we provide a vertical (single column) and horizontal (single row) list style as alternatives to the grid, with more designs coming. These current alternatives were inspired by the standard YouTube playlist player's "table of contents," except our gallery's video lists are always visible and shown under the playing video.
3222
+ <a target="_blank" href="<?php echo self::$epbase ?>/responsive-youtube-playlist-channel-gallery-for-wordpress.aspx">Read more here &raquo;</a>
3223
+ </label>
3224
+ </p>
3225
+
3226
+ <div class="hr"></div>
3227
+ <p>
3228
+ <img class="ssaltgallery" src="<?php echo plugins_url('images/ssverticallayout.png', __FILE__) ?>" />
3229
+ <input disabled type="checkbox" class="checkbox">
3230
+ <label>
3231
+ <b class="chktitle">Show Gallery Descriptions (for vertical list styling): </b> <span class="pronon">(PRO Users)</span>
3232
+ For the vertical list layout, this option will show full video descriptions (taken directly from YouTube.com) with each thumbnail. Note: these descriptions only apply the vertical list layout; other layouts don't have enough room.
3233
+ </label>
3234
+ </p>
3235
+ <div class="hr"></div>
3236
+ <p>
3237
+ <img class="ssaltgallery" src="<?php echo plugins_url('images/ssaltgallerycircles.jpg', __FILE__) ?>" />
3238
+ <select disabled>
3239
+ <option value="">Select Thumbnail Shape</option>
3240
+ </select>
3241
+ <label>
3242
+ <b class="chktitle">Gallery Thumbnail Shape: </b> <span class="pronon">(PRO Users)</span>
3243
+ Differentiate your gallery by showing different thumbnail shapes. We currently offer rectangle and circle shapes.
3244
+ <a target="_blank" href="<?php echo self::$epbase ?>/responsive-youtube-playlist-channel-gallery-for-wordpress.aspx">Read more here &raquo;</a>
3245
+ </label>
3246
+ </p>
3247
+
3248
+ <div class="hr"></div>
3249
+ <p>
3250
+ <img class="sspopupplayer" src="<?php echo plugins_url('images/sspopupplayer.jpg', __FILE__) ?>" />
3251
+ <label>
3252
+ <b class="chktitle">Gallery Video Display Mode: </b> <sup class="orange">NEW</sup> <span class="pronon">(PRO Users)</span>
3253
+ Display your gallery videos simply above the thumbnails (default), or as a popup lightbox.
3254
+ </label>
3255
+ <br>
3256
+ <input type="radio" disabled> Default &nbsp; <input type="radio" disabled> Popup lightbox
3257
+ </p>
3258
+
3259
+ <div class="hr"></div>
3260
+ <p>
3261
+ <input disabled type="checkbox" class="checkbox">
3262
+ <label>
3263
+ <b class="chktitle">Faster Page Loads (Caching): </b> <span class="pronon">(PRO Users)</span>
3264
+ Use embed caching to speed up your page loads. By default, WordPress needs to request information from YouTube.com's servers for every video you embed, every time a page is loaded. These data requests can add time to your total page load time. Turn on this feature to cache that data (instead of having to request for the same information every time you load a page). This should then make your pages that have videos load faster. It's been noted that even small speed ups in page load can help increase visitor engagement, retention, and conversions. Caching also makes galleries run faster.
3265
+ </label>
3266
+ <div class="indent-option">
3267
+ <label>
3268
+ <b class="chktitle">Cache Lifetime (hours): </b>
3269
+ <input disabled value="24" type="number">
3270
+ Tip: If your pages rarely change, you may wish to set this to a much higher value than 24 hours.
3271
+ </label>
3272
+ </div>
3273
+ </p>
3274
+ <div class="hr"></div>
3275
+
3276
+ <p>
3277
+ <input disabled type="checkbox" class="checkbox">
3278
+ <label>
3279
+ <b class="chktitle">Video SEO Tags:</b> <span class="pronon">(PRO Users)</span> Update your YouTube embeds with Google, Bing, and Yahoo friendly schema markup for videos.
3280
+ </label>
3281
+ </p>
3282
+ <div class="hr"></div>
3283
+ <p>
3284
+ <input disabled type="checkbox" class="checkbox">
3285
+ <label>
3286
+ <b class="chktitle">Special Lazy-Loading Effects:</b> <span class="pronon">(PRO Users)</span>
3287
+ Add eye-catching special effects that will make your YouTube embeds bounce, flip, pulse, or slide as they lazy 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 &raquo;</a>
3288
+ </label>
3289
+ </p>
3290
+ <div class="hr"></div>
3291
+ <p>
3292
+ <input disabled type="checkbox" class="checkbox">
3293
+ <label>
3294
+ <b class="chktitle">Facebook Open Graph Markup:</b> <span class="pronon">(PRO Users)</span> Include Facebook Open Graph markup with the videos you embed with this plugin. We follow the guidelines for videos as described here: <a href="https://developers.facebook.com/docs/sharing/webmasters#media" target="_blank">https://developers.facebook.com/docs/sharing/webmasters#media</a>
3295
+ </label>
3296
+ </p>
3297
+ <div class="hr"></div>
3298
+ <p>
3299
+ <img class="ssfb" src="<?php echo plugins_url('images/youtube_thumbnail_sample.jpg', __FILE__) ?>" />
3300
+ <input disabled type="checkbox" class="checkbox">
3301
+ <label>
3302
+ <b class="chktitle">Featured Thumbnail Images:</b> <span class="pronon">(PRO Users)</span>
3303
+ Automatically grab the thumbnail image of the first video embedded in each post or page, and use it as the featured image.
3304
+ All you have to do is click Update on a post or page and the plugin does the rest!
3305
+ (Example shown on the right) <a target="_blank" href="<?php echo self::$epbase ?>/add-youtube-video-thumbnails-featured-image-wordpress.aspx">Read more here &raquo;</a>
3306
+ </label>
3307
+ </p>
3308
+ <div class="hr"></div>
3309
+ <p>
3310
+ <a href="<?php echo self::$epbase ?>/dashboard/pro-easy-video-analytics.aspx" target="_blank">Purchase and download the PRO plugin to get the above and several other features &raquo;</a>
3311
+ </p>
3312
+ <div class="clearboth"></div>
3313
+ </div>
3314
+
3315
+ <hr>
3316
+
3317
+
3318
+
3319
+
3320
+
3321
+
3322
+
3323
  <div class="jumper" id="jumpcompat"></div>
3324
  <h3 class="sect">Compatibility Settings <a href="#top" class="totop">&#9650; top</a></h3>
3325
  <p>
3384
  </p>
3385
 
3386
  </div>
3387
+
3388
+
3389
+
3390
+
3391
  <div class="jumper" id="jumpgallery"></div>
3392
  <h3 class="sect">Gallery Settings and Directions <a href="#top" class="totop">&#9650; top</a></h3>
3393
  <img class="ssgallery" src="<?php echo plugins_url('images/ssgallery.png', __FILE__) ?>">
3394
  <p>
3395
  <a target="_blank" href="<?php echo self::$epbase ?>/responsive-youtube-playlist-channel-gallery-for-wordpress.aspx">You can now make playlist embeds (and channel-playlist embeds) have a gallery layout &raquo;</a>. <strong>First, you must obtain your YouTube API key</strong>.
3396
+ Don't worry, it's an easy process. Just <a href="https://www.youtube.com/watch?v=LpKDFT40V0U" target="_blank">click this link &raquo;</a> and follow the video on that page to get your server API key. Since Google updates their API Key generation directions frequently, follow the general steps shown in the video.
3397
  Then paste your API key in the "YouTube API Key" box at the top of this screen, and click the "Save Changes" button.
3398
  </p>
3399
 
3500
  </div>
3501
 
3502
 
3503
+ <div class="jumper" id="jumphowto"></div>
3504
+ <h3 class="sect">
3505
+ Manually Embed a YouTube Video or Playlist &nbsp; <a class="smallnote" href="#jumpgallery">(For gallery directions, go here &raquo;)</a>
3506
+ <a href="#top" class="totop">&#9650; top</a>
3507
+ </h3>
3508
+ <p>
3509
+ <strong>We recommend using the wizard in your editor to embed.</strong> However, if you choose to manually embed code, follow the instructions below.
3510
+ </p>
3511
+ <p>
3512
+ <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 https:// part). Easy, eh?<br>
3513
+ <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).
3514
+ </p>
3515
+ <p>
3516
+ <b>For galleries:</b> <a href="#jumpgallery">Click here</a> to scroll down to gallery settings and directions.
3517
+ </p>
3518
+ <p>
3519
+ <b>For self-contained playlists:</b> Go to the page for the playlist that lists all of its videos (<a target="_blank" href="http://www.youtube.com/playlist?list=PL70DEC2B0568B5469">Example &raquo;</a>). Click on the video that you want the playlist to start with. Copy and paste that browser URL into your blog on its own line. If you want the first video to always be the latest video in your playlist, check the option "Playlist Ordering" in the settings down below (you will also see this option available if you use the Pro Wizard). If you want to have two or more playlists next to each other on the same line, wrap each link with the <code>[embedyt]...[/embedyt]</code> shortcode.
3520
+ </p>
3521
+ <p>
3522
+ <b>For self-contained channel playlists:</b> At your editor, click on the <img style="vertical-align: text-bottom;" src="<?php echo plugins_url('images/wizbuttonbig.png', __FILE__) ?>"> wizard button and choose the option <i>Search for a video or channel to insert in my editor.</i> Then, click on the <i>channel playlist</i> option there (instead of <i>single video</i>). Search for the channel username and follow the rest of the directions there.
3523
+ </p>
3524
+ <p>
3525
+ <b>Examples:</b><br><br>
3526
+ <img style="width: 900px; height: auto;" class="shadow" src="<?php echo plugins_url('images/sshowto.png', __FILE__) ?>" />
3527
+ </p>
3528
+ <p>
3529
+ Always follow these rules for any URL:
3530
+ </p>
3531
+ <ul class="reglist">
3532
+ <li>Make sure the URL is really on its own line by itself. Or, if you need multiple videos on the same line, make sure each URL is wrapped properly with the shortcode (Example: <code>[embedyt]http://www.youtube.com/watch?v=ABCDEFGHIJK&width=400&height=250[/embedyt]</code>)</li>
3533
+ <li>Make sure the URL is <strong>not</strong> an active hyperlink (i.e., it should just be plain text). Otherwise, highlight the URL and click the "unlink" button in your editor: <img src="<?php echo plugins_url('images/unlink.png', __FILE__) ?>"/></li>
3534
+ <li>Make sure you did <strong>not</strong> format or align the URL in any way. If your URL still appears in your actual post instead of a video, highlight it and click the "remove formatting" button (formatting can be invisible sometimes): <img src="<?php echo plugins_url('images/erase.png', __FILE__) ?>"/></li>
3535
+ <li>If you really want to align the video, try wrapping the link with the shortcode first. For example: <code>[embedyt]http://www.youtube.com/watch?v=ABCDEFGHIJK[/embedyt]</code> Using the shortcode also allows you to have two or more videos next to each other on the same line. Just put the shortcoded links together on the same line. For example:<br>
3536
+ <code>[embedyt]http://www.youtube.com/watch?v=ABCDEF[/embedyt] [embedyt]http://www.youtube.com/watch?v=GHIJK[/embedyt]</code>
3537
+ </ul>
3538
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3539
 
3540
  <h3 class="sect">
3541
+ <?php _e("How To Manually Override Defaults / Other Options") ?> <a href="#top" class="totop">&#9650; top</a>
3542
  </h3>
3543
  <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 '&'.
3544
+ <br><span class="orange">PRO users: You can use the big <a href="<?php echo self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=protab' ?>" target="_blank">customize</a> buttons that you will see inside the wizard, instead of memorizing the following codes.</span>
3545
  <?php
3546
  _e('<ul>');
3547
  _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>");
3553
  _e("<li><strong>modestbranding</strong> - Set this to 1 to remove the YouTube logo while playing (or 0 to show the logo). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&modestbranding=1</strong></em> </li>");
3554
  _e("<li><strong>rel</strong> - Set this to 0 to not show related videos at the end of playing (or 1 to show them). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&rel=0</strong></em> </li>");
3555
  _e("<li><strong>showinfo</strong> - Set this to 0 to hide the video title and other info (or 1 to show it). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&showinfo=0</strong></em> </li>");
 
3556
  _e("<li><strong>color</strong> - Set this to 'white' to make the player have a white progress bar (or 'red' for a red progress bar). Note: Using white will disable the modestbranding option. <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&color=white</strong></em> </li>");
3557
  _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>");
3558
  _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>");
3682
 
3683
  <div class="ytnav">
3684
  <a href="#jumpapikey">API Key</a>
 
 
3685
  <a href="#jumpdefaults">Defaults</a>
3686
+ <a href="#jumpwiz">Visual Wizard</a>
3687
  <a href="#jumpcompat">Compatibility</a>
3688
  <a href="#jumpgallery">Galleries</a>
 
3689
  <a target="_blank" href="<?php echo self::$epbase . "/dashboard/pro-easy-video-analytics.aspx?ref=protab" ?>" style="border-color: #888888;">Upgrade?</a>
3690
+ <a href="#jumphowto">Embed Manually</a>
3691
  <a href="#jumpsupport">Support</a>
3692
  </div>
3693
 
3694
+ </div>
3695
+ <script type="text/javascript">
3696
 
3697
+ function savevalidate()
3698
+ {
3699
+ var valid = true;
3700
+ var alertmessage = '';
3701
+ if (jQuery("#<?php echo self::$opt_defaultdims; ?>").is(":checked"))
3702
  {
3703
+ if (!(jQuery.isNumeric(jQuery.trim(jQuery("#<?php echo self::$opt_defaultwidth; ?>").val())) &&
3704
+ jQuery.isNumeric(jQuery.trim(jQuery("#<?php echo self::$opt_defaultheight; ?>").val()))))
 
3705
  {
3706
+ alertmessage += "Please enter valid numbers for default height and width, or uncheck the option.";
3707
+ jQuery("#boxdefaultdims input").css("background-color", "#ffcccc").css("border", "2px solid #000000");
3708
+ valid = false;
 
 
 
 
3709
  }
3710
+ }
3711
 
3712
+ if (jQuery("#<?php echo self::$opt_gallery_customarrows; ?>").is(":checked"))
3713
+ {
3714
+ if (!jQuery.trim(jQuery("#<?php echo self::$opt_gallery_customprev; ?>").val()) ||
3715
+ !jQuery.trim(jQuery("#<?php echo self::$opt_gallery_customnext; ?>").val()))
3716
  {
3717
+ alertmessage += "Please enter valid text for both the custom gallery Prev and Next buttons, or uncheck the option.";
3718
+ jQuery("#boxcustomarrows input").css("background-color", "#ffcccc").css("border", "2px solid #000000");
3719
+ valid = false;
 
 
 
 
3720
  }
3721
+ }
3722
 
3723
 
3724
+ if (jQuery("#<?php echo self::$opt_gallery_channelsub; ?>").is(":checked"))
3725
+ {
3726
+ if (!jQuery.trim(jQuery("#<?php echo self::$opt_gallery_channelsublink; ?>").val()) ||
3727
+ !jQuery.trim(jQuery("#<?php echo self::$opt_gallery_channelsubtext; ?>").val()))
3728
  {
3729
+ alertmessage += "Please enter valid text for both the subscribe text and subscribe URL, or uncheck the option.";
3730
+ jQuery("#boxchannelsub input").css("background-color", "#ffcccc").css("border", "2px solid #000000");
3731
+ valid = false;
 
 
 
 
3732
  }
3733
+ }
3734
 
3735
 
3736
+ if (jQuery("#<?php echo self::$opt_gallery_collapse_grid; ?>").is(":checked"))
3737
+ {
3738
+ var emptyStacks = [];
3739
+ jQuery("#box_collapse_grid input").each(function () {
3740
+ var val = jQuery(this).val();
3741
+ if (jQuery.trim(val) === '' || !jQuery.isNumeric(val))
 
 
 
 
 
 
3742
  {
3743
+ emptyStacks.push(this);
3744
+ jQuery(this).css("background-color", "#ffcccc").css("outline", "2px solid #000000");
3745
  }
3746
+ });
3747
+ if (emptyStacks.length)
3748
+ {
3749
+ alertmessage += "Please enter a valid number for the gallery stacking screen width.";
3750
+ valid = false;
3751
  }
3752
+ }
3753
 
3754
 
3755
 
3756
+ if (jQuery("#<?php echo self::$opt_defaultvol; ?>").is(":checked"))
3757
+ {
3758
+ if (!(jQuery.isNumeric(jQuery.trim(jQuery("#<?php echo self::$opt_vol; ?>").val()))))
3759
  {
3760
+ alertmessage += "Please enter a number between 0 and 100 for the default volume, or uncheck the option.";
3761
+ jQuery("#boxdefaultvol input").css("background-color", "#ffcccc").css("border", "2px solid #000000");
3762
+ valid = false;
 
 
 
3763
  }
3764
+ }
3765
 
3766
+ if (!valid)
3767
+ {
3768
+ alert(alertmessage);
 
 
3769
  }
3770
+ return valid;
3771
+ }
3772
 
3773
 
3774
+ jQuery(document).ready(function ($) {
3775
+ jQuery('#<?php echo self::$opt_defaultdims; ?>').change(function ()
3776
+ {
3777
+ if (jQuery(this).is(":checked"))
3778
  {
3779
+ jQuery("#boxdefaultdims").show(500);
3780
+ }
3781
+ else
 
 
 
 
 
 
 
 
3782
  {
3783
+ jQuery("#boxdefaultdims").hide(500);
3784
+ }
 
 
 
 
 
 
3785
 
3786
+ });
3787
+ jQuery('#<?php echo self::$opt_gallery_customarrows; ?>').change(function ()
3788
+ {
3789
+ if (jQuery(this).is(":checked"))
3790
  {
3791
+ jQuery("#boxcustomarrows").show(500);
3792
+ }
3793
+ else
 
 
 
 
 
 
 
3794
  {
3795
+ jQuery("#boxcustomarrows").hide(500);
3796
+ }
 
 
 
 
 
 
3797
 
3798
+ });
3799
+ jQuery('#<?php echo self::$opt_gallery_collapse_grid; ?>').change(function ()
3800
+ {
3801
+ if (jQuery(this).is(":checked"))
3802
  {
3803
+ jQuery("#box_collapse_grid").show(500);
3804
+ }
3805
+ else
 
 
 
 
 
 
 
3806
  {
3807
+ jQuery("#box_collapse_grid").hide(500);
3808
+ }
3809
+ });
3810
+ jQuery('#<?php echo self::$opt_gallery_channelsub; ?>').change(function ()
3811
+ {
3812
+ if (jQuery(this).is(":checked"))
 
 
 
 
3813
  {
3814
+ jQuery("#boxchannelsub").show(500);
3815
+ }
3816
+ else
3817
+ {
3818
+ jQuery("#boxchannelsub").hide(500);
3819
+ }
 
 
3820
 
3821
+ });
3822
+ jQuery('#<?php echo self::$opt_responsive; ?>').change(function ()
3823
+ {
3824
+ if (jQuery(this).is(":checked"))
3825
  {
3826
+ jQuery("#boxresponsive_all").show(500);
3827
+ }
3828
+ else
3829
+ {
3830
+ jQuery("#boxresponsive_all").hide(500);
3831
+ }
3832
+ });
3833
+ jQuery('#<?php echo self::$opt_migrate; ?>').change(function ()
3834
+ {
3835
+ if (jQuery(this).is(":checked"))
3836
+ {
3837
+ jQuery("#boxmigratelist").show(500);
3838
+ }
3839
+ else
3840
+ {
3841
+ jQuery("#boxmigratelist").hide(500);
3842
+ }
3843
+ });
3844
+ jQuery('#<?php echo self::$opt_nocookie; ?>').change(function ()
3845
+ {
3846
+ if (jQuery(this).is(":checked"))
3847
+ {
3848
+ jQuery("#boxnocookie").show(500);
3849
+ }
3850
+ else
3851
+ {
3852
+ jQuery("#boxnocookie").hide(500);
3853
+ }
3854
 
3855
+ });
3856
+ jQuery('#<?php echo self::$opt_defaultvol; ?>').change(function ()
3857
+ {
3858
+ if (jQuery(this).is(":checked"))
 
 
3859
  {
3860
+ jQuery("#boxdefaultvol").show(500);
 
 
 
 
 
3861
  }
3862
  else
3863
  {
3864
+ jQuery("#boxdefaultvol").hide(500);
3865
  }
3866
 
3867
+ });
3868
+ var rangedetect = document.createElement("input");
3869
+ rangedetect.setAttribute("type", "range");
3870
+ var canrange = rangedetect.type !== "text";
3871
+ //canrange = false;
3872
+ if (canrange)
3873
+ {
3874
+ $("input#vol").prop("type", "range").addClass("vol-range").on("input change", function () {
3875
+ $('.vol-output').text($(this).val() > 0 ? $(this).val() + '%' : 'Mute');
3876
+ });
3877
+ $('.vol-output').css("display", "inline-block").text($("input#vol").val() > 0 ? $("input#vol").val() + '%' : 'Mute');
3878
+ $('.vol-seeslider').show();
3879
+ $('.vol-seetextbox').hide();
3880
+ }
3881
+ else
3882
+ {
3883
+ $("input#vol").width(40);
3884
+ }
3885
 
3886
+ });</script>
3887
+ <?php
3888
+ if (function_exists('add_thickbox'))
3889
+ {
3890
+ add_thickbox();
3891
  }
3892
+ ?>
3893
 
3894
+ <?php
3895
+ }
3896
+
3897
+ public static function save_changes_button($submitted)
3898
+ {
3899
+ $button_label = 'Save Changes';
3900
+ if ($submitted)
3901
  {
3902
+ $button_label = 'Changes Saved';
 
 
 
 
 
 
 
 
 
 
 
 
3903
  ?>
3904
+ <script type="text/javascript">
3905
+ jQuery(document).ready(function () {
3906
+ setTimeout(function () {
3907
+ jQuery('input.ytprefs-submit').val('Save Changes');
3908
+ }, 3000);
3909
+ });</script>
3910
  <?php
3911
  }
3912
+ ?>
3913
+ <p class="submit">
3914
+ <input type="submit" onclick="return savevalidate();" name="Submit" class="button-primary ytprefs-submit" value="<?php _e($button_label) ?>" />
3915
+ <em>If you're using a separate caching plugin and you do not see your changes after saving, you might want to reset your cache.</em>
3916
+ </p>
3917
+ <?php
3918
+ }
3919
 
3920
+ public static function ytprefsscript()
3921
+ {
3922
+ $loggedin = current_user_can('edit_posts');
3923
+ if (!($loggedin && self::$alloptions[self::$opt_admin_off_scripts]))
3924
  {
3925
+ wp_enqueue_style(
3926
+ '__EPYT__style', plugins_url('styles/ytprefs' . self::$min . '.css', __FILE__)
3927
+ );
3928
+ $cols = floatval(self::$alloptions[self::$opt_gallery_columns]);
3929
+ $cols = $cols == 0 ? 3.0 : $cols;
3930
+ $colwidth = 100.0 / $cols;
3931
+ $custom_css = "
 
 
 
3932
  .epyt-gallery-thumb {
3933
  width: " . round($colwidth, 3) . "%;
3934
  }
3935
  ";
3936
 
3937
+ if (self::$alloptions[self::$opt_gallery_collapse_grid] == 1)
3938
+ {
3939
+ foreach (self::$alloptions[self::$opt_gallery_collapse_grid_breaks] as $idx => $bpts)
3940
  {
3941
+ $custom_css .= "
 
 
3942
  @media (min-width:" . $bpts['bp']['min'] . "px) and (max-width: " . $bpts['bp']['max'] . "px) {
3943
  .epyt-gallery-rowbreak {
3944
  display: none;
3947
  width: " . round(100.0 / intval($bpts['cols']), 3) . "% !important;
3948
  }
3949
  }";
 
3950
  }
3951
+ }
3952
 
3953
+ wp_add_inline_style('__EPYT__style', $custom_css);
3954
 
3955
+ wp_enqueue_script('__ytprefs__', plugins_url('scripts/ytprefs' . self::$min . '.js', __FILE__), array('jquery'));
3956
 
3957
+ if (self::$alloptions[self::$opt_old_script_method] != 1)
3958
+ {
3959
+ $my_script_vars = array(
3960
+ 'ajaxurl' => admin_url('admin-ajax.php'),
3961
+ 'security' => wp_create_nonce('embedplus-nonce'),
3962
+ 'gallery_scrolloffset' => intval(self::$alloptions[self::$opt_gallery_scrolloffset]),
3963
+ 'eppathtoscripts' => plugins_url('scripts/', __FILE__),
3964
+ 'epresponsiveselector' => self::get_responsiveselector(),
3965
+ 'epdovol' => true,
3966
+ 'version' => self::$alloptions[self::$opt_version],
3967
+ 'evselector' => self::get_evselector(),
3968
+ 'stopMobileBuffer' => self::$alloptions[self::$opt_stop_mobile_buffer] == '1' ? true : false
3969
+ );
 
 
 
3970
 
3971
+ wp_localize_script('__ytprefs__', '_EPYT_', $my_script_vars);
 
3972
  }
3973
+
3974
+ ////////////////////// cloudflare accomodation
3975
+ //add_filter('script_loader_tag', array(get_class(), 'set_cfasync'), 10, 3);
3976
  }
3977
+ }
3978
 
3979
+ public static function set_cfasync($tag, $handle, $src)
3980
+ {
3981
+ if ('__ytprefs__' !== $handle)
3982
  {
3983
+ return $tag;
 
 
 
 
3984
  }
3985
+ return str_replace('<script', '<script data-cfasync="false" ', $tag);
3986
+ }
3987
 
3988
+ public static function get_evselector()
3989
+ {
3990
+ $evselector = 'iframe.__youtube_prefs__[src], iframe[src*="youtube.com/embed/"], iframe[src*="youtube-nocookie.com/embed/"]';
3991
+
3992
+ if (self::$alloptions[self::$opt_evselector_light] == 1)
3993
  {
3994
+ $evselector = 'iframe.__youtube_prefs__[src]';
3995
+ }
3996
 
3997
+ return $evselector;
3998
+ }
 
 
3999
 
4000
+ public static function get_responsiveselector()
4001
+ {
4002
+ $responsiveselector = '[]';
4003
+ if (self::$alloptions[self::$opt_widgetfit] == 1)
4004
+ {
4005
+ $responsiveselector = '["iframe.__youtube_prefs_widget__"]';
4006
  }
4007
+ if (self::$alloptions[self::$opt_responsive] == 1)
 
4008
  {
4009
+ if (self::$alloptions[self::$opt_responsive_all] == 1)
 
4010
  {
4011
+ $responsiveselector = '["iframe[src*=\'youtube.com\']","iframe[src*=\'youtube-nocookie.com\']","iframe[data-ep-src*=\'youtube.com\']","iframe[data-ep-src*=\'youtube-nocookie.com\']","iframe[data-ep-gallerysrc*=\'youtube.com\']"]';
4012
  }
4013
+ else
4014
  {
4015
+ $responsiveselector = '["iframe.__youtube_prefs__"]';
 
 
 
 
 
 
 
4016
  }
 
4017
  }
4018
+ return $responsiveselector;
4019
+ }
4020
 
4021
+ public static function admin_enqueue_scripts($hook)
4022
+ {
4023
+ wp_enqueue_style('embedplusyoutube', plugins_url() . '/youtube-embed-plus/scripts/embedplus_mce' . self::$min . '.css');
4024
+ ////////////////// add_action('wp_print_scripts', array(get_class(), 'output_scriptvars'));
4025
+ wp_enqueue_script('__ytprefs_admin__', plugins_url('scripts/ytprefs-admin' . self::$min . '.js', __FILE__), array('jquery'), self::$version, false);
4026
+ $admin_script_vars = array(
4027
+ 'wpajaxurl' => admin_url('admin-ajax.php')
4028
+ //'epblogwidth' => self::get_blogwidth(),
4029
+ //'epprokey' => self::$alloptions[self::$opt_pro],
4030
+ //'epbasesite' => self::$epbase,
4031
+ //'epversion' => self::$version,
4032
+ //'myytdefaults' => http_build_query(self::$alloptions),
4033
+ //'eppluginadminurl' => admin_url('admin.php?page=youtube-my-preferences')
4034
+ );
4035
+ wp_localize_script('__ytprefs_admin__', '_EPYTA_', $admin_script_vars);
4036
 
 
 
 
 
 
 
4037
 
 
 
 
 
4038
 
4039
+
4040
+ if ((get_bloginfo('version') >= '3.3') && self::custom_admin_pointers_check())
4041
+ {
4042
+ add_action('admin_print_footer_scripts', array(get_class(), 'custom_admin_pointers_footer'));
4043
+ wp_enqueue_script('wp-pointer');
4044
+ wp_enqueue_style('wp-pointer');
4045
  }
4046
 
4047
+ if (self::$alloptions['glance'] == 1)
4048
  {
4049
+ add_action('admin_print_footer_scripts', array(get_class(), 'glance_script'));
4050
+ }
 
 
4051
 
4052
+ if ($hook == self::$wizard_hook)
4053
+ {
4054
+ wp_enqueue_style('__ytprefs_admin__wizard_ui', plugins_url() . '/youtube-embed-plus/styles/jquery-ui' . self::$min . '.css');
4055
+ wp_enqueue_style('__ytprefs_admin__wizard', plugins_url() . '/youtube-embed-plus/styles/ytprefs-wizard' . self::$min . '.css');
4056
+ wp_enqueue_script('__ytprefs_admin__wizard_script', plugins_url('scripts/ytprefs-wizard' . self::$min . '.js', __FILE__), array('jquery-ui-accordion', 'jquery-ui-tabs'));
4057
+ }
4058
+ }
4059
 
4060
+ public static function get_blogwidth()
4061
+ {
4062
+ $blogwidth = null;
4063
+ try
4064
+ {
4065
+ $embed_size_w = intval(get_option('embed_size_w'));
4066
+
4067
+ global $content_width;
4068
+ if (empty($content_width))
4069
  {
4070
+ $content_width = $GLOBALS['content_width'];
4071
  }
4072
 
4073
+ $blogwidth = $embed_size_w ? $embed_size_w : ($content_width ? $content_width : 450);
4074
+ }
4075
+ catch (Exception $ex)
4076
+ {
4077
+
4078
  }
4079
 
4080
+ $blogwidth = preg_replace('/\D/', '', $blogwidth); //may have px
4081
+
4082
+ return $blogwidth;
4083
  }
4084
 
4085
+ }
4086
+
4087
+ $youtubeplgplus = new YouTubePrefs();
4088
 
4089
 
4090
 
4091