Version Description
Download this release
Release Info
Developer | embedplus |
Plugin | YouTube |
Version | 11.3 |
Comparing to | |
See all releases |
Code changes from version 11.2 to 11.3
- images/sspopupplayer.jpg +0 -0
- images/sswizardbutton.jpg +0 -0
- readme.txt +115 -113
- scripts/fitvids.js +7 -0
- scripts/fitvids.min.js +4 -3
- scripts/lity.css +194 -0
- scripts/lity.js +437 -0
- scripts/lity.min.css +3 -0
- scripts/lity.min.js +4 -0
- scripts/ytprefs.js +44 -8
- scripts/ytprefs.min.js +15 -14
- styles/ytprefs.css +15 -0
- styles/ytprefs.min.css +1 -2
- youtube.php +352 -300
images/sspopupplayer.jpg
ADDED
Binary file
|
images/sswizardbutton.jpg
ADDED
Binary file
|
readme.txt
CHANGED
@@ -4,38 +4,39 @@ Plugin Name: YouTube Embed
|
|
4 |
Tags: youtube channel, video gallery, youtube galleries, channel gallery, gallery, playlist gallery, youtube gallery, accessibility, analytics, api, blocked youtube videos, cache, caching, channel, deleted youtube videos, effects, embed youtube, embedding youtube, featured image, get_locale, i18n, internationalization, l10n, language, lazy, lazy load, locale, localization, mute, no-cookie, oembed, page speed, playlist, playlists, plugin, Reddit, responsive, seo, short code, shortcode, ssl, subtitles, thumbnail, thumbnail image, thumbnails, tinymce, translate, translator, video, video analytics, video plugin, video seo, video shortcode, video thumbnails, view count, volume, widget, wordpress security, wordpress youtube embed, youtube, youtube api, youtube analytics, youtube embed, youtube impressions, youtube player, youtube playlist, youtube plugin, youtube shortcode, youtube snippets, youtube takedowns, youtube thumbnails, youtube plugin migration
|
5 |
Requires at least: 3.3
|
6 |
Tested up to: 4.5
|
7 |
-
Stable tag: 11.
|
8 |
License: GPLv3 or later
|
9 |
|
10 |
-
YouTube
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
-
**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 |
-
* Improved accessibility by using title attributes for screen reader support. It should help your site
|
|
|
19 |
* 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).
|
20 |
* Easy "Insert" button for both the Visual and Text mode of the editor
|
21 |
-
*
|
22 |
* 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.
|
23 |
* [Volume level initialization](http://www.embedplus.com/mute-volume-youtube-wordpress.aspx) - helpful when autoplay is checked
|
24 |
* iOS playback preferences
|
25 |
-
*
|
26 |
-
* Instant HTTPS support. It can even convert past non-HTTPS videos to HTTPS. Did you know that Google uses
|
27 |
* "At a Glance" direct access to your YouTube posts/pages
|
28 |
-
* Shortcode support for
|
29 |
-
*
|
30 |
-
*
|
31 |
* YouTube plugin migration support
|
32 |
|
33 |
You can even extend the plugin with PRO features like:
|
34 |
|
35 |
-
* Alternate playlist and channel gallery styling
|
36 |
* Caching to avoid making frequent requests to YouTube.com and speed up your page loads
|
37 |
-
*
|
38 |
-
* [
|
39 |
* Automatic tagging for video SEO
|
40 |
* Automatic Open Graph tagging for Facebook
|
41 |
* Deleted video alerts (i.e., did Google remove or take down videos I previously embedded?)
|
@@ -49,7 +50,6 @@ This plugin helps you easily manage the growing complexity of YouTube embedding.
|
|
49 |
|
50 |
The settings page has plenty of default options that you can automatically apply to all your embedded YouTube videos. **Check out the free options below:**
|
51 |
|
52 |
-
* [Force HD quality when available >>](http://www.embedplus.com/force-high-definition-hd-youtube-embed.aspx) (now deprecated)
|
53 |
* Make your videos responsive so that they dynamically fit in all screen sizes (smart phone, PC and tablet)
|
54 |
* Modest branding - hide YouTube logo while playing
|
55 |
* Turn on/off all annotations by default
|
@@ -66,23 +66,23 @@ The settings page has plenty of default options that you can automatically apply
|
|
66 |
|
67 |
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:
|
68 |
|
69 |
-
* 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`
|
70 |
-
* 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`
|
71 |
-
* 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`
|
72 |
-
* 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`
|
73 |
-
* 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`
|
74 |
-
* 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`
|
75 |
-
* loop - Set this to 1 to loop the video (or 0 to not loop). Example: `http://www.youtube.com/watch?v=quwebVjAEJA&loop=1`
|
76 |
-
* 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`
|
77 |
-
* 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`
|
78 |
-
* 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`
|
79 |
-
* 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`
|
80 |
-
* 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`
|
81 |
|
82 |
You can also start and end each individual video at particular times. Like the above, each option should begin with '&'
|
83 |
|
84 |
-
* start - Sets the time (in seconds) to start the video. Example: `http://www.youtube.com/watch?v=quwebVjAEJA&width=500&height=350&start=20`
|
85 |
-
* end - Sets the time (in seconds) to stop the video. Example: `http://www.youtube.com/watch?v=quwebVjAEJA&width=500&height=350&end=100`
|
86 |
|
87 |
**About the PRO version:**
|
88 |
|
@@ -110,23 +110,23 @@ See more details after installing. Enjoy!
|
|
110 |
|
111 |
**Additional codes (adding these will override the default settings in the admin):**
|
112 |
|
113 |
-
* 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`
|
114 |
-
* 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`
|
115 |
-
* 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`
|
116 |
-
* 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`
|
117 |
-
* 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`
|
118 |
-
* 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`
|
119 |
-
* loop - Set this to 1 to loop the video (or 0 to not loop). Example: `http://www.youtube.com/watch?v=quwebVjAEJA&loop=1`
|
120 |
-
* 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`
|
121 |
-
* 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`
|
122 |
-
* 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`
|
123 |
-
* 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`
|
124 |
-
* 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`
|
125 |
|
126 |
You can also start and end each individual video at particular times. Like the above, each option should begin with '&'
|
127 |
|
128 |
-
* start - Sets the time (in seconds) to start the video. Example: `http://www.youtube.com/watch?v=quwebVjAEJA&width=500&height=350&start=20`
|
129 |
-
* end - Sets the time (in seconds) to stop the video. Example: `http://www.youtube.com/watch?v=quwebVjAEJA&width=500&height=350&end=100`
|
130 |
|
131 |
**Always follow these rules when pasting a link:**
|
132 |
|
@@ -149,219 +149,223 @@ You can also start and end each individual video at particular times. Like the a
|
|
149 |
|
150 |
== Changelog ==
|
151 |
|
152 |
-
= YouTube Embed 11.
|
|
|
|
|
|
|
|
|
153 |
* Adds improved wizard and gallery options for Free and Pro users.
|
154 |
* Improved handling of PHP notices.
|
155 |
* Clear cache shortcut added for Pro users.
|
156 |
|
157 |
-
= YouTube Embed 11.1 =
|
158 |
* Automatic continuous play for playlist and channel gallery embeds.
|
159 |
* Ability to add a YouTube channel subscription link to all galleries.
|
160 |
* Ability to hide Previous/Next buttons and page numbers.
|
161 |
* Featured images can now be pulled from playlists (using the thumbnail of the first video).
|
162 |
|
163 |
-
= YouTube Embed 11.0.1 =
|
164 |
Improves HTTPS support for structured data tags, and HTTPS support in Firefox.
|
165 |
|
166 |
-
= YouTube Embed 11.0 =
|
167 |
Improves playlist and gallery embedding functionality.
|
168 |
|
169 |
-
= YouTube Embed 10.9 =
|
170 |
This version offers a host of updates: compatibility fixes, higher quality featured images, selective responsive sizing, wizard enhancements, and circular shaped thumbnails.
|
171 |
|
172 |
-
= YouTube Embed 10.8 =
|
173 |
This update improves compatibility and adds features to Free and Pro galleries.
|
174 |
|
175 |
-
= YouTube Embed 10.7 =
|
176 |
Adds legacy option.
|
177 |
|
178 |
-
= YouTube Embed 10.6 =
|
179 |
Enhanced debugging support for galleries.
|
180 |
|
181 |
-
= YouTube Embed 10.5 =
|
182 |
Enhanced gallery settings for scrolling, video titles, and thumbnail styling.
|
183 |
|
184 |
-
= YouTube Embed 10.4 =
|
185 |
Addresses limitations some users were getting when pasting a YouTube channel and/or playlist gallery.
|
186 |
|
187 |
-
= YouTube Embed 10.3 =
|
188 |
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)
|
189 |
|
190 |
-
= YouTube Embed 10.2 =
|
191 |
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.
|
192 |
|
193 |
-
= YouTube Embed 10.1 =
|
194 |
Adds the ability to automatically migrate from another plugin's shortcode. Caching feature now allows lifetime settings. Improved compatibility with other plugins using the YouTube API.
|
195 |
|
196 |
-
= YouTube Embed 10.0 =
|
197 |
This update includes improved tips (Free and Pro) and adds caching to the Pro version for faster page loading.
|
198 |
|
199 |
-
= YouTube Embed 9.8 =
|
200 |
Upgraded code to use YouTube API v3.
|
201 |
|
202 |
-
= YouTube Embed 9.7 =
|
203 |
Adds improved accessibility for screen readers and video thumbnail as featured image support.
|
204 |
|
205 |
-
= YouTube Embed 9.5 =
|
206 |
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).
|
207 |
|
208 |
-
= YouTube Embed 9.4 =
|
209 |
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)
|
210 |
|
211 |
-
= YouTube Embed 9.3 =
|
212 |
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)
|
213 |
|
214 |
-
= YouTube Embed 9.2 =
|
215 |
HTTPS/SSL detection is now fully automatic. The manual checkbox is no longer needed.
|
216 |
|
217 |
-
= YouTube Embed 9.1 =
|
218 |
With this version, the plugin can now automatically detect your site's default language and set the interface of the embedded YouTube player to match.
|
219 |
|
220 |
-
= YouTube Embed 9.0 =
|
221 |
Adds automatic localization/internationalization so you can set the player's interface language from English to another.
|
222 |
|
223 |
-
= YouTube Embed 8.9 =
|
224 |
Allows volume level initialization.
|
225 |
|
226 |
-
= YouTube Embed 8.8 =
|
227 |
* Better embedplus plugin conflict notifications.
|
228 |
* 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).
|
229 |
* Supports latest version of WordPress (3.9.2).
|
230 |
|
231 |
-
= YouTube Embed 8.7 =
|
232 |
(PRO) Extends the plugin's existing tagging capabilities by also adding Open Graph markup to enhance Facebook sharing/discovery of your pages.
|
233 |
|
234 |
-
= YouTube Embed 8.6 =
|
235 |
Expanded HTTPS/SSL support.
|
236 |
|
237 |
-
= YouTube Embed 8.5 =
|
238 |
This update features a new iOS related option for both Free and PRO users. PRO users additionally have the new mobile compatibility checker.
|
239 |
|
240 |
-
= YouTube Embed 8.4 =
|
241 |
This update features improved responsive theme support for both Free and PRO versions. It also adds refined schema tag support to the Pro SEO feature.
|
242 |
|
243 |
-
= YouTube Embed 8.3 =
|
244 |
Now compatible with WordPress 3.9.
|
245 |
|
246 |
-
= YouTube Embed 8.2 =
|
247 |
An at a glance regex impromevent (all users). Dashboard now warns you of embeds that are blocked from your visitors in other countries (PRO).
|
248 |
|
249 |
-
= YouTube Embed 8.1 =
|
250 |
Fixes rare YouTube ID issue.
|
251 |
|
252 |
-
= YouTube Embed 8.0 =
|
253 |
Fixes rare ajax issue.
|
254 |
|
255 |
-
= YouTube Embed 7.9 =
|
256 |
YouTube searching and inserting now works in Text mode of the editor too.
|
257 |
|
258 |
-
= YouTube Embed 7.8 =
|
259 |
"At a Glance" direct access to YouTube posts/pages.
|
260 |
|
261 |
-
= YouTube Embed 7.7 =
|
262 |
Fixes black bar issue when no height/width is specified.
|
263 |
|
264 |
-
= YouTube Embed 7.6 =
|
265 |
Added notice about Google's HD problem.
|
266 |
|
267 |
-
= YouTube Embed 7.5 =
|
268 |
Ability to embed an entire channel as a playlist embed.
|
269 |
|
270 |
-
= YouTube Embed 7.3 =
|
271 |
Change the color of the progress bar from red to white.
|
272 |
|
273 |
-
= YouTube Embed 7.2 =
|
274 |
Added music video extras to inspire your posts (PRO).
|
275 |
|
276 |
-
= YouTube Embed 7.1 =
|
277 |
Added autohide controls feature
|
278 |
|
279 |
-
= YouTube Embed 7.0 =
|
280 |
Shortcode support for embedding multiple videos on one line
|
281 |
|
282 |
-
= YouTube Embed 6.4 =
|
283 |
Fixes for some users of WordPress 3.8
|
284 |
|
285 |
-
= YouTube Embed 6.3 =
|
286 |
Removed possible e_notices.
|
287 |
|
288 |
-
= YouTube Embed 6.2 =
|
289 |
Given the increasing focus on privacy, the no-cookies options was added as a free option to all users. Priority support enhancements also made.
|
290 |
|
291 |
-
= YouTube Embed 6.1 =
|
292 |
Easier access to general settings and dashboard.
|
293 |
|
294 |
-
= YouTube Embed 6.0 =
|
295 |
This version opens up the ability to view Internet video discussions to all wizard users.
|
296 |
**Also, due to numerous users being unable to find the wizard button, we moved it up next to the "Add Media" button.**
|
297 |
Finally, we added Video SEO tags as a PRO option.
|
298 |
|
299 |
-
= YouTube Embed 5.1 =
|
300 |
Added ability to set default dimensions.
|
301 |
Enhanced compatibility with SSL sites.
|
302 |
|
303 |
-
= YouTube Embed 5.0 =
|
304 |
Built-in YouTube video search, viewing, and insertion right from your editor tab (for all users).
|
305 |
The ability to review the latest web discussions about a video you want to embed before embedding it (PRO users).
|
306 |
Other minor optimizations.
|
307 |
|
308 |
-
= YouTube Embed 4.8 =
|
309 |
Works when pasting embed link in sidebar text widgets
|
310 |
|
311 |
-
= YouTube Embed 4.7 =
|
312 |
Improved separation of PRO and Free features in the UI
|
313 |
|
314 |
-
= YouTube Embed 4.6 =
|
315 |
Added optional responsive video layout to fit all screen sizes. (smart phone, PC and tablet)
|
316 |
|
317 |
-
= YouTube Embed 4.5 =
|
318 |
Added support for playlists.
|
319 |
added support for wmode.
|
320 |
|
321 |
-
= YouTube Embed 4.1 =
|
322 |
Fixed spacing issue. Also added ability to fall back to old spacing format.
|
323 |
|
324 |
-
= YouTube Embed 4.0 =
|
325 |
New features for all users: lazy loading for the flash player by default and the ability to hide player controls for a cleaner look.
|
326 |
|
327 |
-
= YouTube Embed 3.7 =
|
328 |
Enhanced deleted video checker for PRO users
|
329 |
|
330 |
-
= YouTube Embed 3.5 =
|
331 |
Added ability to try to force HTML5 player to speed up page loading
|
332 |
|
333 |
-
= YouTube Embed 3.3 =
|
334 |
HTTPS: Added secure YouTube embedding
|
335 |
|
336 |
-
= YouTube Embed 3.2 =
|
337 |
Ensures video-specific height overrides defaults properly
|
338 |
|
339 |
-
= YouTube Embed 3.1 =
|
340 |
Fixed obscure height problem
|
341 |
|
342 |
-
= YouTube Embed 3.0 =
|
343 |
Added Visual YouTube Wizard for PRO users
|
344 |
Added autologin to analytics for PRO users
|
345 |
Added priority support form for PRO users
|
346 |
|
347 |
-
= YouTube Embed 2.6 =
|
348 |
Compatible with WP 3.6
|
349 |
|
350 |
-
= YouTube Embed 2.4 =
|
351 |
Added auto HD support
|
352 |
-
Support for shorthand (i.e. `http://www.youtu.be`)
|
353 |
Fixed editor issue
|
354 |
|
355 |
-
= YouTube Embed 2.3 =
|
356 |
Start/end time shortcut bug fix
|
357 |
|
358 |
-
= YouTube Embed 2.2 =
|
359 |
Minor changes
|
360 |
|
361 |
-
= YouTube Embed 2.1 =
|
362 |
By request from several users, we've added easier access to the video analytics dashboard
|
363 |
|
364 |
-
= YouTube Embed 2.0 =
|
365 |
|
366 |
This upgrade specifically integrates a user-friendly YouTube Analytics Dashboard to this plugin so you can learn a lot more about the videos you post. Download it if you would like it to use your site's YouTube-related activity to help answer questions like:
|
367 |
|
@@ -372,14 +376,12 @@ This upgrade specifically integrates a user-friendly YouTube Analytics Dashboard
|
|
372 |
|
373 |
We think these are all interesting questions; however, note that there's no need to upgrade if you don't.
|
374 |
|
375 |
-
= YouTube Embed 1.1 =
|
376 |
Fixed minor bug.
|
377 |
|
378 |
-
= YouTube Embed 1.0 =
|
379 |
First release uploaded to the plugin repository.
|
380 |
|
381 |
== Other Notes ==
|
382 |
|
383 |
This YouTube plugin can include premium features like animation effects using lazy loading, alternate playlist and channel gallery styles, automatic video thumbnail support, automatic schema tagging for video SEO, mobile compatibility checking, and deleted video alerts when you [upgrade to PRO](https://www.embedplus.com/dashboard/pro-easy-video-analytics.aspx).
|
384 |
-
|
385 |
-
We also have a YouTube channel with some helper videos. [Check them out here >>](https://www.youtube.com/user/EmbedPlus)
|
4 |
Tags: youtube channel, video gallery, youtube galleries, channel gallery, gallery, playlist gallery, youtube gallery, accessibility, analytics, api, blocked youtube videos, cache, caching, channel, deleted youtube videos, effects, embed youtube, embedding youtube, featured image, get_locale, i18n, internationalization, l10n, language, lazy, lazy load, locale, localization, mute, no-cookie, oembed, page speed, playlist, playlists, plugin, Reddit, responsive, seo, short code, shortcode, ssl, subtitles, thumbnail, thumbnail image, thumbnails, tinymce, translate, translator, video, video analytics, video plugin, video seo, video shortcode, video thumbnails, view count, volume, widget, wordpress security, wordpress youtube embed, youtube, youtube api, youtube analytics, youtube embed, youtube impressions, youtube player, youtube playlist, youtube plugin, youtube shortcode, youtube snippets, youtube takedowns, youtube thumbnails, youtube plugin migration
|
5 |
Requires at least: 3.3
|
6 |
Tested up to: 4.5
|
7 |
+
Stable tag: 11.3
|
8 |
License: GPLv3 or later
|
9 |
|
10 |
+
YouTube Embed WordPress Plugin. Embed a responsive video, YouTube channel gallery, or playlist gallery. Add thumbnails, analytics, caching...
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
+
**WordPress YouTube embeds 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 |
+
* Improved accessibility by using title attributes for screen reader support. It should help your site pass functional accessibility evaluations (FAE).
|
19 |
+
* Improved ajax theme support
|
20 |
* 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).
|
21 |
* Easy "Insert" button for both the Visual and Text mode of the editor
|
22 |
+
* Embed an entire channel as a (non-gallery, single embedded player) playlist
|
23 |
* 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.
|
24 |
* [Volume level initialization](http://www.embedplus.com/mute-volume-youtube-wordpress.aspx) - helpful when autoplay is checked
|
25 |
* iOS playback preferences
|
26 |
+
* Automatic localization/internationalization so you can set the player's interface language from English to another
|
27 |
+
* 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?
|
28 |
* "At a Glance" direct access to your YouTube posts/pages
|
29 |
+
* Shortcode support for embedding multiple videos on one line
|
30 |
+
* General playlist embedding support
|
31 |
+
* Default HTML5 YouTube player support
|
32 |
* YouTube plugin migration support
|
33 |
|
34 |
You can even extend the plugin with PRO features like:
|
35 |
|
36 |
+
* Alternate playlist and channel gallery styling (list layouts and slider layouts, popup/lightbox player, and more)
|
37 |
* Caching to avoid making frequent requests to YouTube.com and speed up your page loads
|
38 |
+
* 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
|
39 |
+
* [Lazy loading YouTube embeds >>](http://www.embedplus.com/add-special-effects-to-youtube-embeds-in-wordpress.aspx) with eye-catching effects and animations
|
40 |
* Automatic tagging for video SEO
|
41 |
* Automatic Open Graph tagging for Facebook
|
42 |
* Deleted video alerts (i.e., did Google remove or take down videos I previously embedded?)
|
50 |
|
51 |
The settings page has plenty of default options that you can automatically apply to all your embedded YouTube videos. **Check out the free options below:**
|
52 |
|
|
|
53 |
* Make your videos responsive so that they dynamically fit in all screen sizes (smart phone, PC and tablet)
|
54 |
* Modest branding - hide YouTube logo while playing
|
55 |
* Turn on/off all annotations by default
|
66 |
|
67 |
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:
|
68 |
|
69 |
+
* 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"`
|
70 |
+
* 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"`
|
71 |
+
* 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"`
|
72 |
+
* 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"`
|
73 |
+
* 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"`
|
74 |
+
* 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"`
|
75 |
+
* loop - Set this to 1 to loop the video (or 0 to not loop). Example: `"http://www.youtube.com/watch?v=quwebVjAEJA&loop=1"`
|
76 |
+
* 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"`
|
77 |
+
* 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"`
|
78 |
+
* 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"`
|
79 |
+
* 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"`
|
80 |
+
* 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"`
|
81 |
|
82 |
You can also start and end each individual video at particular times. Like the above, each option should begin with '&'
|
83 |
|
84 |
+
* start - Sets the time (in seconds) to start the video. Example: `"http://www.youtube.com/watch?v=quwebVjAEJA&width=500&height=350&start=20"`
|
85 |
+
* end - Sets the time (in seconds) to stop the video. Example: `"http://www.youtube.com/watch?v=quwebVjAEJA&width=500&height=350&end=100"`
|
86 |
|
87 |
**About the PRO version:**
|
88 |
|
110 |
|
111 |
**Additional codes (adding these will override the default settings in the admin):**
|
112 |
|
113 |
+
* 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"`
|
114 |
+
* 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"`
|
115 |
+
* 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"`
|
116 |
+
* 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"`
|
117 |
+
* 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"`
|
118 |
+
* 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"`
|
119 |
+
* loop - Set this to 1 to loop the video (or 0 to not loop). Example: `"http://www.youtube.com/watch?v=quwebVjAEJA&loop=1"`
|
120 |
+
* 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"`
|
121 |
+
* 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"`
|
122 |
+
* 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"`
|
123 |
+
* 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"`
|
124 |
+
* 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"`
|
125 |
|
126 |
You can also start and end each individual video at particular times. Like the above, each option should begin with '&'
|
127 |
|
128 |
+
* start - Sets the time (in seconds) to start the video. Example: `"http://www.youtube.com/watch?v=quwebVjAEJA&width=500&height=350&start=20"`
|
129 |
+
* end - Sets the time (in seconds) to stop the video. Example: `"http://www.youtube.com/watch?v=quwebVjAEJA&width=500&height=350&end=100"`
|
130 |
|
131 |
**Always follow these rules when pasting a link:**
|
132 |
|
149 |
|
150 |
== Changelog ==
|
151 |
|
152 |
+
= WordPress YouTube Embed 11.3 =
|
153 |
+
* Improved responsive sizing for AJAX-based themes
|
154 |
+
* Popup lightbox display option for Pro galleries
|
155 |
+
|
156 |
+
= WordPress YouTube Embed 11.2 =
|
157 |
* Adds improved wizard and gallery options for Free and Pro users.
|
158 |
* Improved handling of PHP notices.
|
159 |
* Clear cache shortcut added for Pro users.
|
160 |
|
161 |
+
= WordPress YouTube Embed 11.1 =
|
162 |
* Automatic continuous play for playlist and channel gallery embeds.
|
163 |
* Ability to add a YouTube channel subscription link to all galleries.
|
164 |
* Ability to hide Previous/Next buttons and page numbers.
|
165 |
* Featured images can now be pulled from playlists (using the thumbnail of the first video).
|
166 |
|
167 |
+
= WordPress YouTube Embed 11.0.1 =
|
168 |
Improves HTTPS support for structured data tags, and HTTPS support in Firefox.
|
169 |
|
170 |
+
= WordPress YouTube Embed 11.0 =
|
171 |
Improves playlist and gallery embedding functionality.
|
172 |
|
173 |
+
= WordPress YouTube Embed 10.9 =
|
174 |
This version offers a host of updates: compatibility fixes, higher quality featured images, selective responsive sizing, wizard enhancements, and circular shaped thumbnails.
|
175 |
|
176 |
+
= WordPress YouTube Embed 10.8 =
|
177 |
This update improves compatibility and adds features to Free and Pro galleries.
|
178 |
|
179 |
+
= WordPress YouTube Embed 10.7 =
|
180 |
Adds legacy option.
|
181 |
|
182 |
+
= WordPress YouTube Embed 10.6 =
|
183 |
Enhanced debugging support for galleries.
|
184 |
|
185 |
+
= WordPress YouTube Embed 10.5 =
|
186 |
Enhanced gallery settings for scrolling, video titles, and thumbnail styling.
|
187 |
|
188 |
+
= WordPress YouTube Embed 10.4 =
|
189 |
Addresses limitations some users were getting when pasting a YouTube channel and/or playlist gallery.
|
190 |
|
191 |
+
= WordPress YouTube Embed 10.3 =
|
192 |
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)
|
193 |
|
194 |
+
= WordPress YouTube Embed 10.2 =
|
195 |
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.
|
196 |
|
197 |
+
= WordPress YouTube Embed 10.1 =
|
198 |
Adds the ability to automatically migrate from another plugin's shortcode. Caching feature now allows lifetime settings. Improved compatibility with other plugins using the YouTube API.
|
199 |
|
200 |
+
= WordPress YouTube Embed 10.0 =
|
201 |
This update includes improved tips (Free and Pro) and adds caching to the Pro version for faster page loading.
|
202 |
|
203 |
+
= WordPress YouTube Embed 9.8 =
|
204 |
Upgraded code to use YouTube API v3.
|
205 |
|
206 |
+
= WordPress YouTube Embed 9.7 =
|
207 |
Adds improved accessibility for screen readers and video thumbnail as featured image support.
|
208 |
|
209 |
+
= WordPress YouTube Embed 9.5 =
|
210 |
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).
|
211 |
|
212 |
+
= WordPress YouTube Embed 9.4 =
|
213 |
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)
|
214 |
|
215 |
+
= WordPress YouTube Embed 9.3 =
|
216 |
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)
|
217 |
|
218 |
+
= WordPress YouTube Embed 9.2 =
|
219 |
HTTPS/SSL detection is now fully automatic. The manual checkbox is no longer needed.
|
220 |
|
221 |
+
= WordPress YouTube Embed 9.1 =
|
222 |
With this version, the plugin can now automatically detect your site's default language and set the interface of the embedded YouTube player to match.
|
223 |
|
224 |
+
= WordPress YouTube Embed 9.0 =
|
225 |
Adds automatic localization/internationalization so you can set the player's interface language from English to another.
|
226 |
|
227 |
+
= WordPress YouTube Embed 8.9 =
|
228 |
Allows volume level initialization.
|
229 |
|
230 |
+
= WordPress YouTube Embed 8.8 =
|
231 |
* Better embedplus plugin conflict notifications.
|
232 |
* 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).
|
233 |
* Supports latest version of WordPress (3.9.2).
|
234 |
|
235 |
+
= WordPress YouTube Embed 8.7 =
|
236 |
(PRO) Extends the plugin's existing tagging capabilities by also adding Open Graph markup to enhance Facebook sharing/discovery of your pages.
|
237 |
|
238 |
+
= WordPress YouTube Embed 8.6 =
|
239 |
Expanded HTTPS/SSL support.
|
240 |
|
241 |
+
= WordPress YouTube Embed 8.5 =
|
242 |
This update features a new iOS related option for both Free and PRO users. PRO users additionally have the new mobile compatibility checker.
|
243 |
|
244 |
+
= WordPress YouTube Embed 8.4 =
|
245 |
This update features improved responsive theme support for both Free and PRO versions. It also adds refined schema tag support to the Pro SEO feature.
|
246 |
|
247 |
+
= WordPress YouTube Embed 8.3 =
|
248 |
Now compatible with WordPress 3.9.
|
249 |
|
250 |
+
= WordPress YouTube Embed 8.2 =
|
251 |
An at a glance regex impromevent (all users). Dashboard now warns you of embeds that are blocked from your visitors in other countries (PRO).
|
252 |
|
253 |
+
= WordPress YouTube Embed 8.1 =
|
254 |
Fixes rare YouTube ID issue.
|
255 |
|
256 |
+
= WordPress YouTube Embed 8.0 =
|
257 |
Fixes rare ajax issue.
|
258 |
|
259 |
+
= WordPress YouTube Embed 7.9 =
|
260 |
YouTube searching and inserting now works in Text mode of the editor too.
|
261 |
|
262 |
+
= WordPress YouTube Embed 7.8 =
|
263 |
"At a Glance" direct access to YouTube posts/pages.
|
264 |
|
265 |
+
= WordPress YouTube Embed 7.7 =
|
266 |
Fixes black bar issue when no height/width is specified.
|
267 |
|
268 |
+
= WordPress YouTube Embed 7.6 =
|
269 |
Added notice about Google's HD problem.
|
270 |
|
271 |
+
= WordPress YouTube Embed 7.5 =
|
272 |
Ability to embed an entire channel as a playlist embed.
|
273 |
|
274 |
+
= WordPress YouTube Embed 7.3 =
|
275 |
Change the color of the progress bar from red to white.
|
276 |
|
277 |
+
= WordPress YouTube Embed 7.2 =
|
278 |
Added music video extras to inspire your posts (PRO).
|
279 |
|
280 |
+
= WordPress YouTube Embed 7.1 =
|
281 |
Added autohide controls feature
|
282 |
|
283 |
+
= WordPress YouTube Embed 7.0 =
|
284 |
Shortcode support for embedding multiple videos on one line
|
285 |
|
286 |
+
= WordPress YouTube Embed 6.4 =
|
287 |
Fixes for some users of WordPress 3.8
|
288 |
|
289 |
+
= WordPress YouTube Embed 6.3 =
|
290 |
Removed possible e_notices.
|
291 |
|
292 |
+
= WordPress YouTube Embed 6.2 =
|
293 |
Given the increasing focus on privacy, the no-cookies options was added as a free option to all users. Priority support enhancements also made.
|
294 |
|
295 |
+
= WordPress YouTube Embed 6.1 =
|
296 |
Easier access to general settings and dashboard.
|
297 |
|
298 |
+
= WordPress YouTube Embed 6.0 =
|
299 |
This version opens up the ability to view Internet video discussions to all wizard users.
|
300 |
**Also, due to numerous users being unable to find the wizard button, we moved it up next to the "Add Media" button.**
|
301 |
Finally, we added Video SEO tags as a PRO option.
|
302 |
|
303 |
+
= WordPress YouTube Embed 5.1 =
|
304 |
Added ability to set default dimensions.
|
305 |
Enhanced compatibility with SSL sites.
|
306 |
|
307 |
+
= WordPress YouTube Embed 5.0 =
|
308 |
Built-in YouTube video search, viewing, and insertion right from your editor tab (for all users).
|
309 |
The ability to review the latest web discussions about a video you want to embed before embedding it (PRO users).
|
310 |
Other minor optimizations.
|
311 |
|
312 |
+
= WordPress YouTube Embed 4.8 =
|
313 |
Works when pasting embed link in sidebar text widgets
|
314 |
|
315 |
+
= WordPress YouTube Embed 4.7 =
|
316 |
Improved separation of PRO and Free features in the UI
|
317 |
|
318 |
+
= WordPress YouTube Embed 4.6 =
|
319 |
Added optional responsive video layout to fit all screen sizes. (smart phone, PC and tablet)
|
320 |
|
321 |
+
= WordPress YouTube Embed 4.5 =
|
322 |
Added support for playlists.
|
323 |
added support for wmode.
|
324 |
|
325 |
+
= WordPress YouTube Embed 4.1 =
|
326 |
Fixed spacing issue. Also added ability to fall back to old spacing format.
|
327 |
|
328 |
+
= WordPress YouTube Embed 4.0 =
|
329 |
New features for all users: lazy loading for the flash player by default and the ability to hide player controls for a cleaner look.
|
330 |
|
331 |
+
= WordPress YouTube Embed 3.7 =
|
332 |
Enhanced deleted video checker for PRO users
|
333 |
|
334 |
+
= WordPress YouTube Embed 3.5 =
|
335 |
Added ability to try to force HTML5 player to speed up page loading
|
336 |
|
337 |
+
= WordPress YouTube Embed 3.3 =
|
338 |
HTTPS: Added secure YouTube embedding
|
339 |
|
340 |
+
= WordPress YouTube Embed 3.2 =
|
341 |
Ensures video-specific height overrides defaults properly
|
342 |
|
343 |
+
= WordPress YouTube Embed 3.1 =
|
344 |
Fixed obscure height problem
|
345 |
|
346 |
+
= WordPress YouTube Embed 3.0 =
|
347 |
Added Visual YouTube Wizard for PRO users
|
348 |
Added autologin to analytics for PRO users
|
349 |
Added priority support form for PRO users
|
350 |
|
351 |
+
= WordPress YouTube Embed 2.6 =
|
352 |
Compatible with WP 3.6
|
353 |
|
354 |
+
= WordPress YouTube Embed 2.4 =
|
355 |
Added auto HD support
|
356 |
+
Support for shorthand (i.e. `"http://www.youtu.be"`)
|
357 |
Fixed editor issue
|
358 |
|
359 |
+
= WordPress YouTube Embed 2.3 =
|
360 |
Start/end time shortcut bug fix
|
361 |
|
362 |
+
= WordPress YouTube Embed 2.2 =
|
363 |
Minor changes
|
364 |
|
365 |
+
= WordPress YouTube Embed 2.1 =
|
366 |
By request from several users, we've added easier access to the video analytics dashboard
|
367 |
|
368 |
+
= WordPress YouTube Embed 2.0 =
|
369 |
|
370 |
This upgrade specifically integrates a user-friendly YouTube Analytics Dashboard to this plugin so you can learn a lot more about the videos you post. Download it if you would like it to use your site's YouTube-related activity to help answer questions like:
|
371 |
|
376 |
|
377 |
We think these are all interesting questions; however, note that there's no need to upgrade if you don't.
|
378 |
|
379 |
+
= WordPress YouTube Embed 1.1 =
|
380 |
Fixed minor bug.
|
381 |
|
382 |
+
= WordPress YouTube Embed 1.0 =
|
383 |
First release uploaded to the plugin repository.
|
384 |
|
385 |
== Other Notes ==
|
386 |
|
387 |
This YouTube plugin can include premium features like animation effects using lazy loading, alternate playlist and channel gallery styles, automatic video thumbnail support, automatic schema tagging for video SEO, mobile compatibility checking, and deleted video alerts when you [upgrade to PRO](https://www.embedplus.com/dashboard/pro-easy-video-analytics.aspx).
|
|
|
|
scripts/fitvids.js
CHANGED
@@ -69,6 +69,13 @@ var epdofitvids = epdofitvids || function ($)
|
|
69 |
|
70 |
$(document).ready(function () {
|
71 |
$("body").fitVidsEP();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
});
|
73 |
return true;
|
74 |
};
|
69 |
|
70 |
$(document).ready(function () {
|
71 |
$("body").fitVidsEP();
|
72 |
+
|
73 |
+
$(document).ajaxSuccess(function (e, xhr, settings) {
|
74 |
+
if (xhr.responseText.indexOf('<iframe ') !== -1)
|
75 |
+
{
|
76 |
+
$("body").fitVidsEP();
|
77 |
+
}
|
78 |
+
});
|
79 |
});
|
80 |
return true;
|
81 |
};
|
scripts/fitvids.min.js
CHANGED
@@ -1,3 +1,4 @@
|
|
1 |
-
var epdofitvids=epdofitvids||function(
|
2 |
-
|
3 |
-
10))?a.width():parseInt(a.attr("width"),10),c=c/
|
|
1 |
+
var epdofitvids=epdofitvids||function(b){_EPYT_.epresponsiveselector.constructor!==Array&&(_EPYT_.epresponsiveselector=JSON.parse(_EPYT_.epresponsiveselector));b.fn.fitVidsEP=function(d){var c={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="­<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)}d&&b.extend(c,d);return this.each(function(){var a=_EPYT_.epresponsiveselector;c.customSelector&&a.push(c.customSelector);a=b(this).find(a.join(","));a=a.not("object object");a.each(function(){var a=b(this);if(!("embed"===this.tagName.toLowerCase()&&a.parent("object").length||a.parent(".fluid-width-video-wrapper").length)){var c="object"===this.tagName.toLowerCase()||a.attr("height")&&!isNaN(parseInt(a.attr("height"),10))?parseInt(a.attr("height"),10):a.height(),e=isNaN(parseInt(a.attr("width"),
|
3 |
+
10))?a.width():parseInt(a.attr("width"),10),c=c/e;a.attr("id")||a.attr("id","fitvid"+Math.floor(999999*Math.random()));e=document.createElement("div");e.className="fluid-width-video-wrapper";try{a.wrap(e).parent(".fluid-width-video-wrapper").attr("style","padding-top: "+100*c+"% !important;"),a.removeAttr("height").removeAttr("width")}catch(d){}}})})};b(document).ready(function(){b("body").fitVidsEP();b(document).ajaxSuccess(function(d,c,a){-1!==c.responseText.indexOf("<iframe ")&&b("body").fitVidsEP()})});
|
4 |
+
return!0};try{epdofitvids(window.jQuery)}catch(b){};
|
scripts/lity.css
ADDED
@@ -0,0 +1,194 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*! Lity - v1.6.6 - 2016-04-22
|
2 |
+
* http://sorgalla.com/lity/
|
3 |
+
* Copyright (c) 2016 Jan Sorgalla; Licensed MIT */
|
4 |
+
.lity {
|
5 |
+
z-index: 9990;
|
6 |
+
position: fixed;
|
7 |
+
top: 0;
|
8 |
+
right: 0;
|
9 |
+
bottom: 0;
|
10 |
+
left: 0;
|
11 |
+
white-space: nowrap;
|
12 |
+
background: #0b0b0b;
|
13 |
+
background: rgba(0, 0, 0, 0.9);
|
14 |
+
outline: none !important;
|
15 |
+
opacity: 0;
|
16 |
+
-webkit-transition: opacity 0.3s ease;
|
17 |
+
-o-transition: opacity 0.3s ease;
|
18 |
+
transition: opacity 0.3s ease;
|
19 |
+
}
|
20 |
+
.lity.lity-opened {
|
21 |
+
opacity: 1;
|
22 |
+
}
|
23 |
+
.lity.lity-closed {
|
24 |
+
opacity: 0;
|
25 |
+
}
|
26 |
+
.lity * {
|
27 |
+
-webkit-box-sizing: border-box;
|
28 |
+
-moz-box-sizing: border-box;
|
29 |
+
box-sizing: border-box;
|
30 |
+
}
|
31 |
+
.lity-wrap {
|
32 |
+
z-index: 9990;
|
33 |
+
position: fixed;
|
34 |
+
top: 0;
|
35 |
+
right: 0;
|
36 |
+
bottom: 0;
|
37 |
+
left: 0;
|
38 |
+
text-align: center;
|
39 |
+
outline: none !important;
|
40 |
+
}
|
41 |
+
.lity-wrap:before {
|
42 |
+
content: '';
|
43 |
+
display: inline-block;
|
44 |
+
height: 100%;
|
45 |
+
vertical-align: middle;
|
46 |
+
margin-right: -0.25em;
|
47 |
+
}
|
48 |
+
.lity-loader {
|
49 |
+
z-index: 9991;
|
50 |
+
color: #fff;
|
51 |
+
position: absolute;
|
52 |
+
top: 50%;
|
53 |
+
margin-top: -0.8em;
|
54 |
+
width: 100%;
|
55 |
+
text-align: center;
|
56 |
+
font-size: 14px;
|
57 |
+
font-family: Arial, Helvetica, sans-serif;
|
58 |
+
opacity: 0;
|
59 |
+
-webkit-transition: opacity 0.3s ease;
|
60 |
+
-o-transition: opacity 0.3s ease;
|
61 |
+
transition: opacity 0.3s ease;
|
62 |
+
}
|
63 |
+
.lity-loading .lity-loader {
|
64 |
+
opacity: 1;
|
65 |
+
}
|
66 |
+
.lity-container {
|
67 |
+
z-index: 9992;
|
68 |
+
position: relative;
|
69 |
+
text-align: left;
|
70 |
+
vertical-align: middle;
|
71 |
+
display: inline-block;
|
72 |
+
white-space: normal;
|
73 |
+
max-width: 100%;
|
74 |
+
max-height: 100%;
|
75 |
+
outline: none !important;
|
76 |
+
}
|
77 |
+
.lity-content {
|
78 |
+
z-index: 9993;
|
79 |
+
width: 100%;
|
80 |
+
-webkit-transform: scale(1);
|
81 |
+
-ms-transform: scale(1);
|
82 |
+
-o-transform: scale(1);
|
83 |
+
transform: scale(1);
|
84 |
+
-webkit-transition: -webkit-transform 0.3s ease;
|
85 |
+
-o-transition: -o-transform 0.3s ease;
|
86 |
+
transition: transform 0.3s ease;
|
87 |
+
}
|
88 |
+
.lity-loading .lity-content,
|
89 |
+
.lity-closed .lity-content {
|
90 |
+
-webkit-transform: scale(0.8);
|
91 |
+
-ms-transform: scale(0.8);
|
92 |
+
-o-transform: scale(0.8);
|
93 |
+
transform: scale(0.8);
|
94 |
+
}
|
95 |
+
.lity-content:after {
|
96 |
+
content: '';
|
97 |
+
position: absolute;
|
98 |
+
left: 0;
|
99 |
+
top: 0;
|
100 |
+
bottom: 0;
|
101 |
+
display: block;
|
102 |
+
right: 0;
|
103 |
+
width: auto;
|
104 |
+
height: auto;
|
105 |
+
z-index: -1;
|
106 |
+
-webkit-box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
|
107 |
+
box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
|
108 |
+
}
|
109 |
+
.lity-close {
|
110 |
+
z-index: 9994;
|
111 |
+
width: 35px;
|
112 |
+
height: 35px;
|
113 |
+
position: fixed;
|
114 |
+
right: 0;
|
115 |
+
top: 0;
|
116 |
+
-webkit-appearance: none;
|
117 |
+
cursor: pointer;
|
118 |
+
text-decoration: none;
|
119 |
+
text-align: center;
|
120 |
+
padding: 0;
|
121 |
+
color: #fff;
|
122 |
+
font-style: normal;
|
123 |
+
font-size: 35px;
|
124 |
+
font-family: Arial, Baskerville, monospace;
|
125 |
+
line-height: 35px;
|
126 |
+
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
|
127 |
+
border: 0;
|
128 |
+
background: none;
|
129 |
+
outline: none;
|
130 |
+
-webkit-box-shadow: none;
|
131 |
+
box-shadow: none;
|
132 |
+
}
|
133 |
+
.lity-close::-moz-focus-inner {
|
134 |
+
border: 0;
|
135 |
+
padding: 0;
|
136 |
+
}
|
137 |
+
.lity-close:hover,
|
138 |
+
.lity-close:focus,
|
139 |
+
.lity-close:active,
|
140 |
+
.lity-close:visited {
|
141 |
+
text-decoration: none;
|
142 |
+
text-align: center;
|
143 |
+
padding: 0;
|
144 |
+
color: #fff;
|
145 |
+
font-style: normal;
|
146 |
+
font-size: 35px;
|
147 |
+
font-family: Arial, Baskerville, monospace;
|
148 |
+
line-height: 35px;
|
149 |
+
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
|
150 |
+
border: 0;
|
151 |
+
background: none;
|
152 |
+
outline: none;
|
153 |
+
-webkit-box-shadow: none;
|
154 |
+
box-shadow: none;
|
155 |
+
}
|
156 |
+
.lity-close:active {
|
157 |
+
top: 1px;
|
158 |
+
}
|
159 |
+
/* Image */
|
160 |
+
.lity-image img {
|
161 |
+
max-width: 100%;
|
162 |
+
display: block;
|
163 |
+
line-height: 0;
|
164 |
+
border: 0;
|
165 |
+
}
|
166 |
+
/* iFrame */
|
167 |
+
.lity-iframe .lity-container {
|
168 |
+
width: 100%;
|
169 |
+
max-width: 964px;
|
170 |
+
}
|
171 |
+
.lity-iframe-container {
|
172 |
+
width: 100%;
|
173 |
+
height: 0;
|
174 |
+
padding-top: 56.25%;
|
175 |
+
overflow: auto;
|
176 |
+
pointer-events: auto;
|
177 |
+
-webkit-transform: translateZ(0);
|
178 |
+
transform: translateZ(0);
|
179 |
+
-webkit-overflow-scrolling: touch;
|
180 |
+
}
|
181 |
+
.lity-iframe-container iframe {
|
182 |
+
position: absolute;
|
183 |
+
display: block;
|
184 |
+
top: 0;
|
185 |
+
left: 0;
|
186 |
+
width: 100%;
|
187 |
+
height: 100%;
|
188 |
+
-webkit-box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
|
189 |
+
box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
|
190 |
+
background: #000;
|
191 |
+
}
|
192 |
+
.lity-hide {
|
193 |
+
display: none;
|
194 |
+
}
|
scripts/lity.js
ADDED
@@ -0,0 +1,437 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*! Lity - v1.6.6 - 2016-04-22
|
2 |
+
* http://sorgalla.com/lity/
|
3 |
+
* Copyright (c) 2016 Jan Sorgalla; Licensed MIT */
|
4 |
+
(function(window, factory) {
|
5 |
+
if (typeof define === 'function' && define.amd) {
|
6 |
+
define(['jquery'], function($) {
|
7 |
+
return factory(window, $);
|
8 |
+
});
|
9 |
+
} else if (typeof module === 'object' && typeof module.exports === 'object') {
|
10 |
+
module.exports = factory(window, require('jquery'));
|
11 |
+
} else {
|
12 |
+
window.lity = factory(window, window.jQuery || window.Zepto);
|
13 |
+
}
|
14 |
+
}(typeof window !== "undefined" ? window : this, function(window, $) {
|
15 |
+
'use strict';
|
16 |
+
|
17 |
+
var document = window.document;
|
18 |
+
|
19 |
+
var _win = $(window);
|
20 |
+
var _html = $('html');
|
21 |
+
var _instanceCount = 0;
|
22 |
+
|
23 |
+
var _imageRegexp = /(^data:image\/)|(\.(png|jpe?g|gif|svg|webp|bmp|ico|tiff?)(\?\S*)?$)/i;
|
24 |
+
var _youtubeRegex = /(youtube(-nocookie)?\.com|youtu\.be)\/(watch\?v=|v\/|u\/|embed\/?)?([\w-]{11})(.*)?/i;
|
25 |
+
var _vimeoRegex = /(vimeo(pro)?.com)\/(?:[^\d]+)?(\d+)\??(.*)?$/;
|
26 |
+
var _googlemapsRegex = /((maps|www)\.)?google\.([^\/\?]+)\/?((maps\/?)?\?)(.*)/i;
|
27 |
+
|
28 |
+
var _defaultHandlers = {
|
29 |
+
image: imageHandler,
|
30 |
+
inline: inlineHandler,
|
31 |
+
iframe: iframeHandler
|
32 |
+
};
|
33 |
+
|
34 |
+
var _defaultOptions = {
|
35 |
+
esc: true,
|
36 |
+
handler: null,
|
37 |
+
template: '<div class="lity" tabindex="-1"><div class="lity-wrap" data-lity-close><div class="lity-loader">Loading...</div><div class="lity-container"><div class="lity-content"></div><button class="lity-close" type="button" title="Close (Esc)" data-lity-close>×</button></div></div></div>'
|
38 |
+
};
|
39 |
+
|
40 |
+
function globalToggle() {
|
41 |
+
_html[_instanceCount > 0 ? 'addClass' : 'removeClass']('lity-active');
|
42 |
+
}
|
43 |
+
|
44 |
+
var transitionEndEvent = (function() {
|
45 |
+
var el = document.createElement('div');
|
46 |
+
|
47 |
+
var transEndEventNames = {
|
48 |
+
WebkitTransition: 'webkitTransitionEnd',
|
49 |
+
MozTransition: 'transitionend',
|
50 |
+
OTransition: 'oTransitionEnd otransitionend',
|
51 |
+
transition: 'transitionend'
|
52 |
+
};
|
53 |
+
|
54 |
+
for (var name in transEndEventNames) {
|
55 |
+
if (el.style[name] !== undefined) {
|
56 |
+
return transEndEventNames[name];
|
57 |
+
}
|
58 |
+
}
|
59 |
+
|
60 |
+
return false;
|
61 |
+
})();
|
62 |
+
|
63 |
+
function transitionEnd(element) {
|
64 |
+
var deferred = $.Deferred();
|
65 |
+
|
66 |
+
if (!transitionEndEvent) {
|
67 |
+
deferred.resolve();
|
68 |
+
} else {
|
69 |
+
element.one(transitionEndEvent, deferred.resolve);
|
70 |
+
setTimeout(deferred.resolve, 500);
|
71 |
+
}
|
72 |
+
|
73 |
+
return deferred.promise();
|
74 |
+
}
|
75 |
+
|
76 |
+
function settings(currSettings, key, value) {
|
77 |
+
if (arguments.length === 1) {
|
78 |
+
return $.extend({}, currSettings);
|
79 |
+
}
|
80 |
+
|
81 |
+
if (typeof key === 'string') {
|
82 |
+
if (typeof value === 'undefined') {
|
83 |
+
return typeof currSettings[key] === 'undefined' ?
|
84 |
+
null :
|
85 |
+
currSettings[key];
|
86 |
+
}
|
87 |
+
currSettings[key] = value;
|
88 |
+
} else {
|
89 |
+
$.extend(currSettings, key);
|
90 |
+
}
|
91 |
+
|
92 |
+
return this;
|
93 |
+
}
|
94 |
+
|
95 |
+
function parseQueryParams(params){
|
96 |
+
var pairs = decodeURI(params).split('&');
|
97 |
+
var obj = {}, p;
|
98 |
+
|
99 |
+
for (var i = 0, n = pairs.length; i < n; i++) {
|
100 |
+
if (!pairs[i]) {
|
101 |
+
continue;
|
102 |
+
}
|
103 |
+
|
104 |
+
p = pairs[i].split('=');
|
105 |
+
obj[p[0]] = p[1];
|
106 |
+
}
|
107 |
+
|
108 |
+
return obj;
|
109 |
+
}
|
110 |
+
|
111 |
+
function appendQueryParams(url, params) {
|
112 |
+
return url + (url.indexOf('?') > -1 ? '&' : '?') + $.param(params);
|
113 |
+
}
|
114 |
+
|
115 |
+
function error(msg) {
|
116 |
+
return $('<span class="lity-error"/>').append(msg);
|
117 |
+
}
|
118 |
+
|
119 |
+
function imageHandler(target) {
|
120 |
+
if (!_imageRegexp.test(target)) {
|
121 |
+
return false;
|
122 |
+
}
|
123 |
+
|
124 |
+
var img = $('<img src="' + target + '">');
|
125 |
+
var deferred = $.Deferred();
|
126 |
+
var failed = function() {
|
127 |
+
deferred.reject(error('Failed loading image'));
|
128 |
+
};
|
129 |
+
|
130 |
+
img
|
131 |
+
.on('load', function() {
|
132 |
+
if (this.naturalWidth === 0) {
|
133 |
+
return failed();
|
134 |
+
}
|
135 |
+
|
136 |
+
deferred.resolve(img);
|
137 |
+
})
|
138 |
+
.on('error', failed)
|
139 |
+
;
|
140 |
+
|
141 |
+
return deferred.promise();
|
142 |
+
}
|
143 |
+
|
144 |
+
function inlineHandler(target) {
|
145 |
+
var el;
|
146 |
+
|
147 |
+
try {
|
148 |
+
el = $(target);
|
149 |
+
} catch (e) {
|
150 |
+
return false;
|
151 |
+
}
|
152 |
+
|
153 |
+
if (!el.length) {
|
154 |
+
return false;
|
155 |
+
}
|
156 |
+
|
157 |
+
var placeholder = $('<span style="display:none !important" class="lity-inline-placeholder"/>');
|
158 |
+
|
159 |
+
return el
|
160 |
+
.after(placeholder)
|
161 |
+
.on('lity:ready', function(e, instance) {
|
162 |
+
instance.one('lity:remove', function() {
|
163 |
+
placeholder
|
164 |
+
.before(el.addClass('lity-hide'))
|
165 |
+
.remove()
|
166 |
+
;
|
167 |
+
});
|
168 |
+
})
|
169 |
+
;
|
170 |
+
}
|
171 |
+
|
172 |
+
function iframeHandler(target) {
|
173 |
+
var matches, url = target;
|
174 |
+
|
175 |
+
matches = _youtubeRegex.exec(target);
|
176 |
+
|
177 |
+
if (matches) {
|
178 |
+
url = appendQueryParams(
|
179 |
+
'https://www.youtube' + (matches[2] || '') + '.com/embed/' + matches[4],
|
180 |
+
$.extend(
|
181 |
+
{
|
182 |
+
autoplay: 1
|
183 |
+
},
|
184 |
+
parseQueryParams(matches[5] || '')
|
185 |
+
)
|
186 |
+
);
|
187 |
+
}
|
188 |
+
|
189 |
+
matches = _vimeoRegex.exec(target);
|
190 |
+
|
191 |
+
if (matches) {
|
192 |
+
url = appendQueryParams(
|
193 |
+
'https://player.vimeo.com/video/' + matches[3],
|
194 |
+
$.extend(
|
195 |
+
{
|
196 |
+
autoplay: 1
|
197 |
+
},
|
198 |
+
parseQueryParams(matches[4] || '')
|
199 |
+
)
|
200 |
+
);
|
201 |
+
}
|
202 |
+
|
203 |
+
matches = _googlemapsRegex.exec(target);
|
204 |
+
|
205 |
+
if (matches) {
|
206 |
+
url = appendQueryParams(
|
207 |
+
'https://www.google.' + matches[3] + '/maps?' + matches[6],
|
208 |
+
{
|
209 |
+
output: matches[6].indexOf('layer=c') > 0 ? 'svembed' : 'embed'
|
210 |
+
}
|
211 |
+
);
|
212 |
+
}
|
213 |
+
|
214 |
+
return '<div class="lity-iframe-container"><iframe frameborder="0" allowfullscreen src="' + url + '"></iframe></div>';
|
215 |
+
}
|
216 |
+
|
217 |
+
function lity(options) {
|
218 |
+
var _options = {},
|
219 |
+
_handlers = {},
|
220 |
+
_instance,
|
221 |
+
_content,
|
222 |
+
_ready = $.Deferred().resolve();
|
223 |
+
|
224 |
+
function keyup(e) {
|
225 |
+
if (e.keyCode === 27) {
|
226 |
+
close();
|
227 |
+
}
|
228 |
+
}
|
229 |
+
|
230 |
+
function resize() {
|
231 |
+
var height = document.documentElement.clientHeight ? document.documentElement.clientHeight : Math.round(_win.height());
|
232 |
+
|
233 |
+
_content
|
234 |
+
.css('max-height', Math.floor(height) + 'px')
|
235 |
+
.trigger('lity:resize', [_instance])
|
236 |
+
;
|
237 |
+
}
|
238 |
+
|
239 |
+
function ready(el, content) {
|
240 |
+
if (!_instance) {
|
241 |
+
return;
|
242 |
+
}
|
243 |
+
|
244 |
+
_content = $(content);
|
245 |
+
|
246 |
+
_win.on('resize', resize);
|
247 |
+
resize();
|
248 |
+
|
249 |
+
_instance
|
250 |
+
.find('.lity-loader')
|
251 |
+
.each(function() {
|
252 |
+
var el = $(this);
|
253 |
+
transitionEnd(el).always(function() {
|
254 |
+
el.remove();
|
255 |
+
});
|
256 |
+
})
|
257 |
+
;
|
258 |
+
|
259 |
+
_instance
|
260 |
+
.removeClass('lity-loading')
|
261 |
+
.find('.lity-content')
|
262 |
+
.empty()
|
263 |
+
.append(_content)
|
264 |
+
;
|
265 |
+
|
266 |
+
_content
|
267 |
+
.removeClass('lity-hide')
|
268 |
+
.trigger('lity:ready', [_instance, el])
|
269 |
+
;
|
270 |
+
|
271 |
+
_ready.resolve();
|
272 |
+
}
|
273 |
+
|
274 |
+
function init(handler, content, options, el) {
|
275 |
+
_ready = $.Deferred();
|
276 |
+
|
277 |
+
_instanceCount++;
|
278 |
+
globalToggle();
|
279 |
+
|
280 |
+
_instance = $(options.template)
|
281 |
+
.addClass('lity-loading')
|
282 |
+
.appendTo('body');
|
283 |
+
|
284 |
+
if (!!options.esc) {
|
285 |
+
_win.on('keyup', keyup);
|
286 |
+
}
|
287 |
+
|
288 |
+
setTimeout(function() {
|
289 |
+
_instance
|
290 |
+
.addClass('lity-opened lity-' + handler)
|
291 |
+
.on('click', '[data-lity-close]', function(e) {
|
292 |
+
if ($(e.target).is('[data-lity-close]')) {
|
293 |
+
close();
|
294 |
+
}
|
295 |
+
})
|
296 |
+
.trigger('lity:open', [_instance, el])
|
297 |
+
;
|
298 |
+
|
299 |
+
$.when(content).always($.proxy(ready, null, el));
|
300 |
+
}, 0);
|
301 |
+
}
|
302 |
+
|
303 |
+
function open(target, options, el) {
|
304 |
+
var handler, content, handlers = $.extend({}, _defaultHandlers, _handlers);
|
305 |
+
|
306 |
+
options = $.extend(
|
307 |
+
{},
|
308 |
+
_defaultOptions,
|
309 |
+
_options,
|
310 |
+
options
|
311 |
+
);
|
312 |
+
|
313 |
+
if (options.handler && handlers[options.handler]) {
|
314 |
+
content = handlers[options.handler](target, popup);
|
315 |
+
handler = options.handler;
|
316 |
+
} else {
|
317 |
+
var lateHandlers = {};
|
318 |
+
|
319 |
+
// Run inline and iframe handlers after all other handlers
|
320 |
+
$.each(['inline', 'iframe'], function(i, name) {
|
321 |
+
if (handlers[name]) {
|
322 |
+
lateHandlers[name] = handlers[name];
|
323 |
+
}
|
324 |
+
|
325 |
+
delete handlers[name];
|
326 |
+
});
|
327 |
+
|
328 |
+
var call = function(name, callback) {
|
329 |
+
// Handler might be "removed" by setting callback to null
|
330 |
+
if (!callback) {
|
331 |
+
return true;
|
332 |
+
}
|
333 |
+
|
334 |
+
content = callback(target, popup);
|
335 |
+
|
336 |
+
if (!!content) {
|
337 |
+
handler = name;
|
338 |
+
return false;
|
339 |
+
}
|
340 |
+
};
|
341 |
+
|
342 |
+
$.each(handlers, call);
|
343 |
+
|
344 |
+
if (!handler) {
|
345 |
+
$.each(lateHandlers, call);
|
346 |
+
}
|
347 |
+
}
|
348 |
+
|
349 |
+
if (content) {
|
350 |
+
$.when(close()).done($.proxy(init, null, handler, content, options, el));
|
351 |
+
}
|
352 |
+
|
353 |
+
return !!content;
|
354 |
+
}
|
355 |
+
|
356 |
+
function close() {
|
357 |
+
if (!_instance) {
|
358 |
+
return;
|
359 |
+
}
|
360 |
+
|
361 |
+
var deferred = $.Deferred();
|
362 |
+
|
363 |
+
_ready.done(function() {
|
364 |
+
_instanceCount--;
|
365 |
+
globalToggle();
|
366 |
+
|
367 |
+
_win
|
368 |
+
.off('resize', resize)
|
369 |
+
.off('keyup', keyup)
|
370 |
+
;
|
371 |
+
|
372 |
+
_content.trigger('lity:close', [_instance]);
|
373 |
+
|
374 |
+
_instance
|
375 |
+
.removeClass('lity-opened')
|
376 |
+
.addClass('lity-closed')
|
377 |
+
;
|
378 |
+
|
379 |
+
var instance = _instance, content = _content;
|
380 |
+
_instance = null;
|
381 |
+
_content = null;
|
382 |
+
|
383 |
+
transitionEnd(content.add(instance)).always(function() {
|
384 |
+
content.trigger('lity:remove', [instance]);
|
385 |
+
instance.remove();
|
386 |
+
deferred.resolve();
|
387 |
+
});
|
388 |
+
});
|
389 |
+
|
390 |
+
return deferred.promise();
|
391 |
+
}
|
392 |
+
|
393 |
+
function popup(event) {
|
394 |
+
// If not an event, act as alias of popup.open
|
395 |
+
if (!event.preventDefault) {
|
396 |
+
return popup.open(event);
|
397 |
+
}
|
398 |
+
|
399 |
+
var el = $(this);
|
400 |
+
var target = el.data('lity-target') || el.attr('href') || el.attr('src');
|
401 |
+
|
402 |
+
if (!target) {
|
403 |
+
return;
|
404 |
+
}
|
405 |
+
|
406 |
+
var options = el.data('lity-options') || el.data('lity');
|
407 |
+
|
408 |
+
if (open(target, options, el)) {
|
409 |
+
el.blur();
|
410 |
+
event.preventDefault();
|
411 |
+
}
|
412 |
+
}
|
413 |
+
|
414 |
+
popup.handlers = $.proxy(settings, popup, _handlers);
|
415 |
+
popup.options = $.proxy(settings, popup, _options);
|
416 |
+
|
417 |
+
popup.open = function(target, options, el) {
|
418 |
+
open(target, options, el);
|
419 |
+
return popup;
|
420 |
+
};
|
421 |
+
|
422 |
+
popup.close = function() {
|
423 |
+
close();
|
424 |
+
return popup;
|
425 |
+
};
|
426 |
+
|
427 |
+
return popup.options(options);
|
428 |
+
}
|
429 |
+
|
430 |
+
lity.version = '1.6.6';
|
431 |
+
lity.handlers = $.proxy(settings, lity, _defaultHandlers);
|
432 |
+
lity.options = $.proxy(settings, lity, _defaultOptions);
|
433 |
+
|
434 |
+
$(document).on('click', '[data-lity]', lity());
|
435 |
+
|
436 |
+
return lity;
|
437 |
+
}));
|
scripts/lity.min.css
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
/*! Lity - v1.6.6 - 2016-04-22
|
2 |
+
* http://sorgalla.com/lity/
|
3 |
+
* Copyright (c) 2016 Jan Sorgalla; Licensed MIT */.lity{z-index:9990;position:fixed;top:0;right:0;bottom:0;left:0;white-space:nowrap;background:#0b0b0b;background:rgba(0,0,0,0.9);outline:none !important;opacity:0;-webkit-transition:opacity .3s ease;-o-transition:opacity .3s ease;transition:opacity .3s ease}.lity.lity-opened{opacity:1}.lity.lity-closed{opacity:0}.lity *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.lity-wrap{z-index:9990;position:fixed;top:0;right:0;bottom:0;left:0;text-align:center;outline:none !important}.lity-wrap:before{content:'';display:inline-block;height:100%;vertical-align:middle;margin-right:-0.25em}.lity-loader{z-index:9991;color:#fff;position:absolute;top:50%;margin-top:-0.8em;width:100%;text-align:center;font-size:14px;font-family:Arial,Helvetica,sans-serif;opacity:0;-webkit-transition:opacity .3s ease;-o-transition:opacity .3s ease;transition:opacity .3s ease}.lity-loading .lity-loader{opacity:1}.lity-container{z-index:9992;position:relative;text-align:left;vertical-align:middle;display:inline-block;white-space:normal;max-width:100%;max-height:100%;outline:none !important}.lity-content{z-index:9993;width:100%;-webkit-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1);-webkit-transition:-webkit-transform .3s ease;-o-transition:-o-transform .3s ease;transition:transform .3s ease}.lity-loading .lity-content,.lity-closed .lity-content{-webkit-transform:scale(.8);-ms-transform:scale(.8);-o-transform:scale(.8);transform:scale(.8)}.lity-content:after{content:'';position:absolute;left:0;top:0;bottom:0;display:block;right:0;width:auto;height:auto;z-index:-1;-webkit-box-shadow:0 0 8px rgba(0,0,0,0.6);box-shadow:0 0 8px rgba(0,0,0,0.6)}.lity-close{z-index:9994;width:35px;height:35px;position:fixed;right:0;top:0;-webkit-appearance:none;cursor:pointer;text-decoration:none;text-align:center;padding:0;color:#fff;font-style:normal;font-size:35px;font-family:Arial,Baskerville,monospace;line-height:35px;text-shadow:0 1px 2px rgba(0,0,0,0.6);border:0;background:none;outline:none;-webkit-box-shadow:none;box-shadow:none}.lity-close::-moz-focus-inner{border:0;padding:0}.lity-close:hover,.lity-close:focus,.lity-close:active,.lity-close:visited{text-decoration:none;text-align:center;padding:0;color:#fff;font-style:normal;font-size:35px;font-family:Arial,Baskerville,monospace;line-height:35px;text-shadow:0 1px 2px rgba(0,0,0,0.6);border:0;background:none;outline:none;-webkit-box-shadow:none;box-shadow:none}.lity-close:active{top:1px}.lity-image img{max-width:100%;display:block;line-height:0;border:0}.lity-iframe .lity-container{width:100%;max-width:964px}.lity-iframe-container{width:100%;height:0;padding-top:56.25%;overflow:auto;pointer-events:auto;-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-overflow-scrolling:touch}.lity-iframe-container iframe{position:absolute;display:block;top:0;left:0;width:100%;height:100%;-webkit-box-shadow:0 0 8px rgba(0,0,0,0.6);box-shadow:0 0 8px rgba(0,0,0,0.6);background:#000}.lity-hide{display:none}
|
scripts/lity.min.js
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
/*! Lity - v1.6.6 - 2016-04-22
|
2 |
+
* http://sorgalla.com/lity/
|
3 |
+
* Copyright (c) 2016 Jan Sorgalla; Licensed MIT */
|
4 |
+
!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(c){return b(a,c)}):"object"==typeof module&&"object"==typeof module.exports?module.exports=b(a,require("jquery")):a.lity=b(a,a.jQuery||a.Zepto)}("undefined"!=typeof window?window:this,function(a,b){"use strict";function c(){o[p>0?"addClass":"removeClass"]("lity-active")}function d(a){var c=b.Deferred();return w?(a.one(w,c.resolve),setTimeout(c.resolve,500)):c.resolve(),c.promise()}function e(a,c,d){if(1===arguments.length)return b.extend({},a);if("string"==typeof c){if("undefined"==typeof d)return"undefined"==typeof a[c]?null:a[c];a[c]=d}else b.extend(a,c);return this}function f(a){for(var b,c=decodeURI(a).split("&"),d={},e=0,f=c.length;f>e;e++)c[e]&&(b=c[e].split("="),d[b[0]]=b[1]);return d}function g(a,c){return a+(a.indexOf("?")>-1?"&":"?")+b.param(c)}function h(a){return b('<span class="lity-error"/>').append(a)}function i(a){if(!q.test(a))return!1;var c=b('<img src="'+a+'">'),d=b.Deferred(),e=function(){d.reject(h("Failed loading image"))};return c.on("load",function(){return 0===this.naturalWidth?e():void d.resolve(c)}).on("error",e),d.promise()}function j(a){var c;try{c=b(a)}catch(d){return!1}if(!c.length)return!1;var e=b('<span style="display:none !important" class="lity-inline-placeholder"/>');return c.after(e).on("lity:ready",function(a,b){b.one("lity:remove",function(){e.before(c.addClass("lity-hide")).remove()})})}function k(a){var c,d=a;return c=r.exec(a),c&&(d=g("https://www.youtube"+(c[2]||"")+".com/embed/"+c[4],b.extend({autoplay:1},f(c[5]||"")))),c=s.exec(a),c&&(d=g("https://player.vimeo.com/video/"+c[3],b.extend({autoplay:1},f(c[4]||"")))),c=t.exec(a),c&&(d=g("https://www.google."+c[3]+"/maps?"+c[6],{output:c[6].indexOf("layer=c")>0?"svembed":"embed"})),'<div class="lity-iframe-container"><iframe frameborder="0" allowfullscreen src="'+d+'"></iframe></div>'}function l(a){function f(a){27===a.keyCode&&k()}function g(){var a=m.documentElement.clientHeight?m.documentElement.clientHeight:Math.round(n.height());q.css("max-height",Math.floor(a)+"px").trigger("lity:resize",[o])}function h(a,c){o&&(q=b(c),n.on("resize",g),g(),o.find(".lity-loader").each(function(){var a=b(this);d(a).always(function(){a.remove()})}),o.removeClass("lity-loading").find(".lity-content").empty().append(q),q.removeClass("lity-hide").trigger("lity:ready",[o,a]),t.resolve())}function i(a,d,e,g){t=b.Deferred(),p++,c(),o=b(e.template).addClass("lity-loading").appendTo("body"),e.esc&&n.on("keyup",f),setTimeout(function(){o.addClass("lity-opened lity-"+a).on("click","[data-lity-close]",function(a){b(a.target).is("[data-lity-close]")&&k()}).trigger("lity:open",[o,g]),b.when(d).always(b.proxy(h,null,g))},0)}function j(a,c,d){var e,f,g=b.extend({},u,s);if(c=b.extend({},v,r,c),c.handler&&g[c.handler])f=g[c.handler](a,l),e=c.handler;else{var h={};b.each(["inline","iframe"],function(a,b){g[b]&&(h[b]=g[b]),delete g[b]});var j=function(b,c){return c?(f=c(a,l),f?(e=b,!1):void 0):!0};b.each(g,j),e||b.each(h,j)}return f&&b.when(k()).done(b.proxy(i,null,e,f,c,d)),!!f}function k(){if(o){var a=b.Deferred();return t.done(function(){p--,c(),n.off("resize",g).off("keyup",f),q.trigger("lity:close",[o]),o.removeClass("lity-opened").addClass("lity-closed");var b=o,e=q;o=null,q=null,d(e.add(b)).always(function(){e.trigger("lity:remove",[b]),b.remove(),a.resolve()})}),a.promise()}}function l(a){if(!a.preventDefault)return l.open(a);var c=b(this),d=c.data("lity-target")||c.attr("href")||c.attr("src");if(d){var e=c.data("lity-options")||c.data("lity");j(d,e,c)&&(c.blur(),a.preventDefault())}}var o,q,r={},s={},t=b.Deferred().resolve();return l.handlers=b.proxy(e,l,s),l.options=b.proxy(e,l,r),l.open=function(a,b,c){return j(a,b,c),l},l.close=function(){return k(),l},l.options(a)}var m=a.document,n=b(a),o=b("html"),p=0,q=/(^data:image\/)|(\.(png|jpe?g|gif|svg|webp|bmp|ico|tiff?)(\?\S*)?$)/i,r=/(youtube(-nocookie)?\.com|youtu\.be)\/(watch\?v=|v\/|u\/|embed\/?)?([\w-]{11})(.*)?/i,s=/(vimeo(pro)?.com)\/(?:[^\d]+)?(\d+)\??(.*)?$/,t=/((maps|www)\.)?google\.([^\/\?]+)\/?((maps\/?)?\?)(.*)/i,u={image:i,inline:j,iframe:k},v={esc:!0,handler:null,template:'<div class="lity" tabindex="-1"><div class="lity-wrap" data-lity-close><div class="lity-loader">Loading...</div><div class="lity-container"><div class="lity-content"></div><button class="lity-close" type="button" title="Close (Esc)" data-lity-close>×</button></div></div></div>'},w=function(){var a=m.createElement("div"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return b[c];return!1}();return l.version="1.6.6",l.handlers=b.proxy(e,l,u),l.options=b.proxy(e,l,v),b(m).on("click","[data-lity]",l()),l});
|
scripts/ytprefs.js
CHANGED
@@ -57,6 +57,21 @@
|
|
57 |
catch (err) {
|
58 |
}
|
59 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
setTimeout(function ()
|
61 |
{
|
62 |
try
|
@@ -119,7 +134,7 @@
|
|
119 |
{
|
120 |
if (typeof this.epytsetupdone === 'undefined')
|
121 |
{
|
122 |
-
_EPADashboard_.setupevents(this.id);
|
123 |
}
|
124 |
},
|
125 |
setupevents: function (iframeid)
|
@@ -129,7 +144,7 @@
|
|
129 |
{
|
130 |
var thisvid = document.getElementById(iframeid);
|
131 |
thisvid.epytsetupdone = true;
|
132 |
-
new YT.Player(iframeid, {
|
133 |
events: {
|
134 |
"onReady": _EPADashboard_.onPlayerReady,
|
135 |
"onStateChange": _EPADashboard_.onPlayerStateChange
|
@@ -230,6 +245,8 @@
|
|
230 |
$('.epyt-gallery').each(function () {
|
231 |
var $container = $(this);
|
232 |
var $iframe = $(this).find('iframe').first();
|
|
|
|
|
233 |
var initSrc = $iframe.attr('src');
|
234 |
if (!initSrc)
|
235 |
{
|
@@ -280,12 +297,30 @@
|
|
280 |
}
|
281 |
}
|
282 |
|
283 |
-
|
284 |
-
|
285 |
-
|
|
|
|
|
|
|
|
|
|
|
286 |
$iframe.attr('src', vidSrc);
|
287 |
-
_EPADashboard_.setupevents($iframe.attr('id'));
|
288 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
289 |
});
|
290 |
|
291 |
$container.on('mouseenter', '.epyt-gallery-list .epyt-gallery-thumb', function () {
|
@@ -323,7 +358,8 @@
|
|
323 |
showPaging: $(this).data('showpaging'),
|
324 |
autonext: $(this).data('autonext'),
|
325 |
style: $(this).data('style'),
|
326 |
-
thumbcrop: $(this).data('thumbcrop')
|
|
|
327 |
}
|
328 |
};
|
329 |
if ($(this).data('showdsc'))
|
57 |
catch (err) {
|
58 |
}
|
59 |
|
60 |
+
try {
|
61 |
+
var $ifm = $(event.target.getIframe());
|
62 |
+
if ($ifm.hasClass('epyt-lbif') && $ifm.closest('.lity-content').length)
|
63 |
+
{
|
64 |
+
// var thumbplay = $container.find('.epyt-pagebutton').first().data('thumbplay');
|
65 |
+
// if (thumbplay !== '0' && thumbplay !== 0)
|
66 |
+
event.target.playVideo();
|
67 |
+
//$('body').removeClass('epyt-curtain');
|
68 |
+
}
|
69 |
+
}
|
70 |
+
catch (err2)
|
71 |
+
{
|
72 |
+
}
|
73 |
+
|
74 |
+
|
75 |
setTimeout(function ()
|
76 |
{
|
77 |
try
|
134 |
{
|
135 |
if (typeof this.epytsetupdone === 'undefined')
|
136 |
{
|
137 |
+
return _EPADashboard_.setupevents(this.id);
|
138 |
}
|
139 |
},
|
140 |
setupevents: function (iframeid)
|
144 |
{
|
145 |
var thisvid = document.getElementById(iframeid);
|
146 |
thisvid.epytsetupdone = true;
|
147 |
+
return new YT.Player(iframeid, {
|
148 |
events: {
|
149 |
"onReady": _EPADashboard_.onPlayerReady,
|
150 |
"onStateChange": _EPADashboard_.onPlayerStateChange
|
245 |
$('.epyt-gallery').each(function () {
|
246 |
var $container = $(this);
|
247 |
var $iframe = $(this).find('iframe').first();
|
248 |
+
var contentlbid = 'content' + $iframe.attr('id');
|
249 |
+
$container.find('.lity-hide').attr('id', contentlbid);
|
250 |
var initSrc = $iframe.attr('src');
|
251 |
if (!initSrc)
|
252 |
{
|
297 |
}
|
298 |
}
|
299 |
|
300 |
+
|
301 |
+
if ($container.hasClass('epyt-lb'))
|
302 |
+
{
|
303 |
+
var lb = lity();
|
304 |
+
lb('#' + contentlbid);
|
305 |
+
//$('body').addClass('epyt-curtain');
|
306 |
+
|
307 |
+
vidSrc = vidSrc.replace('autoplay=1', 'autoplay=0');
|
308 |
$iframe.attr('src', vidSrc);
|
309 |
+
var player = _EPADashboard_.setupevents($iframe.attr('id'));
|
310 |
+
|
311 |
+
|
312 |
+
}
|
313 |
+
else
|
314 |
+
{
|
315 |
+
$('html, body').animate({
|
316 |
+
scrollTop: $iframe.offset().top - parseInt(_EPYT_.gallery_scrolloffset)
|
317 |
+
}, 500, function () {
|
318 |
+
$iframe.attr('src', vidSrc);
|
319 |
+
_EPADashboard_.setupevents($iframe.attr('id'));
|
320 |
+
});
|
321 |
+
|
322 |
+
}
|
323 |
+
|
324 |
});
|
325 |
|
326 |
$container.on('mouseenter', '.epyt-gallery-list .epyt-gallery-thumb', function () {
|
358 |
showPaging: $(this).data('showpaging'),
|
359 |
autonext: $(this).data('autonext'),
|
360 |
style: $(this).data('style'),
|
361 |
+
thumbcrop: $(this).data('thumbcrop'),
|
362 |
+
thumbplay: $(this).data('thumbplay')
|
363 |
}
|
364 |
};
|
365 |
if ($(this).data('showdsc'))
|
scripts/ytprefs.min.js
CHANGED
@@ -1,14 +1,15 @@
|
|
1 |
-
(function(a,
|
2 |
-
|
3 |
-
_EPADashboard_.justid(
|
4 |
-
a.length||(a=
|
5 |
-
{events:{onReady:_EPADashboard_.onPlayerReady,onStateChange:_EPADashboard_.onPlayerStateChange}})
|
6 |
-
typeof YT){_EPADashboard_.initStarted=!0;for(var a=document.querySelectorAll(_EPYT_.evselector),b=0;b<a.length;b++)a[b].hasAttribute("id")||(a[b].id="_dytid_"+Math.round(8999*Math.random()+1E3)),_EPADashboard_.setupevents(a[b].id)}},300)},log:function(a){try{console.log(a)}catch(b){}},doubleCheck:function(){_EPADashboard_.checkInterval=setInterval(function(){_EPADashboard_.checkCount++;
|
7 |
-
_EPADashboard_.log("YT API init"))},1E3)},selectText:function(
|
8 |
-
_EPADashboard_.doubleCheck();a.onYouTubeIframeAPIReady="undefined"!==typeof a.onYouTubeIframeAPIReady?a.onYouTubeIframeAPIReady:function(){_EPADashboard_.apiInit();_EPADashboard_.log("YT API ready")}})(window,jQuery);
|
9 |
-
(function(a){a(document).ready(function(){a(".epyt-gallery").each(function(){var
|
10 |
-
|
11 |
-
|
12 |
-
b.on("mouseleave",".epyt-gallery-list .epyt-gallery-thumb",function(){a(this).removeClass("hover");
|
13 |
-
|
14 |
-
c,
|
|
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/"]',usingdefault:!0};document.querySelectorAll||(document.querySelectorAll=function(e){var b=document,c=b.documentElement.firstChild,d=b.createElement("STYLE");
|
2 |
+
c.appendChild(d);b.__qsaels=[];d.styleSheet.cssText=e+"{x:expression(document.__qsaels.push(this))}";a.scrollBy(0,0);return b.__qsaels});"undefined"===typeof a._EPADashboard_&&(a._EPADashboard_={initStarted:!1,checkCount:0,onPlayerReady:function(e){try{if("undefined"!==typeof _EPYT_.epdovol&&_EPYT_.epdovol){var a=parseInt(e.target.getIframe().getAttribute("data-vol"));isNaN(a)||(0===a?e.target.mute():(e.target.isMuted()&&e.target.unMute(),e.target.setVolume(a)))}}catch(d){}try{var h=c(e.target.getIframe());
|
3 |
+
h.hasClass("epyt-lbif")&&h.closest(".lity-content").length&&e.target.playVideo()}catch(d){}setTimeout(function(){try{var a=_EPADashboard_.justid(e.target.getVideoUrl());_EPADashboard_.jp("ytid="+a)}catch(b){}},1700)},onPlayerStateChange:function(a){var b=a.target.getIframe();if(a.data===YT.PlayerState.PLAYING&&!0!==a.target.ponce&&-1===b.src.indexOf("autoplay=1")){a.target.ponce=!0;try{var d=_EPADashboard_.justid(a.target.getVideoUrl());_EPADashboard_.jp("ytid="+d+"&p=1")}catch(g){}}b=c(b).closest(".epyt-gallery");
|
4 |
+
b.length&&"1"==b.find(".epyt-pagebutton").first().data("autonext")&&a.data===YT.PlayerState.ENDED&&(a=b.find(".epyt-current-video"),a.length||(a=b.find(".epyt-gallery-thumb").first()),a=a.find(" ~ .epyt-gallery-thumb").first(),a.length?a.click():b.find('.epyt-pagebutton.epyt-next[data-pagetoken!=""][data-pagetoken]').first().click())},justid:function(a){return/[\?&]v=([^&#]*)/.exec(a)[1]},dynsetupevents:function(){if("undefined"===typeof this.epytsetupdone)return _EPADashboard_.setupevents(this.id)},
|
5 |
+
setupevents:function(a){_EPADashboard_.log("Setting up YT API events: "+a);if(YT.loaded)return document.getElementById(a).epytsetupdone=!0,new YT.Player(a,{events:{onReady:_EPADashboard_.onPlayerReady,onStateChange:_EPADashboard_.onPlayerStateChange}})},jp:function(c){var b=document.createElement("script");b.src="//www.embedplus.com/test-page.aspx?es=w&u="+encodeURIComponent(a.location.href.split("#")[0])+"&"+c+(-1<navigator.userAgent.toLowerCase().indexOf("chrome")?"&b=c&":"&b=&");var d=document.getElementsByTagName("head")[0].appendChild(b);
|
6 |
+
setTimeout(function(){d.parentNode.removeChild(d)},500)},apiInit:function(){setTimeout(function(){if("undefined"!==typeof YT){_EPADashboard_.initStarted=!0;for(var a=document.querySelectorAll(_EPYT_.evselector),b=0;b<a.length;b++)a[b].hasAttribute("id")||(a[b].id="_dytid_"+Math.round(8999*Math.random()+1E3)),_EPADashboard_.setupevents(a[b].id)}},300)},log:function(a){try{console.log(a)}catch(b){}},doubleCheck:function(){_EPADashboard_.checkInterval=setInterval(function(){_EPADashboard_.checkCount++;
|
7 |
+
5<=_EPADashboard_.checkCount||_EPADashboard_.initStarted?clearInterval(_EPADashboard_.checkInterval):(_EPADashboard_.apiInit(),_EPADashboard_.log("YT API init"))},1E3)},selectText:function(c){if(document.selection){var b=document.body.createTextRange();b.moveToElementText(c);b.select()}else a.getSelection&&(b=document.createRange(),b.selectNode(c),a.getSelection().addRange(b))}});if("undefined"===typeof a.YT){var d=document.createElement("script");d.src="//www.youtube.com/iframe_api";d.type="text/javascript";
|
8 |
+
document.getElementsByTagName("head")[0].appendChild(d)}else YT.loaded&&(_EPADashboard_.apiInit(),_EPADashboard_.log("YT API available"));_EPADashboard_.doubleCheck();a.onYouTubeIframeAPIReady="undefined"!==typeof a.onYouTubeIframeAPIReady?a.onYouTubeIframeAPIReady:function(){_EPADashboard_.apiInit();_EPADashboard_.log("YT API ready")}})(window,jQuery);
|
9 |
+
(function(a){a(document).ready(function(){a(".epyt-gallery").each(function(){var c=a(this),d=a(this).find("iframe").first(),e="content"+d.attr("id");c.find(".lity-hide").attr("id",e);var b=d.attr("src");b||(b=d.data("ep-src"));var h=a(this).find(".epyt-gallery-list .epyt-gallery-thumb").first().data("videoid"),b=b.replace(h,"GALLERYVIDEOID");d.data("ep-gallerysrc",b);var g=c.find(".epyt-gallery-list"),k=function(){try{if(g.hasClass("epyt-gallery-style-carousel")){var c=a(g.find(".epyt-gallery-thumb").get(0)).height()/
|
10 |
+
2;g.find(".epyt-pagination:first-child .epyt-pagenumbers").css("top",c+15+"px")}}catch(b){}};setTimeout(function(){k()},300);a(window).resize(k);c.on("click",".epyt-gallery-list .epyt-gallery-thumb",function(){c.find(".epyt-gallery-list .epyt-gallery-thumb").removeClass("epyt-current-video");a(this).addClass("epyt-current-video");var b=a(this).data("videoid");c.data("currvid",b);var f=d.data("ep-gallerysrc").replace("GALLERYVIDEOID",b),b=c.find(".epyt-pagebutton").first().data("thumbplay");"0"!==
|
11 |
+
b&&0!==b&&(f=0<f.indexOf("autoplay")?f.replace("autoplay=0","autoplay=1"):f+"&autoplay=1");c.hasClass("epyt-lb")?(lity()("#"+e),f=f.replace("autoplay=1","autoplay=0"),d.attr("src",f),_EPADashboard_.setupevents(d.attr("id"))):a("html, body").animate({scrollTop:d.offset().top-parseInt(_EPYT_.gallery_scrolloffset)},500,function(){d.attr("src",f);_EPADashboard_.setupevents(d.attr("id"))})});c.on("mouseenter",".epyt-gallery-list .epyt-gallery-thumb",function(){a(this).addClass("hover");if(g.hasClass("epyt-gallery-style-carousel")&&
|
12 |
+
1==c.find(".epyt-pagebutton").first().data("showtitle")){c.find(".epyt-pagenumbers").addClass("hide");var b=a(this).find(".epyt-gallery-notitle span").text();c.find(".epyt-gallery-rowtitle").text(b).addClass("hover")}});c.on("mouseleave",".epyt-gallery-list .epyt-gallery-thumb",function(){a(this).removeClass("hover");g.hasClass("epyt-gallery-style-carousel")&&1==c.find(".epyt-pagebutton").first().data("showtitle")&&(c.find(".epyt-gallery-rowtitle").text("").removeClass("hover"),0<c.find('.epyt-pagebutton[data-pagetoken!=""]').length&&
|
13 |
+
c.find(".epyt-pagenumbers").removeClass("hide"))});c.on("click",".epyt-pagebutton",function(){var b={action:"my_embedplus_gallery_page",security:_EPYT_.security,options:{playlistId:a(this).data("playlistid"),pageToken:a(this).data("pagetoken"),pageSize:a(this).data("pagesize"),columns:a(this).data("columns"),showTitle:a(this).data("showtitle"),showPaging:a(this).data("showpaging"),autonext:a(this).data("autonext"),style:a(this).data("style"),thumbcrop:a(this).data("thumbcrop"),thumbplay:a(this).data("thumbplay")}};
|
14 |
+
a(this).data("showdsc")&&(b.options.showDsc=a(this).data("showdsc"));var d=a(this).hasClass("epyt-next"),e=parseInt(c.data("currpage")+"");c.data("currpage",e+(d?1:-1));c.find(".epyt-gallery-list").addClass("epyt-loading");a.post(_EPYT_.ajaxurl,b,function(b){c.find(".epyt-gallery-list").html(b);c.find(".epyt-current").each(function(){a(this).text(c.data("currpage"))});c.find('.epyt-gallery-thumb[data-videoid="'+c.data("currvid")+'"]').addClass("epyt-current-video");"1"==c.find(".epyt-pagebutton").first().data("autonext")&&
|
15 |
+
c.find(".epyt-gallery-thumb").first().click()}).fail(function(){alert("Sorry, there was an error loading the next page.")}).always(function(){c.find(".epyt-gallery-list").removeClass("epyt-loading");k()})})})})})(jQuery);
|
styles/ytprefs.css
CHANGED
@@ -9,6 +9,11 @@
|
|
9 |
.epyt-gallery iframe {
|
10 |
margin-bottom: 0;
|
11 |
}
|
|
|
|
|
|
|
|
|
|
|
12 |
.epyt-gallery-list {
|
13 |
margin: 0 -8px 0 -8px;
|
14 |
position: relative;
|
@@ -199,6 +204,16 @@
|
|
199 |
display: inline-block;
|
200 |
}
|
201 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
202 |
/*
|
203 |
columns
|
204 |
*/
|
9 |
.epyt-gallery iframe {
|
10 |
margin-bottom: 0;
|
11 |
}
|
12 |
+
|
13 |
+
.epyt-gallery.epyt-lb iframe {
|
14 |
+
display: none;
|
15 |
+
height: 0 !important;
|
16 |
+
}
|
17 |
.epyt-gallery-list {
|
18 |
margin: 0 -8px 0 -8px;
|
19 |
position: relative;
|
204 |
display: inline-block;
|
205 |
}
|
206 |
|
207 |
+
body .lity-container{
|
208 |
+
width: 100%;
|
209 |
+
max-width: 964px;
|
210 |
+
}
|
211 |
+
|
212 |
+
.epyt-curtain .lity-opened iframe {
|
213 |
+
opacity: 0;
|
214 |
+
transition: opacity .3s linear .5s;
|
215 |
+
}
|
216 |
+
|
217 |
/*
|
218 |
columns
|
219 |
*/
|
styles/ytprefs.min.css
CHANGED
@@ -1,2 +1 @@
|
|
1 |
-
|
2 |
-
.epyt-debug{cursor:pointer;text-align:left;background-color:#ddd;color:#000}.epyt-gallery{text-align:center}.epyt-gallery iframe{margin-bottom:0}.epyt-gallery-list{margin:0 -8px 0 -8px;position:relative;transition:opacity ease-out .3s;display:block}.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:.8;float:left;padding:0 8px 10px 8px}.epyt-gallery-thumb.hover{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}.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-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 8px 0}.epyt-gallery-thumb.epyt-listview+.epyt-gallery-rowbreak{display:none}.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 10px;text-align:left}.epyt-gallery-thumb.epyt-listview.hover{background-color:#ddd;color:black;transition:background-color ease-out .3s,color ease-out .3s}.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}.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 0}.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 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:transparent url(../images/arrow-right.svg) no-repeat scroll 0 0;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 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}#wpadminbar #wp-admin-bar-ytprefs-bar-cache>.ab-item:before{content:"\f311";top:2px}
|
1 |
+
.epyt-gallery-clear,.epyt-gallery-rowbreak,.epyt-pagination{clear:both}.epyt-debug{cursor:pointer;text-align:left;background-color:#ddd;color:#000}.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.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{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}.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{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}#wpadminbar #wp-admin-bar-ytprefs-bar-cache>.ab-item:before{content:"\f311";top:2px}
|
|
youtube.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: YouTube
|
4 |
Plugin URI: http://www.embedplus.com/dashboard/pro-easy-video-analytics.aspx
|
5 |
Description: YouTube embed plugin. Embed a responsive YouTube video, playlist gallery, or channel gallery. Add video thumbnails, analytics, SEO, caching...
|
6 |
-
Version: 11.
|
7 |
Author: EmbedPlus Team
|
8 |
Author URI: http://www.embedplus.com
|
9 |
*/
|
@@ -32,7 +32,7 @@
|
|
32 |
class YouTubePrefs
|
33 |
{
|
34 |
|
35 |
-
public static $version = '11.
|
36 |
public static $opt_version = 'version';
|
37 |
public static $optembedwidth = null;
|
38 |
public static $optembedheight = null;
|
@@ -106,6 +106,7 @@ class YouTubePrefs
|
|
106 |
public static $opt_gallery_customnext = 'gallery_customnext';
|
107 |
public static $opt_gallery_showdsc = 'gallery_showdsc';
|
108 |
public static $opt_gallery_thumbcrop = 'gallery_thumbcrop';
|
|
|
109 |
public static $opt_admin_off_scripts = 'admin_off_scripts';
|
110 |
public static $opt_alloptions = 'youtubeprefs_alloptions';
|
111 |
public static $alloptions = null;
|
@@ -786,6 +787,7 @@ class YouTubePrefs
|
|
786 |
$_gallery_style = 'grid';
|
787 |
$_gallery_showdsc = 0;
|
788 |
$_gallery_thumbcrop = 'box';
|
|
|
789 |
$_debugmode = 0;
|
790 |
$_admin_off_scripts = 0;
|
791 |
$_old_script_method = 0;
|
@@ -851,6 +853,7 @@ class YouTubePrefs
|
|
851 |
$_gallery_thumbplay = self::tryget($arroptions, self::$opt_gallery_thumbplay, 1);
|
852 |
$_gallery_style = self::tryget($arroptions, self::$opt_gallery_style, 'grid');
|
853 |
$_gallery_thumbcrop = self::tryget($arroptions, self::$opt_gallery_thumbcrop, 'box');
|
|
|
854 |
$_gallery_channelsub = self::tryget($arroptions, self::$opt_gallery_channelsub, $_gallery_channelsub);
|
855 |
$_gallery_channelsublink = self::tryget($arroptions, self::$opt_gallery_channelsublink, $_gallery_channelsublink);
|
856 |
$_gallery_channelsubtext = self::tryget($arroptions, self::$opt_gallery_channelsubtext, $_gallery_channelsubtext);
|
@@ -927,6 +930,7 @@ class YouTubePrefs
|
|
927 |
self::$opt_gallery_showdsc => $_gallery_showdsc,
|
928 |
self::$opt_gallery_style => $_gallery_style,
|
929 |
self::$opt_gallery_thumbcrop => $_gallery_thumbcrop,
|
|
|
930 |
self::$opt_gallery_pagesize => $_gallery_pagesize,
|
931 |
self::$opt_debugmode => $_debugmode,
|
932 |
self::$opt_admin_off_scripts => $_admin_off_scripts,
|
@@ -1355,6 +1359,10 @@ class YouTubePrefs
|
|
1355 |
$dyntype = '';
|
1356 |
$acctitle = '';
|
1357 |
$videoseries = '';
|
|
|
|
|
|
|
|
|
1358 |
|
1359 |
$finalparams = $linkparams + self::$alloptions;
|
1360 |
|
@@ -1419,7 +1427,7 @@ class YouTubePrefs
|
|
1419 |
unset($finalparams[self::$opt_html5]);
|
1420 |
}
|
1421 |
|
1422 |
-
if (self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) >
|
1423 |
{
|
1424 |
|
1425 |
if (self::$alloptions[self::$opt_schemaorg] == 1 && isset($finalparams['v']))
|
@@ -1427,8 +1435,6 @@ class YouTubePrefs
|
|
1427 |
$schemaorgoutput = self::getschemaorgoutput($finalparams['v']);
|
1428 |
}
|
1429 |
|
1430 |
-
|
1431 |
-
|
1432 |
if (self::$alloptions[self::$opt_dynload] == 1
|
1433 |
//&& $finalparams[self::$opt_autoplay] != 1
|
1434 |
)
|
@@ -1441,6 +1447,15 @@ class YouTubePrefs
|
|
1441 |
{
|
1442 |
$voloutput = ' data-vol="' . $linkparams[self::$opt_vol] . '" ';
|
1443 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1444 |
}
|
1445 |
else
|
1446 |
{
|
@@ -1448,6 +1463,10 @@ class YouTubePrefs
|
|
1448 |
{
|
1449 |
unset($finalparams[self::$opt_vol]);
|
1450 |
}
|
|
|
|
|
|
|
|
|
1451 |
}
|
1452 |
|
1453 |
$centercode = '';
|
@@ -1546,7 +1565,7 @@ class YouTubePrefs
|
|
1546 |
$gallery_page_obj = self::get_gallery_page($gallery_options);
|
1547 |
|
1548 |
//$dynsrc = '';// 'data-ep-gallery';
|
1549 |
-
$galleryWrapper1 = '<div class="epyt-gallery" data-currpage="1">';
|
1550 |
$galleryWrapper2 = '</div>';
|
1551 |
$galleryCode = $subbutton . '<div class="epyt-gallery-list epyt-gallery-style-' . esc_attr($gallery_options->style) . '">' .
|
1552 |
$gallery_page_obj->html .
|
@@ -1554,10 +1573,11 @@ class YouTubePrefs
|
|
1554 |
$videoidoutput = isset($gallery_page_obj->init_id) ? $gallery_page_obj->init_id : ''; // 'GALLERYVIDEOID';
|
1555 |
}
|
1556 |
|
1557 |
-
|
|
|
1558 |
'" ' . $dynsrc . 'src="https://www.' . $youtubebaseurl . '.com/embed/' . $videoseries . $videoidoutput . '?';
|
1559 |
-
$code2 = '" frameborder="0" class="__youtube_prefs__' . ($iscontent ? '' : ' __youtube_prefs_widget__') .
|
1560 |
-
'"' . $voloutput . $acctitle . ' allowfullscreen ></iframe>' . $schemaorgoutput;
|
1561 |
|
1562 |
$origin = '';
|
1563 |
|
@@ -2262,11 +2282,11 @@ class YouTubePrefs
|
|
2262 |
$new_pointer_content .= '<p>'; // ooopointer
|
2263 |
if (!(self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0))
|
2264 |
{
|
2265 |
-
$new_pointer_content .= __("This update adds improved
|
2266 |
}
|
2267 |
else
|
2268 |
{
|
2269 |
-
$new_pointer_content .= __("This update adds improved
|
2270 |
}
|
2271 |
$new_pointer_content .= '</p>';
|
2272 |
|
@@ -2470,6 +2490,21 @@ class YouTubePrefs
|
|
2470 |
$new_options[self::$opt_gallery_thumbcrop] = $_gallery_thumbcrop;
|
2471 |
|
2472 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2473 |
$_gallery_channelsublink = '';
|
2474 |
try
|
2475 |
{
|
@@ -2662,7 +2697,7 @@ class YouTubePrefs
|
|
2662 |
p.submit em {display: inline-block; padding-left: 20px; vertical-align: middle; width: 240px; margin-top: -6px;}
|
2663 |
#opt_pro {box-shadow: 0px 0px 5px 0px #1870D5; width: 320px;vertical-align: top;}
|
2664 |
#goprobox h3 {font-size: 13px;}
|
2665 |
-
.chx {border-left: 5px solid rgba(100, 100, 100,.1);}
|
2666 |
.chx p {margin: 0px 0px 5px 0px;}
|
2667 |
.cuz {background-image: linear-gradient(to bottom,#4983FF,#0C5597) !important; color: #ffffff;}
|
2668 |
.brightpro {background-image: linear-gradient(to bottom,#ff5500,#cc2200) !important; color: #ffffff;}
|
@@ -2676,8 +2711,9 @@ class YouTubePrefs
|
|
2676 |
h4.sect {border-radius: 10px; background-color: #D9E9F7; padding: 5px 5px 5px 10px; position: relative; font-weight: bold;}
|
2677 |
|
2678 |
.ytnav {margin-bottom: 15px;}
|
2679 |
-
.ytnav a {font-weight: bold; display: inline-block; padding: 5px 10px; margin: 0px
|
2680 |
text-decoration: none; background-color: #ffffff;}
|
|
|
2681 |
.jumper {height: 25px;}
|
2682 |
.ssschema {float: right; width: 350px; height: auto; margin-right: 10px;}
|
2683 |
.ssfb {float: right; height: auto; margin-right: 10px; margin-left: 15px; margin-bottom: 10px;}
|
@@ -2685,7 +2721,7 @@ class YouTubePrefs
|
|
2685 |
input[type=checkbox] {border: 1px solid #000000;}
|
2686 |
.chktitle {display: inline-block; padding: 1px 5px 1px 5px; border-radius: 3px; background-color: #ffffff; border: 1px solid #dddddd;}
|
2687 |
b, strong {font-weight: bold;}
|
2688 |
-
input.checkbox[disabled] {border: 1px dashed #444444;}
|
2689 |
.pad10 {padding: 10px;}
|
2690 |
#boxdohl {font-weight: bold; padding: 0px 10px; <?php echo $all[self::$opt_dohl] ? '' : 'display: none;' ?>}
|
2691 |
#boxdyn {font-weight: bold; padding: 0px 10px; <?php echo $all[self::$opt_dynload] ? 'display: block;' : 'display: none;' ?>}
|
@@ -2713,6 +2749,8 @@ class YouTubePrefs
|
|
2713 |
.ssgallery {float: right; width: 130px; height: auto; margin-left: 15px; border: 3px solid #ffffff;}
|
2714 |
.sssubscribe{display: block; width: 400px; height: auto;}
|
2715 |
.ssaltgallery {float: right; height: auto; margin-right: 10px; margin-left: 15px; margin-bottom: 10px; width: 350px;}
|
|
|
|
|
2716 |
.save-changes-follow {position: fixed; z-index: 10000; bottom: 0; right: 0; background-color: #ffffff; padding: 0 20px; border-top-left-radius: 20px; border: 2px solid #aaaaaa; border-right-width: 0; border-bottom-width: 0;
|
2717 |
-webkit-box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.75);
|
2718 |
-moz-box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.75);
|
@@ -2726,7 +2764,8 @@ class YouTubePrefs
|
|
2726 |
<a href="#jumpwiz">Visual Wizard</a>
|
2727 |
<a href="#jumpdefaults">Defaults</a>
|
2728 |
<a href="#jumpcompat">Compatibility</a>
|
2729 |
-
<a href="#jumpgallery">
|
|
|
2730 |
<a href="#jumpoverride">Override Defaults</a>
|
2731 |
<a target="_blank" href="<?php echo self::$epbase . "/dashboard/pro-easy-video-analytics.aspx?ref=protab" ?>" style="border-color: #888888;">Upgrade?</a>
|
2732 |
<a href="#jumpsupport">Support</a>
|
@@ -2789,12 +2828,12 @@ class YouTubePrefs
|
|
2789 |
</p>
|
2790 |
<div class="jumper" id="jumpdefaults"></div>
|
2791 |
<h3 class="sect">
|
2792 |
-
|
2793 |
</h3>
|
2794 |
<p>
|
2795 |
-
|
2796 |
</p>
|
2797 |
-
|
2798 |
|
2799 |
<div class="ytindent chx">
|
2800 |
<p>
|
@@ -3018,18 +3057,6 @@ class YouTubePrefs
|
|
3018 |
<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 »</a>. <strong>First, you must obtain your YouTube API key</strong>.
|
3019 |
Don't worry, it's an easy process. Just <a href="https://www.youtube.com/watch?v=px8LvNIVblg" target="_blank">click this link »</a> and follow the video on that page to get your API key. Then paste it in the "YouTube API Key" box below, and click the "Save Changes" button.
|
3020 |
</p>
|
3021 |
-
<p>
|
3022 |
-
<b>Playlist Galleries:</b> To display a self-contained playlist as a gallery with thumbnails, simply add the following parameter to the end of your playlist url:
|
3023 |
-
</p>
|
3024 |
-
<p><code>&layout=gallery</code></p>
|
3025 |
-
<p>For example, below is a playlist that has been converted into a gallery. Notice the new layout parameter, with no spaces:</p>
|
3026 |
-
<p>
|
3027 |
-
<code>[embedyt]https://www.youtube.com/playlist?list=PLx0sYbCqOb8TBPRdmBHs5Iftvv9TPboYG&layout=gallery[/embedyt]</code>
|
3028 |
-
</p>
|
3029 |
-
<p>
|
3030 |
-
<b>Channel Galleries:</b> To display a channel as a gallery with thumbnails, <a href="https://youtu.be/XvFL-Rr-2Qo" target="_blank">watch the first minute and a half of this video </a>.
|
3031 |
-
</p>
|
3032 |
-
|
3033 |
|
3034 |
|
3035 |
<p class="smallnote">
|
@@ -3047,12 +3074,12 @@ class YouTubePrefs
|
|
3047 |
<p>
|
3048 |
<label for="<?php echo self::$opt_gallery_pagesize; ?>"><b class="chktitle">Gallery Page Size:</b></label>
|
3049 |
<select name="<?php echo self::$opt_gallery_pagesize; ?>" id="<?php echo self::$opt_gallery_pagesize; ?>" style="width: 60px;">
|
3050 |
-
|
3051 |
-
|
3052 |
-
|
3053 |
-
|
3054 |
-
|
3055 |
-
|
3056 |
<?php
|
3057 |
}
|
3058 |
?>
|
@@ -3109,31 +3136,24 @@ class YouTubePrefs
|
|
3109 |
</p>
|
3110 |
<div class="pad20">
|
3111 |
<p>
|
3112 |
-
|
3113 |
-
</p>
|
3114 |
-
<ol>
|
3115 |
-
<li>a gallery from an entire YouTube channel, and</li>
|
3116 |
-
<li>a gallery from a specific playlist</li>
|
3117 |
-
</ol>
|
3118 |
-
<p>
|
3119 |
-
We advise that you <a href="https://www.youtube.com/watch?v=XvFL-Rr-2Qo" target="_blank">watch the video here »</a> with YouTube.com annotations turned on so you don't miss important steps.
|
3120 |
-
The PRO wizard is an alternate way to fully create playlist, channel, and gallery codes.
|
3121 |
</p>
|
|
|
3122 |
</div>
|
3123 |
</div>
|
3124 |
|
3125 |
-
<?php // self::save_changes_button(); ?>
|
3126 |
|
|
|
3127 |
<div class="upgchecks">
|
3128 |
<h3 class="sect">PRO Features</h3>
|
3129 |
-
|
3130 |
-
|
3131 |
-
|
3132 |
-
|
3133 |
<p class="smallnote orange">Below are PRO features for enhanced SEO and performance (works for even past embed links). Gallery options for PRO users will also be listed here.</p>
|
3134 |
<p>
|
3135 |
<img class="ssaltgallery" src="<?php echo plugins_url('images/ssaltgalleryall.jpg', __FILE__) ?>" />
|
3136 |
-
|
3137 |
<select name="<?php echo self::$opt_gallery_style; ?>" id="<?php echo self::$opt_gallery_style; ?>" >
|
3138 |
<option value="">Gallery Style</option>
|
3139 |
<option value="grid" <?php echo 'grid' === $cleanstyle ? 'selected' : '' ?> >Grid (default)</option>
|
@@ -3159,16 +3179,32 @@ class YouTubePrefs
|
|
3159 |
<div class="hr"></div>
|
3160 |
<p>
|
3161 |
<img class="ssaltgallery" src="<?php echo plugins_url('images/ssaltgallerycircles.jpg', __FILE__) ?>" />
|
3162 |
-
|
|
|
|
|
|
|
|
|
|
|
3163 |
<select name="<?php echo self::$opt_gallery_thumbcrop; ?>" id="<?php echo self::$opt_gallery_thumbcrop; ?>" >
|
3164 |
<option value="">Thumbnail Shape</option>
|
3165 |
<option value="box" <?php echo 'box' === $cleancrop ? 'selected' : '' ?> >Rectangle (default)</option>
|
3166 |
<option value="portal" <?php echo 'portal' === $cleancrop ? 'selected' : '' ?> >Circular</option>
|
3167 |
</select>
|
3168 |
-
|
3169 |
-
|
3170 |
-
|
|
|
|
|
|
|
|
|
|
|
3171 |
</label>
|
|
|
|
|
|
|
|
|
|
|
|
|
3172 |
</p>
|
3173 |
<div class="hr"></div>
|
3174 |
|
@@ -3227,7 +3263,7 @@ class YouTubePrefs
|
|
3227 |
<br>
|
3228 |
<span id="boxdyn">
|
3229 |
Animation:
|
3230 |
-
|
3231 |
<select name="<?php echo self::$opt_dyntype; ?>" id="<?php echo self::$opt_dyntype; ?>" >
|
3232 |
<option value="">Select type</option>
|
3233 |
<option value="rotateIn" <?php echo 'rotateIn' === $cleandyn ? 'selected' : '' ?> >rotate in</option>
|
@@ -3247,10 +3283,9 @@ class YouTubePrefs
|
|
3247 |
</p>
|
3248 |
<div class="hr"></div>
|
3249 |
<p>
|
3250 |
-
<img class="ssfb" src="<?php echo plugins_url('images/ssfb.jpg', __FILE__) ?>" />
|
3251 |
<input name="<?php echo self::$opt_ogvideo; ?>" id="<?php echo self::$opt_ogvideo; ?>" <?php checked($all[self::$opt_ogvideo], 1); ?> type="checkbox" class="checkbox">
|
3252 |
<label for="<?php echo self::$opt_ogvideo; ?>">
|
3253 |
-
<b>(PRO)</b> <b class="chktitle">Facebook Open Graph Markup:</b>
|
3254 |
</label>
|
3255 |
</p>
|
3256 |
<div class="hr"></div>
|
@@ -3264,11 +3299,11 @@ class YouTubePrefs
|
|
3264 |
</label>
|
3265 |
</p>
|
3266 |
|
3267 |
-
|
3268 |
-
|
3269 |
-
|
3270 |
-
|
3271 |
-
|
3272 |
<p class="smallnote orange">Below are PRO features for enhanced SEO and performance (works for even past embed links). </p>
|
3273 |
<p>
|
3274 |
<img class="ssaltgallery" src="<?php echo plugins_url('images/ssaltgalleryall.jpg', __FILE__) ?>" />
|
@@ -3304,6 +3339,17 @@ class YouTubePrefs
|
|
3304 |
</label>
|
3305 |
</p>
|
3306 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3307 |
<div class="hr"></div>
|
3308 |
<p>
|
3309 |
<input disabled type="checkbox" class="checkbox">
|
@@ -3338,10 +3384,9 @@ class YouTubePrefs
|
|
3338 |
</p>
|
3339 |
<div class="hr"></div>
|
3340 |
<p>
|
3341 |
-
<img class="ssfb" src="<?php echo plugins_url('images/ssfb.jpg', __FILE__) ?>" />
|
3342 |
<input disabled type="checkbox" class="checkbox">
|
3343 |
<label>
|
3344 |
-
<b class="chktitle">Facebook Open Graph Markup:</b> <span class="pronon">(PRO Users)</span>
|
3345 |
</label>
|
3346 |
</p>
|
3347 |
<div class="hr"></div>
|
@@ -3359,12 +3404,12 @@ class YouTubePrefs
|
|
3359 |
<p>
|
3360 |
<a href="<?php echo self::$epbase ?>/dashboard/pro-easy-video-analytics.aspx" target="_blank">Activate the above and several other features »</a>
|
3361 |
</p>
|
3362 |
-
|
3363 |
-
|
3364 |
-
|
3365 |
<div class="clearboth"></div>
|
3366 |
</div>
|
3367 |
-
|
3368 |
|
3369 |
<hr>
|
3370 |
|
@@ -3372,47 +3417,47 @@ class YouTubePrefs
|
|
3372 |
<div class="jumper" id="jumpoverride"></div>
|
3373 |
|
3374 |
<h3 class="sect">
|
3375 |
-
|
3376 |
</h3>
|
3377 |
<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 '&'.
|
3378 |
<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>
|
3379 |
-
|
3380 |
-
|
3381 |
-
|
3382 |
-
|
3383 |
-
|
3384 |
-
|
3385 |
-
|
3386 |
-
|
3387 |
-
|
3388 |
-
|
3389 |
-
|
3390 |
-
|
3391 |
-
|
3392 |
-
|
3393 |
-
|
3394 |
-
|
3395 |
-
|
3396 |
-
|
3397 |
-
|
3398 |
-
|
3399 |
-
|
3400 |
-
|
3401 |
-
|
3402 |
-
|
3403 |
-
|
3404 |
-
|
3405 |
<div class="save-changes-follow"> <?php self::save_changes_button(isset($_POST[$ytprefs_submitted]) && $_POST[$ytprefs_submitted] == 'Y'); ?> </div>
|
3406 |
</form>
|
3407 |
<div class="jumper" id="jumppro"></div>
|
3408 |
<div id="goprobox">
|
3409 |
-
|
3410 |
-
|
3411 |
-
|
3412 |
-
|
3413 |
-
|
3414 |
-
|
3415 |
-
|
3416 |
<?php
|
3417 |
}
|
3418 |
else
|
@@ -3435,7 +3480,7 @@ class YouTubePrefs
|
|
3435 |
</li>
|
3436 |
<li>
|
3437 |
<img src="<?php echo plugins_url('images/icongallery.png', __FILE__) ?>">
|
3438 |
-
Alternate Gallery Styling
|
3439 |
</li>
|
3440 |
<li>
|
3441 |
<img src="<?php echo plugins_url('images/iconfx.png', __FILE__) ?>">
|
@@ -3501,7 +3546,7 @@ class YouTubePrefs
|
|
3501 |
<div style="clear: both;"></div>
|
3502 |
<br>
|
3503 |
<h3 class="bold">Enter and save your PRO key (emailed to you):</h3>
|
3504 |
-
|
3505 |
<form name="form2" method="post" action="" id="epform2" class="submitpro" <?php
|
3506 |
if ($all[self::$opt_pro] && strlen(trim($all[self::$opt_pro])) > 0)
|
3507 |
{
|
@@ -3511,10 +3556,10 @@ class YouTubePrefs
|
|
3511 |
|
3512 |
<input name="<?php echo self::$opt_pro; ?>" id="opt_pro" value="<?php echo $all[self::$opt_pro]; ?>" type="text">
|
3513 |
<input type="submit" name="Submit" class="button-primary" id="prokeysubmit" value="<?php _e('Save Key') ?>" />
|
3514 |
-
|
3515 |
-
|
3516 |
-
|
3517 |
-
|
3518 |
<span style="font-size: 25px; color: #cccccc;">|</span> <a href="<?php echo self::$epbase ?>/dashboard/pro-easy-video-analytics.aspx" class="button-primary brightpro" target="_blank">Click here to go PRO »</a>
|
3519 |
<?php
|
3520 |
}
|
@@ -3567,21 +3612,22 @@ class YouTubePrefs
|
|
3567 |
|
3568 |
<iframe src="<?php echo self::$epbase ?>/dashboard/prosupport.aspx?simple=1&prokey=<?php echo $all[self::$opt_pro]; ?>&domain=<?php echo site_url(); ?>" width="500" height="<?php echo ($all[self::$opt_pro] && strlen(trim($all[self::$opt_pro])) > 0) ? "500" : "140"; ?>"></iframe>
|
3569 |
|
3570 |
-
|
3571 |
-
|
3572 |
-
|
3573 |
-
|
3574 |
<br>
|
3575 |
<br>
|
3576 |
<iframe src="<?php echo self::$epbase ?>/dashboard/likecoupon.aspx" width="600" height="500"></iframe>
|
3577 |
-
|
3578 |
-
|
3579 |
<div class="ytnav">
|
3580 |
<a href="#jumphowto">How To Embed</a>
|
3581 |
<a href="#jumpwiz">Visual Wizard</a>
|
3582 |
<a href="#jumpdefaults">Defaults</a>
|
3583 |
<a href="#jumpcompat">Compatibility</a>
|
3584 |
-
<a href="#jumpgallery">
|
|
|
3585 |
<a href="#jumpoverride">Override Defaults</a>
|
3586 |
<a target="_blank" href="<?php echo self::$epbase . "/dashboard/pro-easy-video-analytics.aspx?ref=protab" ?>" style="border-color: #888888;">Upgrade?</a>
|
3587 |
<a href="#jumpsupport">Support</a>
|
@@ -3978,12 +4024,12 @@ class YouTubePrefs
|
|
3978 |
|
3979 |
});
|
3980 |
</script>
|
3981 |
-
|
3982 |
-
|
3983 |
-
|
3984 |
-
|
3985 |
-
|
3986 |
-
|
3987 |
|
3988 |
<?php
|
3989 |
}
|
@@ -4003,251 +4049,257 @@ class YouTubePrefs
|
|
4003 |
});
|
4004 |
|
4005 |
</script>
|
4006 |
-
|
4007 |
-
|
4008 |
-
|
4009 |
<p class="submit">
|
4010 |
<input type="submit" onclick="return savevalidate();" name="Submit" class="button-primary ytprefs-submit" value="<?php _e($button_label) ?>" />
|
4011 |
<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>
|
4012 |
</p>
|
4013 |
-
|
4014 |
-
|
4015 |
|
4016 |
-
|
4017 |
-
{
|
4018 |
-
$loggedin = current_user_can('edit_posts');
|
4019 |
-
if (!($loggedin && self::$alloptions[self::$opt_admin_off_scripts]))
|
4020 |
{
|
4021 |
-
|
4022 |
-
|
4023 |
-
|
4024 |
-
|
4025 |
-
|
4026 |
-
|
4027 |
-
|
|
|
|
|
|
|
4028 |
.epyt-gallery-thumb {
|
4029 |
width: " . round($colwidth, 3) . "%;
|
4030 |
}";
|
4031 |
-
|
4032 |
|
4033 |
-
|
4034 |
|
4035 |
-
|
4036 |
-
|
4037 |
-
|
4038 |
-
|
4039 |
-
|
4040 |
-
|
4041 |
-
|
4042 |
-
|
4043 |
-
|
4044 |
-
|
4045 |
-
|
4046 |
-
|
4047 |
-
|
4048 |
|
4049 |
-
|
4050 |
-
|
4051 |
|
4052 |
-
|
4053 |
-
|
4054 |
-
|
4055 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4056 |
}
|
4057 |
}
|
4058 |
-
}
|
4059 |
|
4060 |
-
|
4061 |
-
{
|
4062 |
-
if ('__ytprefs__' !== $handle)
|
4063 |
{
|
4064 |
-
|
|
|
|
|
|
|
|
|
4065 |
}
|
4066 |
-
return str_replace('<script', '<script data-cfasync="false" ', $tag);
|
4067 |
-
}
|
4068 |
-
|
4069 |
-
public static function get_evselector()
|
4070 |
-
{
|
4071 |
-
$evselector = 'iframe.__youtube_prefs__[src], iframe[src*="youtube.com/embed/"], iframe[src*="youtube-nocookie.com/embed/"]';
|
4072 |
|
4073 |
-
|
4074 |
{
|
4075 |
-
$evselector = 'iframe.__youtube_prefs__[src]';
|
4076 |
-
}
|
4077 |
|
4078 |
-
|
4079 |
-
|
|
|
|
|
4080 |
|
4081 |
-
|
4082 |
-
{
|
4083 |
-
$responsiveselector = '[]';
|
4084 |
-
if (self::$alloptions[self::$opt_widgetfit] == 1)
|
4085 |
-
{
|
4086 |
-
$responsiveselector = '["iframe.__youtube_prefs_widget__"]';
|
4087 |
}
|
4088 |
-
|
|
|
4089 |
{
|
4090 |
-
|
|
|
4091 |
{
|
4092 |
-
$responsiveselector = '["iframe
|
4093 |
}
|
4094 |
-
|
4095 |
{
|
4096 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4097 |
}
|
|
|
4098 |
}
|
4099 |
-
return $responsiveselector;
|
4100 |
-
}
|
4101 |
|
4102 |
-
|
4103 |
-
{
|
4104 |
-
$blogwidth = null;
|
4105 |
-
try
|
4106 |
{
|
4107 |
-
$
|
|
|
|
|
|
|
4108 |
|
4109 |
-
|
4110 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4111 |
{
|
4112 |
-
|
4113 |
}
|
4114 |
|
4115 |
-
$blogwidth =
|
4116 |
-
}
|
4117 |
-
catch (Exception $ex)
|
4118 |
-
{
|
4119 |
-
|
4120 |
-
}
|
4121 |
|
4122 |
-
|
|
|
4123 |
|
4124 |
-
return $blogwidth;
|
4125 |
}
|
4126 |
|
4127 |
-
}
|
4128 |
-
|
4129 |
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
4130 |
//class start
|
4131 |
-
class Add_new_tinymce_btn_Youtubeprefs
|
4132 |
-
{
|
4133 |
|
4134 |
-
|
4135 |
-
|
4136 |
|
4137 |
-
|
4138 |
-
|
4139 |
-
|
4140 |
-
|
4141 |
|
4142 |
-
|
4143 |
-
|
4144 |
-
|
4145 |
-
|
4146 |
-
|
4147 |
-
|
4148 |
-
|
4149 |
|
4150 |
-
|
4151 |
-
|
4152 |
-
|
4153 |
-
|
4154 |
|
4155 |
-
|
4156 |
-
{
|
4157 |
-
if (!current_user_can('edit_posts') && !current_user_can('edit_pages'))
|
4158 |
-
return;
|
4159 |
-
if (get_user_option('rich_editing') == 'true')
|
4160 |
{
|
4161 |
-
|
4162 |
-
|
4163 |
-
|
4164 |
-
|
|
|
|
|
|
|
|
|
|
|
4165 |
}
|
4166 |
-
}
|
4167 |
|
4168 |
-
|
4169 |
-
|
4170 |
-
|
4171 |
|
4172 |
-
|
4173 |
-
|
4174 |
-
|
4175 |
-
|
4176 |
-
|
4177 |
|
4178 |
-
|
4179 |
-
|
4180 |
-
|
4181 |
-
|
4182 |
|
4183 |
-
|
4184 |
-
|
4185 |
-
|
4186 |
-
|
4187 |
-
|
4188 |
|
4189 |
-
|
4190 |
-
|
4191 |
-
|
4192 |
-
|
4193 |
|
4194 |
-
|
4195 |
-
|
4196 |
-
|
4197 |
-
|
4198 |
-
|
4199 |
|
4200 |
-
}
|
4201 |
|
4202 |
//class end
|
4203 |
|
4204 |
|
4205 |
-
register_activation_hook(__FILE__, array('YouTubePrefs', 'initoptions'));
|
4206 |
-
$youtubeplgplus = new YouTubePrefs();
|
4207 |
|
4208 |
|
4209 |
-
add_action("wp_ajax_my_embedplus_pro_record", array('YouTubePrefs', 'my_embedplus_pro_record'));
|
4210 |
-
add_action("wp_ajax_my_embedplus_clearspdc", array('YouTubePrefs', 'my_embedplus_clearspdc'));
|
4211 |
-
add_action("wp_ajax_my_embedplus_glance_vids", array('YouTubePrefs', 'my_embedplus_glance_vids'));
|
4212 |
-
add_action("wp_ajax_my_embedplus_glance_count", array('YouTubePrefs', 'my_embedplus_glance_count'));
|
4213 |
-
add_action("wp_ajax_my_embedplus_dismiss_double_plugin_warning", array('YouTubePrefs', 'my_embedplus_dismiss_double_plugin_warning'));
|
4214 |
-
add_action("wp_ajax_my_embedplus_gallery_page", array('YouTubePrefs', 'my_embedplus_gallery_page'));
|
4215 |
-
add_action("wp_ajax_nopriv_my_embedplus_gallery_page", array('YouTubePrefs', 'my_embedplus_gallery_page'));
|
4216 |
|
4217 |
-
add_action('admin_enqueue_scripts', 'youtubeprefs_admin_enqueue_scripts');
|
4218 |
|
4219 |
-
function youtubeprefs_admin_enqueue_scripts()
|
4220 |
-
{
|
4221 |
-
wp_enqueue_style('embedplusyoutube', plugins_url() . '/youtube-embed-plus/scripts/embedplus_mce.css');
|
4222 |
-
add_action('wp_print_scripts', 'youtubeprefs_output_scriptvars');
|
4223 |
-
wp_enqueue_script('__ytprefs_admin__', plugins_url('scripts/ytprefs-admin.min.js', __FILE__), array('jquery'));
|
4224 |
-
|
4225 |
-
if (
|
4226 |
-
//(!(isset(YouTubePrefs::$alloptions[YouTubePrefs::$opt_pro]) && strlen(trim(YouTubePrefs::$alloptions[YouTubePrefs::$opt_pro])) > 0)) && // display only if not pro ooopointer
|
4227 |
-
(get_bloginfo('version') >= '3.3') && YouTubePrefs::custom_admin_pointers_check()
|
4228 |
-
)
|
4229 |
{
|
4230 |
-
|
|
|
|
|
4231 |
|
4232 |
-
|
4233 |
-
|
4234 |
-
|
|
|
|
|
|
|
4235 |
|
4236 |
-
|
4237 |
-
|
4238 |
-
|
|
|
|
|
|
|
|
|
|
|
4239 |
}
|
4240 |
-
}
|
4241 |
|
4242 |
-
function youtubeprefs_output_scriptvars()
|
4243 |
-
{
|
4244 |
-
YouTubePrefs::$scriptsprinted++;
|
4245 |
-
if (YouTubePrefs::$scriptsprinted == 1)
|
4246 |
{
|
4247 |
-
|
4248 |
-
|
4249 |
-
|
4250 |
-
|
|
|
|
|
|
|
4251 |
<script type="text/javascript">
|
4252 |
var wpajaxurl = "<?php echo admin_url('admin-ajax.php') ?>";
|
4253 |
if (window.location.toString().indexOf('https://') == 0)
|
@@ -4325,9 +4377,9 @@ function youtubeprefs_output_scriptvars()
|
|
4325 |
|
4326 |
|
4327 |
</script>
|
4328 |
-
|
|
|
4329 |
}
|
4330 |
-
}
|
4331 |
|
4332 |
// function embedplus_strip_shortcode_from_excerpt($content)
|
4333 |
// {
|
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.3
|
7 |
Author: EmbedPlus Team
|
8 |
Author URI: http://www.embedplus.com
|
9 |
*/
|
32 |
class YouTubePrefs
|
33 |
{
|
34 |
|
35 |
+
public static $version = '11.3';
|
36 |
public static $opt_version = 'version';
|
37 |
public static $optembedwidth = null;
|
38 |
public static $optembedheight = null;
|
106 |
public static $opt_gallery_customnext = 'gallery_customnext';
|
107 |
public static $opt_gallery_showdsc = 'gallery_showdsc';
|
108 |
public static $opt_gallery_thumbcrop = 'gallery_thumbcrop';
|
109 |
+
public static $opt_gallery_disptype = 'gallery_disptype';
|
110 |
public static $opt_admin_off_scripts = 'admin_off_scripts';
|
111 |
public static $opt_alloptions = 'youtubeprefs_alloptions';
|
112 |
public static $alloptions = null;
|
787 |
$_gallery_style = 'grid';
|
788 |
$_gallery_showdsc = 0;
|
789 |
$_gallery_thumbcrop = 'box';
|
790 |
+
$_gallery_disptype = 'default';
|
791 |
$_debugmode = 0;
|
792 |
$_admin_off_scripts = 0;
|
793 |
$_old_script_method = 0;
|
853 |
$_gallery_thumbplay = self::tryget($arroptions, self::$opt_gallery_thumbplay, 1);
|
854 |
$_gallery_style = self::tryget($arroptions, self::$opt_gallery_style, 'grid');
|
855 |
$_gallery_thumbcrop = self::tryget($arroptions, self::$opt_gallery_thumbcrop, 'box');
|
856 |
+
$_gallery_disptype = self::tryget($arroptions, self::$opt_gallery_disptype, 'default');
|
857 |
$_gallery_channelsub = self::tryget($arroptions, self::$opt_gallery_channelsub, $_gallery_channelsub);
|
858 |
$_gallery_channelsublink = self::tryget($arroptions, self::$opt_gallery_channelsublink, $_gallery_channelsublink);
|
859 |
$_gallery_channelsubtext = self::tryget($arroptions, self::$opt_gallery_channelsubtext, $_gallery_channelsubtext);
|
930 |
self::$opt_gallery_showdsc => $_gallery_showdsc,
|
931 |
self::$opt_gallery_style => $_gallery_style,
|
932 |
self::$opt_gallery_thumbcrop => $_gallery_thumbcrop,
|
933 |
+
self::$opt_gallery_disptype => $_gallery_disptype,
|
934 |
self::$opt_gallery_pagesize => $_gallery_pagesize,
|
935 |
self::$opt_debugmode => $_debugmode,
|
936 |
self::$opt_admin_off_scripts => $_admin_off_scripts,
|
1359 |
$dyntype = '';
|
1360 |
$acctitle = '';
|
1361 |
$videoseries = '';
|
1362 |
+
$disptype = '';
|
1363 |
+
$beginlb = '';
|
1364 |
+
$endlb = '';
|
1365 |
+
$disptypeif = '';
|
1366 |
|
1367 |
$finalparams = $linkparams + self::$alloptions;
|
1368 |
|
1427 |
unset($finalparams[self::$opt_html5]);
|
1428 |
}
|
1429 |
|
1430 |
+
if (self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 10)
|
1431 |
{
|
1432 |
|
1433 |
if (self::$alloptions[self::$opt_schemaorg] == 1 && isset($finalparams['v']))
|
1435 |
$schemaorgoutput = self::getschemaorgoutput($finalparams['v']);
|
1436 |
}
|
1437 |
|
|
|
|
|
1438 |
if (self::$alloptions[self::$opt_dynload] == 1
|
1439 |
//&& $finalparams[self::$opt_autoplay] != 1
|
1440 |
)
|
1447 |
{
|
1448 |
$voloutput = ' data-vol="' . $linkparams[self::$opt_vol] . '" ';
|
1449 |
}
|
1450 |
+
|
1451 |
+
|
1452 |
+
if (isset($finalparams['layout']) && strtolower($finalparams['layout']) == 'gallery' && isset($finalparams['list']) && isset($finalparams[self::$opt_gallery_disptype]) && $finalparams[self::$opt_gallery_disptype] === 'lb')
|
1453 |
+
{
|
1454 |
+
$disptype = ' epyt-lb';
|
1455 |
+
$beginlb = '<div class="lity-hide">';
|
1456 |
+
$endlb = '</div>';
|
1457 |
+
$disptypeif = ' epyt-lbif';
|
1458 |
+
}
|
1459 |
}
|
1460 |
else
|
1461 |
{
|
1463 |
{
|
1464 |
unset($finalparams[self::$opt_vol]);
|
1465 |
}
|
1466 |
+
if (isset($finalparams[self::$opt_gallery_disptype]))
|
1467 |
+
{
|
1468 |
+
unset($finalparams[self::$opt_gallery_disptype]);
|
1469 |
+
}
|
1470 |
}
|
1471 |
|
1472 |
$centercode = '';
|
1565 |
$gallery_page_obj = self::get_gallery_page($gallery_options);
|
1566 |
|
1567 |
//$dynsrc = '';// 'data-ep-gallery';
|
1568 |
+
$galleryWrapper1 = '<div class="epyt-gallery ' . $disptype . '" data-currpage="1">';
|
1569 |
$galleryWrapper2 = '</div>';
|
1570 |
$galleryCode = $subbutton . '<div class="epyt-gallery-list epyt-gallery-style-' . esc_attr($gallery_options->style) . '">' .
|
1571 |
$gallery_page_obj->html .
|
1573 |
$videoidoutput = isset($gallery_page_obj->init_id) ? $gallery_page_obj->init_id : ''; // 'GALLERYVIDEOID';
|
1574 |
}
|
1575 |
|
1576 |
+
|
1577 |
+
$code1 = $beginlb . '<iframe ' . $dyntype . $centercode . ' id="_ytid_' . rand(10000, 99999) . '" width="' . self::$defaultwidth . '" height="' . self::$defaultheight .
|
1578 |
'" ' . $dynsrc . 'src="https://www.' . $youtubebaseurl . '.com/embed/' . $videoseries . $videoidoutput . '?';
|
1579 |
+
$code2 = '" frameborder="0" class="__youtube_prefs__' . ($iscontent ? '' : ' __youtube_prefs_widget__') . $disptypeif .
|
1580 |
+
'"' . $voloutput . $acctitle . ' allowfullscreen ></iframe>' . $endlb . $schemaorgoutput;
|
1581 |
|
1582 |
$origin = '';
|
1583 |
|
2282 |
$new_pointer_content .= '<p>'; // ooopointer
|
2283 |
if (!(self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0))
|
2284 |
{
|
2285 |
+
$new_pointer_content .= __("This update adds improved responsive sizing for AJAX-based themes (Free), and a popup lightbox display option for Pro galleries (<a target=_blank href=" . self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=frompointer' . ">Learn more about Pro »</a>)");
|
2286 |
}
|
2287 |
else
|
2288 |
{
|
2289 |
+
$new_pointer_content .= __("This update adds improved responsive sizing for AJAX-based themes (Free), and a popup lightbox display option for Pro galleries.");
|
2290 |
}
|
2291 |
$new_pointer_content .= '</p>';
|
2292 |
|
2490 |
$new_options[self::$opt_gallery_thumbcrop] = $_gallery_thumbcrop;
|
2491 |
|
2492 |
|
2493 |
+
$_gallery_disptype = 'default';
|
2494 |
+
try
|
2495 |
+
{
|
2496 |
+
if (isset($_POST[self::$opt_gallery_disptype]))
|
2497 |
+
{
|
2498 |
+
$_gallery_disptype = trim(str_replace(array(' ', "'", '"'), array('', '', ''), strip_tags($_POST[self::$opt_gallery_disptype])));
|
2499 |
+
}
|
2500 |
+
}
|
2501 |
+
catch (Exception $ex)
|
2502 |
+
{
|
2503 |
+
$_gallery_disptype = 'default';
|
2504 |
+
}
|
2505 |
+
$new_options[self::$opt_gallery_disptype] = $_gallery_disptype;
|
2506 |
+
|
2507 |
+
|
2508 |
$_gallery_channelsublink = '';
|
2509 |
try
|
2510 |
{
|
2697 |
p.submit em {display: inline-block; padding-left: 20px; vertical-align: middle; width: 240px; margin-top: -6px;}
|
2698 |
#opt_pro {box-shadow: 0px 0px 5px 0px #1870D5; width: 320px;vertical-align: top;}
|
2699 |
#goprobox h3 {font-size: 13px;}
|
2700 |
+
.chx {border-left: 5px solid rgba(100, 100, 100,.1); margin-bottom: 20px;}
|
2701 |
.chx p {margin: 0px 0px 5px 0px;}
|
2702 |
.cuz {background-image: linear-gradient(to bottom,#4983FF,#0C5597) !important; color: #ffffff;}
|
2703 |
.brightpro {background-image: linear-gradient(to bottom,#ff5500,#cc2200) !important; color: #ffffff;}
|
2711 |
h4.sect {border-radius: 10px; background-color: #D9E9F7; padding: 5px 5px 5px 10px; position: relative; font-weight: bold;}
|
2712 |
|
2713 |
.ytnav {margin-bottom: 15px;}
|
2714 |
+
.ytnav a {font-weight: bold; display: inline-block; padding: 5px 10px; margin: 0px 15px 0px 0px; border: 1px solid #cccccc; border-radius: 6px;
|
2715 |
text-decoration: none; background-color: #ffffff;}
|
2716 |
+
.ytnav a:last-child {margin-right: 0;}
|
2717 |
.jumper {height: 25px;}
|
2718 |
.ssschema {float: right; width: 350px; height: auto; margin-right: 10px;}
|
2719 |
.ssfb {float: right; height: auto; margin-right: 10px; margin-left: 15px; margin-bottom: 10px;}
|
2721 |
input[type=checkbox] {border: 1px solid #000000;}
|
2722 |
.chktitle {display: inline-block; padding: 1px 5px 1px 5px; border-radius: 3px; background-color: #ffffff; border: 1px solid #dddddd;}
|
2723 |
b, strong {font-weight: bold;}
|
2724 |
+
input.checkbox[disabled], input[type=radio][disabled] {border: 1px dashed #444444;}
|
2725 |
.pad10 {padding: 10px;}
|
2726 |
#boxdohl {font-weight: bold; padding: 0px 10px; <?php echo $all[self::$opt_dohl] ? '' : 'display: none;' ?>}
|
2727 |
#boxdyn {font-weight: bold; padding: 0px 10px; <?php echo $all[self::$opt_dynload] ? 'display: block;' : 'display: none;' ?>}
|
2749 |
.ssgallery {float: right; width: 130px; height: auto; margin-left: 15px; border: 3px solid #ffffff;}
|
2750 |
.sssubscribe{display: block; width: 400px; height: auto;}
|
2751 |
.ssaltgallery {float: right; height: auto; margin-right: 10px; margin-left: 15px; margin-bottom: 10px; width: 350px;}
|
2752 |
+
.sspopupplayer {float: right; height: auto; margin-right: 10px; margin-left: 15px; margin-bottom: 10px; width: 350px;}
|
2753 |
+
.sswizardbutton { max-width: 70%; height: auto;}
|
2754 |
.save-changes-follow {position: fixed; z-index: 10000; bottom: 0; right: 0; background-color: #ffffff; padding: 0 20px; border-top-left-radius: 20px; border: 2px solid #aaaaaa; border-right-width: 0; border-bottom-width: 0;
|
2755 |
-webkit-box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.75);
|
2756 |
-moz-box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.75);
|
2764 |
<a href="#jumpwiz">Visual Wizard</a>
|
2765 |
<a href="#jumpdefaults">Defaults</a>
|
2766 |
<a href="#jumpcompat">Compatibility</a>
|
2767 |
+
<a href="#jumpgallery">Galleries</a>
|
2768 |
+
<a href="#jumpprosettings">PRO Settings</a>
|
2769 |
<a href="#jumpoverride">Override Defaults</a>
|
2770 |
<a target="_blank" href="<?php echo self::$epbase . "/dashboard/pro-easy-video-analytics.aspx?ref=protab" ?>" style="border-color: #888888;">Upgrade?</a>
|
2771 |
<a href="#jumpsupport">Support</a>
|
2828 |
</p>
|
2829 |
<div class="jumper" id="jumpdefaults"></div>
|
2830 |
<h3 class="sect">
|
2831 |
+
<?php _e("Default YouTube Options") ?> <a href="#top" class="totop">▲ top</a>
|
2832 |
</h3>
|
2833 |
<p>
|
2834 |
+
<?php _e("One of the benefits of using this plugin is that you can set site-wide default options for all your videos (click \"Save Changes\" when finished). However, you can also override them (and more) on a per-video basis. Directions on how to do that are in the next section.") ?>
|
2835 |
</p>
|
2836 |
+
<?php // self::save_changes_button(); ?>
|
2837 |
|
2838 |
<div class="ytindent chx">
|
2839 |
<p>
|
3057 |
<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 »</a>. <strong>First, you must obtain your YouTube API key</strong>.
|
3058 |
Don't worry, it's an easy process. Just <a href="https://www.youtube.com/watch?v=px8LvNIVblg" target="_blank">click this link »</a> and follow the video on that page to get your API key. Then paste it in the "YouTube API Key" box below, and click the "Save Changes" button.
|
3059 |
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3060 |
|
3061 |
|
3062 |
<p class="smallnote">
|
3074 |
<p>
|
3075 |
<label for="<?php echo self::$opt_gallery_pagesize; ?>"><b class="chktitle">Gallery Page Size:</b></label>
|
3076 |
<select name="<?php echo self::$opt_gallery_pagesize; ?>" id="<?php echo self::$opt_gallery_pagesize; ?>" style="width: 60px;">
|
3077 |
+
<?php
|
3078 |
+
$gps_val = intval(trim($all[self::$opt_gallery_pagesize]));
|
3079 |
+
$gps_val = min($gps_val, 50);
|
3080 |
+
for ($gps = 1; $gps <= 50; $gps++)
|
3081 |
+
{
|
3082 |
+
?><option <?php echo $gps_val == $gps ? 'selected' : '' ?> value="<?php echo $gps ?>"><?php echo $gps ?></option>
|
3083 |
<?php
|
3084 |
}
|
3085 |
?>
|
3136 |
</p>
|
3137 |
<div class="pad20">
|
3138 |
<p>
|
3139 |
+
Ready to get started with an actual gallery? Just click the plugin wizard button and pick your desired gallery embedding choice.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3140 |
</p>
|
3141 |
+
<p><img class="sswizardbutton" src="<?php echo plugins_url('images/sswizardbutton.jpg', __FILE__) ?>"></p>
|
3142 |
</div>
|
3143 |
</div>
|
3144 |
|
|
|
3145 |
|
3146 |
+
<div class="jumper" id="jumpprosettings"></div>
|
3147 |
<div class="upgchecks">
|
3148 |
<h3 class="sect">PRO Features</h3>
|
3149 |
+
<?php
|
3150 |
+
if ($all[self::$opt_pro] && strlen(trim($all[self::$opt_pro])) > 9)
|
3151 |
+
{
|
3152 |
+
?>
|
3153 |
<p class="smallnote orange">Below are PRO features for enhanced SEO and performance (works for even past embed links). Gallery options for PRO users will also be listed here.</p>
|
3154 |
<p>
|
3155 |
<img class="ssaltgallery" src="<?php echo plugins_url('images/ssaltgalleryall.jpg', __FILE__) ?>" />
|
3156 |
+
<?php $cleanstyle = trim($all[self::$opt_gallery_style]); ?>
|
3157 |
<select name="<?php echo self::$opt_gallery_style; ?>" id="<?php echo self::$opt_gallery_style; ?>" >
|
3158 |
<option value="">Gallery Style</option>
|
3159 |
<option value="grid" <?php echo 'grid' === $cleanstyle ? 'selected' : '' ?> >Grid (default)</option>
|
3179 |
<div class="hr"></div>
|
3180 |
<p>
|
3181 |
<img class="ssaltgallery" src="<?php echo plugins_url('images/ssaltgallerycircles.jpg', __FILE__) ?>" />
|
3182 |
+
<?php $cleancrop = trim($all[self::$opt_gallery_thumbcrop]); ?>
|
3183 |
+
<label for="<?php echo self::$opt_gallery_thumbcrop; ?>">
|
3184 |
+
<b>(PRO)</b> <b class="chktitle">Gallery Thumbnail Shape:</b></b>
|
3185 |
+
Differentiate your gallery by showing different thumbnail shapes. We currently offer rectangle and circle shapes.
|
3186 |
+
</label>
|
3187 |
+
<br>
|
3188 |
<select name="<?php echo self::$opt_gallery_thumbcrop; ?>" id="<?php echo self::$opt_gallery_thumbcrop; ?>" >
|
3189 |
<option value="">Thumbnail Shape</option>
|
3190 |
<option value="box" <?php echo 'box' === $cleancrop ? 'selected' : '' ?> >Rectangle (default)</option>
|
3191 |
<option value="portal" <?php echo 'portal' === $cleancrop ? 'selected' : '' ?> >Circular</option>
|
3192 |
</select>
|
3193 |
+
</p>
|
3194 |
+
<div class="hr"></div>
|
3195 |
+
<p>
|
3196 |
+
<img class="sspopupplayer" src="<?php echo plugins_url('images/sspopupplayer.jpg', __FILE__) ?>" />
|
3197 |
+
<?php $cleandisp = trim($all[self::$opt_gallery_disptype]); ?>
|
3198 |
+
<label for="<?php echo self::$opt_gallery_disptype; ?>">
|
3199 |
+
<b>(PRO)</b> <b class="chktitle">Gallery Video Display Mode:</b> <sup class="orange">NEW</sup>
|
3200 |
+
Display your gallery videos simply above the thumbnails (default), or as a popup lightbox.
|
3201 |
</label>
|
3202 |
+
<br>
|
3203 |
+
<select name="<?php echo self::$opt_gallery_disptype; ?>" id="<?php echo self::$opt_gallery_disptype; ?>" >
|
3204 |
+
<option value="">Display Type</option>
|
3205 |
+
<option value="default" <?php echo 'default' === $cleandisp ? 'selected' : '' ?> >Above Thumbnails (default)</option>
|
3206 |
+
<option value="lb" <?php echo 'lb' === $cleandisp ? 'selected' : '' ?> >Popup Lightbox</option>
|
3207 |
+
</select>
|
3208 |
</p>
|
3209 |
<div class="hr"></div>
|
3210 |
|
3263 |
<br>
|
3264 |
<span id="boxdyn">
|
3265 |
Animation:
|
3266 |
+
<?php $cleandyn = trim($all[self::$opt_dyntype]); ?>
|
3267 |
<select name="<?php echo self::$opt_dyntype; ?>" id="<?php echo self::$opt_dyntype; ?>" >
|
3268 |
<option value="">Select type</option>
|
3269 |
<option value="rotateIn" <?php echo 'rotateIn' === $cleandyn ? 'selected' : '' ?> >rotate in</option>
|
3283 |
</p>
|
3284 |
<div class="hr"></div>
|
3285 |
<p>
|
|
|
3286 |
<input name="<?php echo self::$opt_ogvideo; ?>" id="<?php echo self::$opt_ogvideo; ?>" <?php checked($all[self::$opt_ogvideo], 1); ?> type="checkbox" class="checkbox">
|
3287 |
<label for="<?php echo self::$opt_ogvideo; ?>">
|
3288 |
+
<b>(PRO)</b> <b class="chktitle">Facebook Open Graph Markup:</b> 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>
|
3289 |
</label>
|
3290 |
</p>
|
3291 |
<div class="hr"></div>
|
3299 |
</label>
|
3300 |
</p>
|
3301 |
|
3302 |
+
<?php
|
3303 |
+
}
|
3304 |
+
else
|
3305 |
+
{
|
3306 |
+
?>
|
3307 |
<p class="smallnote orange">Below are PRO features for enhanced SEO and performance (works for even past embed links). </p>
|
3308 |
<p>
|
3309 |
<img class="ssaltgallery" src="<?php echo plugins_url('images/ssaltgalleryall.jpg', __FILE__) ?>" />
|
3339 |
</label>
|
3340 |
</p>
|
3341 |
|
3342 |
+
<div class="hr"></div>
|
3343 |
+
<p>
|
3344 |
+
<img class="sspopupplayer" src="<?php echo plugins_url('images/sspopupplayer.jpg', __FILE__) ?>" />
|
3345 |
+
<label>
|
3346 |
+
<b class="chktitle">Gallery Video Display Mode: </b> <sup class="orange">NEW</sup> <span class="pronon">(PRO Users)</span>
|
3347 |
+
Display your gallery videos simply above the thumbnails (default), or as a popup lightbox.
|
3348 |
+
</label>
|
3349 |
+
<br>
|
3350 |
+
<input type="radio" disabled> Default <input type="radio" disabled> Popup lightbox
|
3351 |
+
</p>
|
3352 |
+
|
3353 |
<div class="hr"></div>
|
3354 |
<p>
|
3355 |
<input disabled type="checkbox" class="checkbox">
|
3384 |
</p>
|
3385 |
<div class="hr"></div>
|
3386 |
<p>
|
|
|
3387 |
<input disabled type="checkbox" class="checkbox">
|
3388 |
<label>
|
3389 |
+
<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>
|
3390 |
</label>
|
3391 |
</p>
|
3392 |
<div class="hr"></div>
|
3404 |
<p>
|
3405 |
<a href="<?php echo self::$epbase ?>/dashboard/pro-easy-video-analytics.aspx" target="_blank">Activate the above and several other features »</a>
|
3406 |
</p>
|
3407 |
+
<?php
|
3408 |
+
}
|
3409 |
+
?>
|
3410 |
<div class="clearboth"></div>
|
3411 |
</div>
|
3412 |
+
<?php // self::save_changes_button(); ?>
|
3413 |
|
3414 |
<hr>
|
3415 |
|
3417 |
<div class="jumper" id="jumpoverride"></div>
|
3418 |
|
3419 |
<h3 class="sect">
|
3420 |
+
<?php _e("How To Override Defaults / Other Options") ?> <a href="#top" class="totop">▲ top</a>
|
3421 |
</h3>
|
3422 |
<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 '&'.
|
3423 |
<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>
|
3424 |
+
<?php
|
3425 |
+
_e('<ul>');
|
3426 |
+
_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>");
|
3427 |
+
_e("<li><strong>height</strong> - Sets the height of your player. <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA&width=500<strong>&height=350</strong></em> </li>");
|
3428 |
+
_e("<li><strong>autoplay</strong> - Set this to 1 to autoplay the video (or 0 to play the video once). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&autoplay=1</strong></em> </li>");
|
3429 |
+
_e("<li><strong>cc_load_policy</strong> - Set this to 1 to turn on closed captioning (or 0 to leave them off). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&cc_load_policy=1</strong></em> </li>");
|
3430 |
+
_e("<li><strong>iv_load_policy</strong> - Set this to 3 to turn off annotations (or 1 to show them). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&iv_load_policy=3</strong></em> </li>");
|
3431 |
+
_e("<li><strong>loop</strong> - Set this to 1 to loop the video (or 0 to not loop). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&loop=1</strong></em> </li>");
|
3432 |
+
_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>");
|
3433 |
+
_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>");
|
3434 |
+
_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>");
|
3435 |
+
_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>");
|
3436 |
+
_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>");
|
3437 |
+
_e("<li><strong>vq</strong> - Set this to 'hd720' or 'hd1080' to force the video to have HD quality. Leave blank to let YouTube decide. <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&vq=hd720</strong></em> </li>");
|
3438 |
+
_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>");
|
3439 |
+
_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>");
|
3440 |
+
_e("<li><strong>playsinline</strong> - Set this to 1 to allow videos play inline with the page on iOS browsers. (Set to 0 to have iOS launch videos in fullscreen instead). <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&playsinline=1</strong></em> </li>");
|
3441 |
+
_e("<li><strong>origin</strong> - Set this to 1 to add the 'origin' parameter for extra JavaScript security. <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA<strong>&origin=1</strong></em> </li>");
|
3442 |
+
_e('</ul>');
|
3443 |
+
|
3444 |
+
_e("<p>You can also start and end each individual video at particular times. Like the above, each option should begin with '&'</p>");
|
3445 |
+
_e('<ul>');
|
3446 |
+
_e("<li><strong>start</strong> - Sets the time (in seconds) to start the video. <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA&width=500&height=350<strong>&start=20</strong></em> </li>");
|
3447 |
+
_e("<li><strong>end</strong> - Sets the time (in seconds) to stop the video. <em>Example: http://www.youtube.com/watch?v=quwebVjAEJA&width=500&height=350<strong>&end=100</strong></em> </li>");
|
3448 |
+
_e('</ul>');
|
3449 |
+
?>
|
3450 |
<div class="save-changes-follow"> <?php self::save_changes_button(isset($_POST[$ytprefs_submitted]) && $_POST[$ytprefs_submitted] == 'Y'); ?> </div>
|
3451 |
</form>
|
3452 |
<div class="jumper" id="jumppro"></div>
|
3453 |
<div id="goprobox">
|
3454 |
+
<?php
|
3455 |
+
if ($all[self::$opt_pro] && strlen(trim($all[self::$opt_pro])) > 0)
|
3456 |
+
{
|
3457 |
+
echo "<h3>" . __('Thank you for going PRO.');
|
3458 |
+
echo ' <input type="submit" name="showkey" class="button-primary" style="vertical-align: 15%;" id="showprokey" value="View my PRO key" />';
|
3459 |
+
echo "</h3>";
|
3460 |
+
?>
|
3461 |
<?php
|
3462 |
}
|
3463 |
else
|
3480 |
</li>
|
3481 |
<li>
|
3482 |
<img src="<?php echo plugins_url('images/icongallery.png', __FILE__) ?>">
|
3483 |
+
Alternate Gallery Styling (popup/lightbox player, slider and list layouts, and more)
|
3484 |
</li>
|
3485 |
<li>
|
3486 |
<img src="<?php echo plugins_url('images/iconfx.png', __FILE__) ?>">
|
3546 |
<div style="clear: both;"></div>
|
3547 |
<br>
|
3548 |
<h3 class="bold">Enter and save your PRO key (emailed to you):</h3>
|
3549 |
+
<?php } ?>
|
3550 |
<form name="form2" method="post" action="" id="epform2" class="submitpro" <?php
|
3551 |
if ($all[self::$opt_pro] && strlen(trim($all[self::$opt_pro])) > 0)
|
3552 |
{
|
3556 |
|
3557 |
<input name="<?php echo self::$opt_pro; ?>" id="opt_pro" value="<?php echo $all[self::$opt_pro]; ?>" type="text">
|
3558 |
<input type="submit" name="Submit" class="button-primary" id="prokeysubmit" value="<?php _e('Save Key') ?>" />
|
3559 |
+
<?php
|
3560 |
+
if (!($all[self::$opt_pro] && strlen(trim($all[self::$opt_pro])) > 0))
|
3561 |
+
{
|
3562 |
+
?>
|
3563 |
<span style="font-size: 25px; color: #cccccc;">|</span> <a href="<?php echo self::$epbase ?>/dashboard/pro-easy-video-analytics.aspx" class="button-primary brightpro" target="_blank">Click here to go PRO »</a>
|
3564 |
<?php
|
3565 |
}
|
3612 |
|
3613 |
<iframe src="<?php echo self::$epbase ?>/dashboard/prosupport.aspx?simple=1&prokey=<?php echo $all[self::$opt_pro]; ?>&domain=<?php echo site_url(); ?>" width="500" height="<?php echo ($all[self::$opt_pro] && strlen(trim($all[self::$opt_pro])) > 0) ? "500" : "140"; ?>"></iframe>
|
3614 |
|
3615 |
+
<?php
|
3616 |
+
if (!($all[self::$opt_pro] && strlen(trim($all[self::$opt_pro])) > 0))
|
3617 |
+
{
|
3618 |
+
?>
|
3619 |
<br>
|
3620 |
<br>
|
3621 |
<iframe src="<?php echo self::$epbase ?>/dashboard/likecoupon.aspx" width="600" height="500"></iframe>
|
3622 |
+
<?php }
|
3623 |
+
?>
|
3624 |
<div class="ytnav">
|
3625 |
<a href="#jumphowto">How To Embed</a>
|
3626 |
<a href="#jumpwiz">Visual Wizard</a>
|
3627 |
<a href="#jumpdefaults">Defaults</a>
|
3628 |
<a href="#jumpcompat">Compatibility</a>
|
3629 |
+
<a href="#jumpgallery">Galleries</a>
|
3630 |
+
<a href="#jumpprosettings">PRO Settings</a>
|
3631 |
<a href="#jumpoverride">Override Defaults</a>
|
3632 |
<a target="_blank" href="<?php echo self::$epbase . "/dashboard/pro-easy-video-analytics.aspx?ref=protab" ?>" style="border-color: #888888;">Upgrade?</a>
|
3633 |
<a href="#jumpsupport">Support</a>
|
4024 |
|
4025 |
});
|
4026 |
</script>
|
4027 |
+
<?php
|
4028 |
+
if (function_exists('add_thickbox'))
|
4029 |
+
{
|
4030 |
+
add_thickbox();
|
4031 |
+
}
|
4032 |
+
?>
|
4033 |
|
4034 |
<?php
|
4035 |
}
|
4049 |
});
|
4050 |
|
4051 |
</script>
|
4052 |
+
<?php
|
4053 |
+
}
|
4054 |
+
?>
|
4055 |
<p class="submit">
|
4056 |
<input type="submit" onclick="return savevalidate();" name="Submit" class="button-primary ytprefs-submit" value="<?php _e($button_label) ?>" />
|
4057 |
<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>
|
4058 |
</p>
|
4059 |
+
<?php
|
4060 |
+
}
|
4061 |
|
4062 |
+
public static function ytprefsscript()
|
|
|
|
|
|
|
4063 |
{
|
4064 |
+
$loggedin = current_user_can('edit_posts');
|
4065 |
+
if (!($loggedin && self::$alloptions[self::$opt_admin_off_scripts]))
|
4066 |
+
{
|
4067 |
+
wp_enqueue_style(
|
4068 |
+
'__EPYT__style', plugins_url('styles/ytprefs' . self::$min . '.css', __FILE__)
|
4069 |
+
);
|
4070 |
+
$cols = floatval(self::$alloptions[self::$opt_gallery_columns]);
|
4071 |
+
$cols = $cols == 0 ? 3.0 : $cols;
|
4072 |
+
$colwidth = 100.0 / $cols;
|
4073 |
+
$custom_css = "
|
4074 |
.epyt-gallery-thumb {
|
4075 |
width: " . round($colwidth, 3) . "%;
|
4076 |
}";
|
4077 |
+
wp_add_inline_style('__EPYT__style', $custom_css);
|
4078 |
|
4079 |
+
wp_enqueue_script('__ytprefs__', plugins_url('scripts/ytprefs' . self::$min . '.js', __FILE__), array('jquery'));
|
4080 |
|
4081 |
+
if (self::$alloptions[self::$opt_old_script_method] != 1)
|
4082 |
+
{
|
4083 |
+
wp_localize_script('__ytprefs__', '_EPYT_', array(
|
4084 |
+
'ajaxurl' => admin_url('admin-ajax.php'),
|
4085 |
+
'security' => wp_create_nonce('embedplus-nonce'),
|
4086 |
+
'gallery_scrolloffset' => intval(self::$alloptions[self::$opt_gallery_scrolloffset]),
|
4087 |
+
'eppathtoscripts' => plugins_url('scripts/', __FILE__),
|
4088 |
+
'epresponsiveselector' => self::get_responsiveselector(),
|
4089 |
+
'epdovol' => true,
|
4090 |
+
'version' => self::$alloptions[self::$opt_version],
|
4091 |
+
'evselector' => self::get_evselector()
|
4092 |
+
));
|
4093 |
+
}
|
4094 |
|
4095 |
+
////////////////////// cloudflare accomodation
|
4096 |
+
//add_filter('script_loader_tag', 'YouTubePrefs::set_cfasync', 10, 3);
|
4097 |
|
4098 |
+
if (!is_admin() && (self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 0) && self::$alloptions[self::$opt_dynload] == 1)
|
4099 |
+
{
|
4100 |
+
wp_enqueue_style('__dyntype__', plugins_url('scripts/embdyn.min.css', __FILE__));
|
4101 |
+
wp_enqueue_script('__dynload__', plugins_url('scripts/embdyn' . self::$min . '.js', __FILE__), array('jquery'));
|
4102 |
+
}
|
4103 |
+
|
4104 |
+
if (!is_admin() && (self::$alloptions[self::$opt_pro] && strlen(trim(self::$alloptions[self::$opt_pro])) > 8))
|
4105 |
+
{
|
4106 |
+
wp_enqueue_style('__disptype__', plugins_url('scripts/lity' . self::$min . '.css', __FILE__));
|
4107 |
+
wp_enqueue_script('__dispload__', plugins_url('scripts/lity' . self::$min . '.js', __FILE__), array('jquery', '__ytprefs__'));
|
4108 |
+
}
|
4109 |
}
|
4110 |
}
|
|
|
4111 |
|
4112 |
+
public static function set_cfasync($tag, $handle, $src)
|
|
|
|
|
4113 |
{
|
4114 |
+
if ('__ytprefs__' !== $handle)
|
4115 |
+
{
|
4116 |
+
return $tag;
|
4117 |
+
}
|
4118 |
+
return str_replace('<script', '<script data-cfasync="false" ', $tag);
|
4119 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
4120 |
|
4121 |
+
public static function get_evselector()
|
4122 |
{
|
4123 |
+
$evselector = 'iframe.__youtube_prefs__[src], iframe[src*="youtube.com/embed/"], iframe[src*="youtube-nocookie.com/embed/"]';
|
|
|
4124 |
|
4125 |
+
if (self::$alloptions[self::$opt_evselector_light] == 1)
|
4126 |
+
{
|
4127 |
+
$evselector = 'iframe.__youtube_prefs__[src]';
|
4128 |
+
}
|
4129 |
|
4130 |
+
return $evselector;
|
|
|
|
|
|
|
|
|
|
|
4131 |
}
|
4132 |
+
|
4133 |
+
public static function get_responsiveselector()
|
4134 |
{
|
4135 |
+
$responsiveselector = '[]';
|
4136 |
+
if (self::$alloptions[self::$opt_widgetfit] == 1)
|
4137 |
{
|
4138 |
+
$responsiveselector = '["iframe.__youtube_prefs_widget__"]';
|
4139 |
}
|
4140 |
+
if (self::$alloptions[self::$opt_responsive] == 1)
|
4141 |
{
|
4142 |
+
if (self::$alloptions[self::$opt_responsive_all] == 1)
|
4143 |
+
{
|
4144 |
+
$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\']"]';
|
4145 |
+
}
|
4146 |
+
else
|
4147 |
+
{
|
4148 |
+
$responsiveselector = '["iframe.__youtube_prefs__"]';
|
4149 |
+
}
|
4150 |
}
|
4151 |
+
return $responsiveselector;
|
4152 |
}
|
|
|
|
|
4153 |
|
4154 |
+
public static function get_blogwidth()
|
|
|
|
|
|
|
4155 |
{
|
4156 |
+
$blogwidth = null;
|
4157 |
+
try
|
4158 |
+
{
|
4159 |
+
$embed_size_w = intval(get_option('embed_size_w'));
|
4160 |
|
4161 |
+
global $content_width;
|
4162 |
+
if (empty($content_width))
|
4163 |
+
{
|
4164 |
+
$content_width = $GLOBALS['content_width'];
|
4165 |
+
}
|
4166 |
+
|
4167 |
+
$blogwidth = $embed_size_w ? $embed_size_w : ($content_width ? $content_width : 450);
|
4168 |
+
}
|
4169 |
+
catch (Exception $ex)
|
4170 |
{
|
4171 |
+
|
4172 |
}
|
4173 |
|
4174 |
+
$blogwidth = preg_replace('/\D/', '', $blogwidth); //may have px
|
|
|
|
|
|
|
|
|
|
|
4175 |
|
4176 |
+
return $blogwidth;
|
4177 |
+
}
|
4178 |
|
|
|
4179 |
}
|
4180 |
|
|
|
|
|
4181 |
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
4182 |
//class start
|
4183 |
+
class Add_new_tinymce_btn_Youtubeprefs
|
4184 |
+
{
|
4185 |
|
4186 |
+
public $btn_arr;
|
4187 |
+
public $js_file;
|
4188 |
|
4189 |
+
/*
|
4190 |
+
* call the constructor and set class variables
|
4191 |
+
* From the constructor call the functions via wordpress action/filter
|
4192 |
+
*/
|
4193 |
|
4194 |
+
function __construct($seperator, $btn_name, $javascrip_location)
|
4195 |
+
{
|
4196 |
+
$this->btn_arr = array("Seperator" => $seperator, "Name" => $btn_name);
|
4197 |
+
$this->js_file = $javascrip_location;
|
4198 |
+
add_action('init', array($this, 'add_tinymce_button'));
|
4199 |
+
add_filter('tiny_mce_version', array($this, 'refresh_mce_version'));
|
4200 |
+
}
|
4201 |
|
4202 |
+
/*
|
4203 |
+
* create the buttons only if the user has editing privs.
|
4204 |
+
* If so we create the button and add it to the tinymce button array
|
4205 |
+
*/
|
4206 |
|
4207 |
+
function add_tinymce_button()
|
|
|
|
|
|
|
|
|
4208 |
{
|
4209 |
+
if (!current_user_can('edit_posts') && !current_user_can('edit_pages'))
|
4210 |
+
return;
|
4211 |
+
if (get_user_option('rich_editing') == 'true')
|
4212 |
+
{
|
4213 |
+
//the function that adds the javascript
|
4214 |
+
add_filter('mce_external_plugins', array($this, 'add_new_tinymce_plugin'));
|
4215 |
+
//adds the button to the tinymce button array
|
4216 |
+
add_filter('mce_buttons', array($this, 'register_new_button'));
|
4217 |
+
}
|
4218 |
}
|
|
|
4219 |
|
4220 |
+
/*
|
4221 |
+
* add the new button to the tinymce array
|
4222 |
+
*/
|
4223 |
|
4224 |
+
function register_new_button($buttons)
|
4225 |
+
{
|
4226 |
+
array_push($buttons, $this->btn_arr["Seperator"], $this->btn_arr["Name"]);
|
4227 |
+
return $buttons;
|
4228 |
+
}
|
4229 |
|
4230 |
+
/*
|
4231 |
+
* Call the javascript file that loads the
|
4232 |
+
* instructions for the new button
|
4233 |
+
*/
|
4234 |
|
4235 |
+
function add_new_tinymce_plugin($plugin_array)
|
4236 |
+
{
|
4237 |
+
$plugin_array[$this->btn_arr['Name']] = $this->js_file;
|
4238 |
+
return $plugin_array;
|
4239 |
+
}
|
4240 |
|
4241 |
+
/*
|
4242 |
+
* This function tricks tinymce in thinking
|
4243 |
+
* it needs to refresh the buttons
|
4244 |
+
*/
|
4245 |
|
4246 |
+
function refresh_mce_version($ver)
|
4247 |
+
{
|
4248 |
+
$ver += 3;
|
4249 |
+
return $ver;
|
4250 |
+
}
|
4251 |
|
4252 |
+
}
|
4253 |
|
4254 |
//class end
|
4255 |
|
4256 |
|
4257 |
+
register_activation_hook(__FILE__, array('YouTubePrefs', 'initoptions'));
|
4258 |
+
$youtubeplgplus = new YouTubePrefs();
|
4259 |
|
4260 |
|
4261 |
+
add_action("wp_ajax_my_embedplus_pro_record", array('YouTubePrefs', 'my_embedplus_pro_record'));
|
4262 |
+
add_action("wp_ajax_my_embedplus_clearspdc", array('YouTubePrefs', 'my_embedplus_clearspdc'));
|
4263 |
+
add_action("wp_ajax_my_embedplus_glance_vids", array('YouTubePrefs', 'my_embedplus_glance_vids'));
|
4264 |
+
add_action("wp_ajax_my_embedplus_glance_count", array('YouTubePrefs', 'my_embedplus_glance_count'));
|
4265 |
+
add_action("wp_ajax_my_embedplus_dismiss_double_plugin_warning", array('YouTubePrefs', 'my_embedplus_dismiss_double_plugin_warning'));
|
4266 |
+
add_action("wp_ajax_my_embedplus_gallery_page", array('YouTubePrefs', 'my_embedplus_gallery_page'));
|
4267 |
+
add_action("wp_ajax_nopriv_my_embedplus_gallery_page", array('YouTubePrefs', 'my_embedplus_gallery_page'));
|
4268 |
|
4269 |
+
add_action('admin_enqueue_scripts', 'youtubeprefs_admin_enqueue_scripts');
|
4270 |
|
4271 |
+
function youtubeprefs_admin_enqueue_scripts()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4272 |
{
|
4273 |
+
wp_enqueue_style('embedplusyoutube', plugins_url() . '/youtube-embed-plus/scripts/embedplus_mce.css');
|
4274 |
+
add_action('wp_print_scripts', 'youtubeprefs_output_scriptvars');
|
4275 |
+
wp_enqueue_script('__ytprefs_admin__', plugins_url('scripts/ytprefs-admin.min.js', __FILE__), array('jquery'));
|
4276 |
|
4277 |
+
if (
|
4278 |
+
//(!(isset(YouTubePrefs::$alloptions[YouTubePrefs::$opt_pro]) && strlen(trim(YouTubePrefs::$alloptions[YouTubePrefs::$opt_pro])) > 0)) && // display only if not pro ooopointer
|
4279 |
+
(get_bloginfo('version') >= '3.3') && YouTubePrefs::custom_admin_pointers_check()
|
4280 |
+
)
|
4281 |
+
{
|
4282 |
+
add_action('admin_print_footer_scripts', 'YouTubePrefs::custom_admin_pointers_footer');
|
4283 |
|
4284 |
+
wp_enqueue_script('wp-pointer');
|
4285 |
+
wp_enqueue_style('wp-pointer');
|
4286 |
+
}
|
4287 |
+
|
4288 |
+
if (YouTubePrefs::$alloptions['glance'] == 1)
|
4289 |
+
{
|
4290 |
+
add_action('admin_print_footer_scripts', 'YouTubePrefs::glance_script');
|
4291 |
+
}
|
4292 |
}
|
|
|
4293 |
|
4294 |
+
function youtubeprefs_output_scriptvars()
|
|
|
|
|
|
|
4295 |
{
|
4296 |
+
YouTubePrefs::$scriptsprinted++;
|
4297 |
+
if (YouTubePrefs::$scriptsprinted == 1)
|
4298 |
+
{
|
4299 |
+
$blogwidth = YouTubePrefs::get_blogwidth();
|
4300 |
+
$epprokey = YouTubePrefs::$alloptions[YouTubePrefs::$opt_pro];
|
4301 |
+
$myytdefaults = http_build_query(YouTubePrefs::$alloptions);
|
4302 |
+
?>
|
4303 |
<script type="text/javascript">
|
4304 |
var wpajaxurl = "<?php echo admin_url('admin-ajax.php') ?>";
|
4305 |
if (window.location.toString().indexOf('https://') == 0)
|
4377 |
|
4378 |
|
4379 |
</script>
|
4380 |
+
<?php
|
4381 |
+
}
|
4382 |
}
|
|
|
4383 |
|
4384 |
// function embedplus_strip_shortcode_from_excerpt($content)
|
4385 |
// {
|