Version Description
- Fix: Fixed a compatibility issue with the Complianz GDPR plugin.
- Fix: Incorrect description of the "check for new posts" setting in the admin area.
- Fix: The feed finder tool was displaying duplicated results of some feeds.
Download this release
Release Info
Developer | Craig at Smash Balloon |
Plugin | Feeds for YouTube (YouTube video, channel, and gallery plugin) |
Version | 1.4.3 |
Comparing to | |
See all releases |
Code changes from version 1.4.2 to 1.4.3
- README.txt +36 -31
- inc/admin/class-sbspf-admin.php +2 -2
- inc/admin/class-sby-admin.php +2 -2
- inc/class-sby-feed-locator.php +49 -37
- inc/class-sby-wp-post.php +5 -1
- js/sb-youtube.js +1 -1
- js/sb-youtube.min.js +1 -1
- languages/feeds-for-youtube-fr_FR.po +1 -1
- languages/feeds-for-youtube.pot +2 -2
- youtube-feed.php +2 -2
README.txt
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
-
=== Feeds for YouTube (YouTube video, channel, and
|
2 |
Author: Smash Balloon
|
3 |
Contributors: smashballoon, craig-at-smash-balloon
|
4 |
Support Website: http://smashballoon/youtube-feed/
|
5 |
Tags: YouTube, YouTube feed, YouTube widget, YouTube channel, YouTube gallery
|
6 |
Requires at least: 3.4
|
7 |
Tested up to: 5.8
|
8 |
-
Stable tag: 1.4.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -31,9 +31,9 @@ For simple step-by-step directions on how to set up the Feeds for YouTube plugin
|
|
31 |
|
32 |
### Benefits
|
33 |
* **Increase social engagement** between you and your subscribers
|
34 |
-
* **Save time** by using the plugin to generate dynamic, search engine crawlable
|
35 |
-
* **Get more subscribers** by displaying your
|
36 |
-
* Display your
|
37 |
* The plugin is **updated regularly** with new features, bug-fixes and API changes
|
38 |
* Support is quick, effective, and always happy to help
|
39 |
* We're dedicated to providing the **most customizable**, **robust** and **well supported** YouTube gallery plugin in the world!
|
@@ -44,16 +44,16 @@ Customer support is a huge deal to us. We pride ourselves on always providing qu
|
|
44 |
If you like the plugin then please consider leaving a review, as it really helps to support the plugin. If you have an issue then please allow us to help you fix it before leaving a review. Just [let us know](https://smashballoon.com/youtube-feed/support/?utm_source=wordpress&utm_campaign=sby 'Feeds for YouTube Support') what the problem is and we'll get back to you right away.
|
45 |
|
46 |
### Pro Version
|
47 |
-
We
|
48 |
|
49 |
* Display YouTube videos from your **favorites list**
|
50 |
-
* Integrate the **YouTube Live API** to show live streaming
|
51 |
* Display a YouTube gallery in a carousel slider
|
52 |
* Allow **filtering** of videos using keywords in the description or title
|
53 |
-
* Fully functional **search endpoint** for display
|
54 |
* **Combine multiple feeds** into one
|
55 |
-
* Customizable **actions when video completes** like displaying a link to a product page for example, or displaying thumbnails of your other
|
56 |
-
* Download video data into a **custom post type** to allow visitors to browse and view
|
57 |
|
58 |
### How to use the "Feeds for YouTube" plugin
|
59 |
|
@@ -61,9 +61,9 @@ One of our main priorities has always been to make our plugins as easy as possib
|
|
61 |
|
62 |
* 1) Click the "Log in to YouTube and connect an account" button on the "Feeds for YouTube" plugin settings page. This will prompt you to log into your Google account to authorize the plugin.
|
63 |
* 2) Once you've connected your account, save the plugin settings.
|
64 |
-
* 3) Then simply copy and paste the `[youtube-feed]` shortcode onto any page, post, or widget where you want your
|
65 |
|
66 |
-
That's it! You can then customize the
|
67 |
|
68 |
For full step-by-step setup directions with screenshots, see [here](https://smashballoon.com/youtube-feed/free/ "YouTube Feed Free Setup Doc").
|
69 |
|
@@ -74,7 +74,7 @@ We're Smash Balloon; a fun-loving WordPress plugin development company birthed i
|
|
74 |
To find out more about the team, see [here](https://smashballoon.com/about/ "Team Smash Balloon").
|
75 |
|
76 |
== Installation ==
|
77 |
-
1. Install the
|
78 |
2. Activate the plugin through the 'Plugins' menu in WordPress.
|
79 |
3. Navigate to the 'Feeds for YouTube' settings page to configure your YouTube gallery.
|
80 |
4. Use the shortcode [youtube-feed] in your page, post or widget to display your YouTube feed.
|
@@ -96,7 +96,7 @@ The Feeds for YouTube plugin is brand new and so we're currently working on impr
|
|
96 |
|
97 |
5) Enter a channel name to display videos from.
|
98 |
|
99 |
-
6) Navigate to the Customize and Style pages to customize your
|
100 |
|
101 |
7) Once you've customized your feed, click on the "Display Your Feed" tab for directions on how to display your YouTube feed (or multiple feeds).
|
102 |
|
@@ -112,27 +112,27 @@ The Feeds for YouTube plugin is brand new and so we're currently working on impr
|
|
112 |
|
113 |
= Can I display multiple YouTube feeds on my site or on the same page? =
|
114 |
|
115 |
-
Yep. You can display multiple
|
116 |
|
117 |
= How do I embed a YouTube gallery directly into a WordPress page template? =
|
118 |
|
119 |
-
You can embed a
|
120 |
|
121 |
= Will the plugin work with W3 Total Cache or other caching plugins? =
|
122 |
|
123 |
-
The Feeds for YouTube plugin should work in compatibility with most, if not all, caching plugins, but you may need to tweak the settings in order to allow the feed to update successfully and display your latest posts. If you are experiencing problems with your
|
124 |
|
125 |
-
= Can I change whether the
|
126 |
|
127 |
Yep, just use the following setting: Feeds for YouTube > Customize > Video Experience > When does video play? You can then set the video to play when clicked or to autoplay.
|
128 |
|
129 |
-
= How can I change the layout of my
|
130 |
|
131 |
-
This free plugin has several layout options built into it. Use the settings in the following location to display your
|
132 |
|
133 |
= Can I select how many YouTube videos should be displayed in the feed? =
|
134 |
|
135 |
-
Yep, you can choose to display between 1-50 videos in your
|
136 |
|
137 |
= Will my YouTube gallery be responsive to accommodate mobile visitors? =
|
138 |
|
@@ -140,31 +140,36 @@ Yes. All feed layouts are completely mobile responsive. Using the plugin's galle
|
|
140 |
|
141 |
= Will videos from my YouTube channel be cached? =
|
142 |
|
143 |
-
Yes. The plugin will cache all of the posts collected from the
|
144 |
|
145 |
-
= How do I find the nickname
|
146 |
|
147 |
-
You can display videos from any
|
148 |
|
149 |
= Will displaying my YouTube channel affect the time it takes to load the page? =
|
150 |
|
151 |
-
The plugin has a few features to minimize the impact it has on page load time. For example, iframes for playing YouTube videos are not loaded until the feed is interacted with by a visitor. Thumbnails of your
|
152 |
|
153 |
-
= How often do new videos from my
|
154 |
|
155 |
-
By default, the plugin retrieves new videos for your YouTube gallery once every hour. You can reduce this to as little as 15 minutes if needed. You can even set your feed to update using WordPress cron in the background so the caching process is not relying on the page with your
|
156 |
|
157 |
== Screenshots ==
|
158 |
|
159 |
1. By default the plugin inherits styles from your theme
|
160 |
-
2. Display multiple
|
161 |
3. When using the "grid" layout, videos open and play in a lightbox
|
162 |
4. Feeds for YouTube Settings pages
|
163 |
-
5. Built in customization settings make customizing your
|
164 |
-
6. Use handy shortcode options to customize individual
|
165 |
7. To display a YouTube feed just copy and paste the [youtube-feed] shortcode into a widget or page
|
166 |
|
167 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
168 |
= 1.4.2 =
|
169 |
* Tested with WordPress 5.8 update.
|
170 |
* Tweak: Added "play" icon to main player for the gallery layout.
|
@@ -181,7 +186,7 @@ By default, the plugin retrieves new videos for your YouTube gallery once every
|
|
181 |
|
182 |
= 1.3 =
|
183 |
* New: Integrations with popular GDPR cookie consent solutions added. Visit the YouTube Feed settings page, Customize tab, GDPR section for more information.
|
184 |
-
* Fix: Date that
|
185 |
|
186 |
= 1.2.4 =
|
187 |
* Tweak: Minor update to item.php template to accommodate dynamic title attribute in lightbox.
|
1 |
+
=== Feeds for YouTube (YouTube video, channel, and gallery plugin) ===
|
2 |
Author: Smash Balloon
|
3 |
Contributors: smashballoon, craig-at-smash-balloon
|
4 |
Support Website: http://smashballoon/youtube-feed/
|
5 |
Tags: YouTube, YouTube feed, YouTube widget, YouTube channel, YouTube gallery
|
6 |
Requires at least: 3.4
|
7 |
Tested up to: 5.8
|
8 |
+
Stable tag: 1.4.3
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
31 |
|
32 |
### Benefits
|
33 |
* **Increase social engagement** between you and your subscribers
|
34 |
+
* **Save time** by using the plugin to generate dynamic, search engine crawlable content on your website
|
35 |
+
* **Get more subscribers** by displaying your videos directly on your site
|
36 |
+
* Display your channel content **your way** to perfectly match your website's style
|
37 |
* The plugin is **updated regularly** with new features, bug-fixes and API changes
|
38 |
* Support is quick, effective, and always happy to help
|
39 |
* We're dedicated to providing the **most customizable**, **robust** and **well supported** YouTube gallery plugin in the world!
|
44 |
If you like the plugin then please consider leaving a review, as it really helps to support the plugin. If you have an issue then please allow us to help you fix it before leaving a review. Just [let us know](https://smashballoon.com/youtube-feed/support/?utm_source=wordpress&utm_campaign=sby 'Feeds for YouTube Support') what the problem is and we'll get back to you right away.
|
45 |
|
46 |
### Pro Version
|
47 |
+
We plan on releasing a [Pro version](http://smashballoon.com/youtube-feed/?utm_source=wordpress&utm_campaign=sby 'Feeds for YouTube Pro') which includes some awesome additional features to help you display your content in even more powerful ways:
|
48 |
|
49 |
* Display YouTube videos from your **favorites list**
|
50 |
+
* Integrate the **YouTube Live API** to show live streaming videos on your site.
|
51 |
* Display a YouTube gallery in a carousel slider
|
52 |
* Allow **filtering** of videos using keywords in the description or title
|
53 |
+
* Fully functional **search endpoint** for display videos from a search result
|
54 |
* **Combine multiple feeds** into one
|
55 |
+
* Customizable **actions when video completes** like displaying a link to a product page for example, or displaying thumbnails of your other videos.
|
56 |
+
* Download video data into a **custom post type** to allow visitors to browse and view videos on your website.
|
57 |
|
58 |
### How to use the "Feeds for YouTube" plugin
|
59 |
|
61 |
|
62 |
* 1) Click the "Log in to YouTube and connect an account" button on the "Feeds for YouTube" plugin settings page. This will prompt you to log into your Google account to authorize the plugin.
|
63 |
* 2) Once you've connected your account, save the plugin settings.
|
64 |
+
* 3) Then simply copy and paste the `[youtube-feed]` shortcode onto any page, post, or widget where you want your feed to be displayed.
|
65 |
|
66 |
+
That's it! You can then customize the feed as needed using the settings on the plugin "Customize" page.
|
67 |
|
68 |
For full step-by-step setup directions with screenshots, see [here](https://smashballoon.com/youtube-feed/free/ "YouTube Feed Free Setup Doc").
|
69 |
|
74 |
To find out more about the team, see [here](https://smashballoon.com/about/ "Team Smash Balloon").
|
75 |
|
76 |
== Installation ==
|
77 |
+
1. Install the plugin either via the WordPress plugin directory, or by uploading the files to your web server (in the /wp-content/plugins/ directory).
|
78 |
2. Activate the plugin through the 'Plugins' menu in WordPress.
|
79 |
3. Navigate to the 'Feeds for YouTube' settings page to configure your YouTube gallery.
|
80 |
4. Use the shortcode [youtube-feed] in your page, post or widget to display your YouTube feed.
|
96 |
|
97 |
5) Enter a channel name to display videos from.
|
98 |
|
99 |
+
6) Navigate to the Customize and Style pages to customize your feed.
|
100 |
|
101 |
7) Once you've customized your feed, click on the "Display Your Feed" tab for directions on how to display your YouTube feed (or multiple feeds).
|
102 |
|
112 |
|
113 |
= Can I display multiple YouTube feeds on my site or on the same page? =
|
114 |
|
115 |
+
Yep. You can display multiple feeds by using our built-in shortcode options, for example: `[youtube-feed channel="smashballoon" num=3]`.
|
116 |
|
117 |
= How do I embed a YouTube gallery directly into a WordPress page template? =
|
118 |
|
119 |
+
You can embed a gallery directly into a template file by using the WordPress [do_shortcode](http://codex.wordpress.org/Function_Reference/do_shortcode) function: `<?php echo do_shortcode('[youtube-feed]'); ?>`.
|
120 |
|
121 |
= Will the plugin work with W3 Total Cache or other caching plugins? =
|
122 |
|
123 |
+
The Feeds for YouTube plugin should work in compatibility with most, if not all, caching plugins, but you may need to tweak the settings in order to allow the feed to update successfully and display your latest posts. If you are experiencing problems with your feed not updating then try disabling either 'Page Caching' or 'Object Caching' in W3 Total Cache (or any other similar caching plugin) to see whether that fixes the problem and the feed displays and updates successfully.
|
124 |
|
125 |
+
= Can I change whether the video autoplays or plays on click =
|
126 |
|
127 |
Yep, just use the following setting: Feeds for YouTube > Customize > Video Experience > When does video play? You can then set the video to play when clicked or to autoplay.
|
128 |
|
129 |
+
= How can I change the layout of my feed? =
|
130 |
|
131 |
+
This free plugin has several layout options built into it. Use the settings in the following location to display your videos in a list, grid, or gallery layout: Feeds for YouTube > Customize > Layout. You can also change the spacing/padding between the videos by using the "Spacing between videos" setting in this same section.
|
132 |
|
133 |
= Can I select how many YouTube videos should be displayed in the feed? =
|
134 |
|
135 |
+
Yep, you can choose to display between 1-50 videos in your feed by using the following setting: Feeds for YouTube > Customize > Layout > Number of Videos. The plugin also contains a "Load More" button to allow you to infinitely load more videos into your feed.
|
136 |
|
137 |
= Will my YouTube gallery be responsive to accommodate mobile visitors? =
|
138 |
|
140 |
|
141 |
= Will videos from my YouTube channel be cached? =
|
142 |
|
143 |
+
Yes. The plugin will cache all of the posts collected from the API. Your YouTube videos and information about your channel can then be retrieved and used for future page loads.
|
144 |
|
145 |
+
= How do I find the nickname of channel ID for different channels? =
|
146 |
|
147 |
+
You can display videos from any channel using the unique YouTube channel ID. This can be found by viewing the channel page on YouTube and looking at the end of the URL. ex: https://www.youtube.com/channel/UC1a2b3c4D5F6g7i8j9k. You can also use the channel nickname.
|
148 |
|
149 |
= Will displaying my YouTube channel affect the time it takes to load the page? =
|
150 |
|
151 |
+
The plugin has a few features to minimize the impact it has on page load time. For example, iframes for playing YouTube videos are not loaded until the feed is interacted with by a visitor. Thumbnails of your videos are the smallest resolution necessary relative to the size of the feed. Also, these video thumbnails are not loaded until the rest of the content on the page is loaded.
|
152 |
|
153 |
+
= How often do new videos from my channel appear in the feed? =
|
154 |
|
155 |
+
By default, the plugin retrieves new videos for your YouTube gallery once every hour. You can reduce this to as little as 15 minutes if needed. You can even set your feed to update using WordPress cron in the background so the caching process is not relying on the page with your feed being visited.
|
156 |
|
157 |
== Screenshots ==
|
158 |
|
159 |
1. By default the plugin inherits styles from your theme
|
160 |
+
2. Display multiple feeds and customize each one
|
161 |
3. When using the "grid" layout, videos open and play in a lightbox
|
162 |
4. Feeds for YouTube Settings pages
|
163 |
+
5. Built in customization settings make customizing your feed easy
|
164 |
+
6. Use handy shortcode options to customize individual feeds
|
165 |
7. To display a YouTube feed just copy and paste the [youtube-feed] shortcode into a widget or page
|
166 |
|
167 |
== Changelog ==
|
168 |
+
= 1.4.3 =
|
169 |
+
* Fix: Fixed a compatibility issue with the Complianz GDPR plugin.
|
170 |
+
* Fix: Incorrect description of the "check for new posts" setting in the admin area.
|
171 |
+
* Fix: The feed finder tool was displaying duplicated results of some feeds.
|
172 |
+
|
173 |
= 1.4.2 =
|
174 |
* Tested with WordPress 5.8 update.
|
175 |
* Tweak: Added "play" icon to main player for the gallery layout.
|
186 |
|
187 |
= 1.3 =
|
188 |
* New: Integrations with popular GDPR cookie consent solutions added. Visit the YouTube Feed settings page, Customize tab, GDPR section for more information.
|
189 |
+
* Fix: Date that video was published would not always match what was shown on YouTube.com.
|
190 |
|
191 |
= 1.2.4 =
|
192 |
* Tweak: Minor update to item.php template to accommodate dynamic title attribute in lightbox.
|
inc/admin/class-sbspf-admin.php
CHANGED
@@ -738,8 +738,8 @@ class SB_YOUTUBE_Admin {
|
|
738 |
<label class="sbspf_radio_label" for="sbspf_caching_type_page"><?php _e ( 'When the page loads', $this->vars->text_domain() ); ?></label>
|
739 |
<a class="sbspf_tooltip_link" href="JavaScript:void(0);" style="position: relative; top: 2px;"><?php echo $this->default_tooltip_text() ?></a>
|
740 |
<p class="sbspf_tooltip sbspf_more_info"><?php echo sprintf( __( "Your %s data is temporarily cached by the plugin in your WordPress database. There are two ways that you can set the plugin to check for new data:<br><br>
|
741 |
-
<b>1. When the page loads</b><br>Selecting this option means that when the cache expires then the plugin will check %s for new posts the next time that the feed is loaded. You can choose how long this data should be cached for with a minimum time of 15 minutes. If you set the time to 60 minutes then the plugin will clear the cached data after that length of time, and the next time the page is viewed it will check for new data. <b>Tip:</b> If you're experiencing an issue with the plugin not updating automatically then try enabling the setting labeled <b>'
|
742 |
-
<b>2. In the background</b><br>Selecting this option means that the plugin will check for new data in the background so that the feed is updated behind the scenes. You can select at what time and how often the plugin should check for new data using the settings below. <b>Please note</b> that the plugin will initially check for data from
|
743 |
</p>
|
744 |
</div>
|
745 |
<div class="sbspf_row sbspf-caching-page-options" style="display: none;">
|
738 |
<label class="sbspf_radio_label" for="sbspf_caching_type_page"><?php _e ( 'When the page loads', $this->vars->text_domain() ); ?></label>
|
739 |
<a class="sbspf_tooltip_link" href="JavaScript:void(0);" style="position: relative; top: 2px;"><?php echo $this->default_tooltip_text() ?></a>
|
740 |
<p class="sbspf_tooltip sbspf_more_info"><?php echo sprintf( __( "Your %s data is temporarily cached by the plugin in your WordPress database. There are two ways that you can set the plugin to check for new data:<br><br>
|
741 |
+
<b>1. When the page loads</b><br>Selecting this option means that when the cache expires then the plugin will check %s for new posts the next time that the feed is loaded. You can choose how long this data should be cached for with a minimum time of 15 minutes. If you set the time to 60 minutes then the plugin will clear the cached data after that length of time, and the next time the page is viewed it will check for new data. <b>Tip:</b> If you're experiencing an issue with the plugin not updating automatically then try enabling the setting labeled <b>'Cron Clear Cache'</b> which is located on the 'Customize' tab.<br><br>
|
742 |
+
<b>2. In the background</b><br>Selecting this option means that the plugin will check for new data in the background so that the feed is updated behind the scenes. You can select at what time and how often the plugin should check for new data using the settings below. <b>Please note</b> that the plugin will initially check for data from YouTube when the page first loads, but then after that will check in the background on the schedule selected - unless the cache is cleared.", $this->vars->text_domain() ), $social_network, $social_network ); ?>
|
743 |
</p>
|
744 |
</div>
|
745 |
<div class="sbspf_row sbspf-caching-page-options" style="display: none;">
|
inc/admin/class-sby-admin.php
CHANGED
@@ -895,8 +895,8 @@ class SBY_Admin extends SB_YOUTUBE_Admin {
|
|
895 |
<label class="sbspf_radio_label" for="sbspf_caching_type_page"><?php _e ( 'When the page loads', $this->vars->text_domain() ); ?></label>
|
896 |
<a class="sbspf_tooltip_link" href="JavaScript:void(0);" style="position: relative; top: 2px;"><?php echo $this->default_tooltip_text() ?></a>
|
897 |
<p class="sbspf_tooltip sbspf_more_info"><?php echo sprintf( __( "Your %s data is temporarily cached by the plugin in your WordPress database. There are two ways that you can set the plugin to check for new data:<br><br>
|
898 |
-
<b>1. When the page loads</b><br>Selecting this option means that when the cache expires then the plugin will check %s for new posts the next time that the feed is loaded. You can choose how long this data should be cached for with a minimum time of 15 minutes. If you set the time to 60 minutes then the plugin will clear the cached data after that length of time, and the next time the page is viewed it will check for new data. <b>Tip:</b> If you're experiencing an issue with the plugin not updating automatically then try enabling the setting labeled <b>'
|
899 |
-
<b>2. In the background</b><br>Selecting this option means that the plugin will check for new data in the background so that the feed is updated behind the scenes. You can select at what time and how often the plugin should check for new data using the settings below. <b>Please note</b> that the plugin will initially check for data from
|
900 |
</p>
|
901 |
</div>
|
902 |
<div class="sbspf_row sbspf-caching-page-options" style="display: none;">
|
895 |
<label class="sbspf_radio_label" for="sbspf_caching_type_page"><?php _e ( 'When the page loads', $this->vars->text_domain() ); ?></label>
|
896 |
<a class="sbspf_tooltip_link" href="JavaScript:void(0);" style="position: relative; top: 2px;"><?php echo $this->default_tooltip_text() ?></a>
|
897 |
<p class="sbspf_tooltip sbspf_more_info"><?php echo sprintf( __( "Your %s data is temporarily cached by the plugin in your WordPress database. There are two ways that you can set the plugin to check for new data:<br><br>
|
898 |
+
<b>1. When the page loads</b><br>Selecting this option means that when the cache expires then the plugin will check %s for new posts the next time that the feed is loaded. You can choose how long this data should be cached for with a minimum time of 15 minutes. If you set the time to 60 minutes then the plugin will clear the cached data after that length of time, and the next time the page is viewed it will check for new data. <b>Tip:</b> If you're experiencing an issue with the plugin not updating automatically then try enabling the setting labeled <b>'Cron Clear Cache'</b> which is located on the 'Customize' tab.<br><br>
|
899 |
+
<b>2. In the background</b><br>Selecting this option means that the plugin will check for new data in the background so that the feed is updated behind the scenes. You can select at what time and how often the plugin should check for new data using the settings below. <b>Please note</b> that the plugin will initially check for data from YouTube when the page first loads, but then after that will check in the background on the schedule selected - unless the cache is cleared.", $this->vars->text_domain() ), $social_network, $social_network ); ?>
|
900 |
</p>
|
901 |
</div>
|
902 |
<div class="sbspf_row sbspf-caching-page-options" style="display: none;">
|
inc/class-sby-feed-locator.php
CHANGED
@@ -131,44 +131,56 @@ class SBY_Feed_Locator
|
|
131 |
$non_unknown_match = false;
|
132 |
$unknown_match = false;
|
133 |
|
|
|
134 |
foreach ( $this->matching_entries as $index => $matching_entry ) {
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
172 |
}
|
173 |
}
|
174 |
|
131 |
$non_unknown_match = false;
|
132 |
$unknown_match = false;
|
133 |
|
134 |
+
$atts_for_page = array();
|
135 |
foreach ( $this->matching_entries as $index => $matching_entry ) {
|
136 |
+
$should_add = true;
|
137 |
+
|
138 |
+
if ( ! empty( $atts_for_page[ $matching_entry['post_id'] ] ) ) {
|
139 |
+
foreach ( $atts_for_page[ $matching_entry['post_id'] ] as $existing_atts ) {
|
140 |
+
if ( $existing_atts === $matching_entry['shortcode_atts'] ) {
|
141 |
+
$should_add = false;
|
142 |
+
}
|
143 |
+
}
|
144 |
+
}
|
145 |
+
if ( $should_add ) {
|
146 |
+
$atts_for_page[ $matching_entry['post_id'] ][] = $matching_entry['shortcode_atts'];
|
147 |
+
|
148 |
+
$details_atts = is_array( $this->feed_details['atts'] ) ? $this->feed_details['atts'] : array();
|
149 |
+
$matching_atts = json_decode( $matching_entry['shortcode_atts'], true );
|
150 |
+
if ( ! is_array( $matching_atts ) ) {
|
151 |
+
$matching_atts = array();
|
152 |
+
}
|
153 |
+
$atts_diff = array_diff( $matching_atts, $details_atts ); // determines if the shortcode settings match the shortcode settings of an existing feed
|
154 |
+
if ( empty( $atts_diff ) ) {
|
155 |
+
$matching_indices[] = $matching_entry['id'];
|
156 |
+
if ( $matching_entry['html_location'] === $this->feed_details['location']['html'] ) {
|
157 |
+
$matched_location = $index;
|
158 |
+
$this->update_entry( $matching_entry['id'], $matching_entry['html_location'] );
|
159 |
+
}
|
160 |
+
if ( $matching_entry['html_location'] !== 'unknown' ) {
|
161 |
+
$non_unknown_match = $index;
|
162 |
+
} else {
|
163 |
+
$unknown_match = $index;
|
164 |
+
}
|
165 |
+
}
|
166 |
+
}
|
167 |
+
|
168 |
+
if ( false === $matched_location ) {
|
169 |
+
// if there is no matched location, there is only one feed on the page, and the feed being checked has an unknown location, update the known location
|
170 |
+
if ( count( $matching_indices ) === 1
|
171 |
+
&& $this->feed_details['location']['html'] === 'unknown'
|
172 |
+
&& false !== $non_unknown_match ) {
|
173 |
+
$this->update_entry( $this->matching_entries[ $non_unknown_match ]['id'], $this->matching_entries[ $non_unknown_match ]['html_location'] );
|
174 |
+
} else {
|
175 |
+
if ( $this->feed_details['location']['html'] !== 'unknown'
|
176 |
+
&& false !== $unknown_match ) {
|
177 |
+
$this->update_entry( $this->matching_entries[ $unknown_match ]['id'], $this->feed_details['location']['html'] );
|
178 |
+
} else {
|
179 |
+
$this->insert_entry();
|
180 |
+
}
|
181 |
+
}
|
182 |
+
}
|
183 |
+
}
|
184 |
}
|
185 |
}
|
186 |
|
inc/class-sby-wp-post.php
CHANGED
@@ -161,6 +161,10 @@ class SBY_WP_Post
|
|
161 |
$flag = '<!-- sby:description-incomplete -->';
|
162 |
}
|
163 |
|
164 |
-
|
|
|
|
|
|
|
|
|
165 |
}
|
166 |
}
|
161 |
$flag = '<!-- sby:description-incomplete -->';
|
162 |
}
|
163 |
|
164 |
+
$content = '['.SBY_SLUG.'-single]<!-- sby:description-start -->' . wp_kses_post( $description ) . '<!-- sby:description-end -->' . $flag;
|
165 |
+
|
166 |
+
$content = apply_filters( 'sby_wp_post_content', $content, $this->youtube_api_data, $this->wp_post_id );
|
167 |
+
|
168 |
+
return $content;
|
169 |
}
|
170 |
}
|
js/sb-youtube.js
CHANGED
@@ -1607,7 +1607,7 @@ if(!sby_js_exists) {
|
|
1607 |
this.settings.consentGiven = (val === 'true');
|
1608 |
}
|
1609 |
} else if (typeof window.cookieconsent !== 'undefined') { // Complianz by Really Simple Plugins
|
1610 |
-
this.settings.consentGiven = sbyCmplzGetCookie('
|
1611 |
} else if (typeof window.Cookiebot !== "undefined") { // Cookiebot by Cybot A/S
|
1612 |
this.settings.consentGiven = Cookiebot.consented;
|
1613 |
} else if (typeof window.BorlabsCookie !== 'undefined') { // Borlabs Cookie by Borlabs
|
1607 |
this.settings.consentGiven = (val === 'true');
|
1608 |
}
|
1609 |
} else if (typeof window.cookieconsent !== 'undefined') { // Complianz by Really Simple Plugins
|
1610 |
+
this.settings.consentGiven = ( sbyCmplzGetCookie('cmplz_consent_status') === 'allow' || jQuery('body').hasClass('cmplz-status-marketing') );
|
1611 |
} else if (typeof window.Cookiebot !== "undefined") { // Cookiebot by Cybot A/S
|
1612 |
this.settings.consentGiven = Cookiebot.consented;
|
1613 |
} else if (typeof window.BorlabsCookie !== 'undefined') { // Borlabs Cookie by Borlabs
|
js/sb-youtube.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var sby_js_exists=void 0!==sby_js_exists;if(!sby_js_exists){function sby_supports_video(){return!!document.createElement("video").canPlayType}!function(e){function i(){var e,i,t,s=s||{VER:"0.9.944"};s.bgs_Available=!1,s.bgs_CheckRunned=!1,function(e){e.fn.extend({sby_imgLiquid:function(i){this.defaults={fill:!0,verticalAlign:"center",horizontalAlign:"center",useBackgroundSize:!0,useDataHtmlAttr:!0,responsive:!0,delay:0,fadeInTime:0,removeBoxBackground:!0,hardPixels:!0,responsiveCheckTime:500,timecheckvisibility:500,onStart:null,onFinish:null,onItemStart:null,onItemFinish:null,onItemError:null},function(){if(!s.bgs_CheckRunned){s.bgs_CheckRunned=!0;var i=e('<span style="background-size:cover" />');e("body").append(i),function(){var e=i[0];if(e&&window.getComputedStyle){var t=window.getComputedStyle(e,null);t&&t.backgroundSize&&(s.bgs_Available="cover"===t.backgroundSize)}}(),i.remove()}}();var t=this;return this.options=i,this.settings=e.extend({},this.defaults,this.options),this.settings.onStart&&this.settings.onStart(),this.each(function(i){function a(){(r.responsive||h.data("sby_imgLiquid_oldProcessed"))&&h.data("sby_imgLiquid_settings")&&(r=h.data("sby_imgLiquid_settings"),l.actualSize=l.get(0).offsetWidth+l.get(0).offsetHeight/1e4,l.sizeOld&&l.actualSize!==l.sizeOld&&o(),l.sizeOld=l.actualSize,setTimeout(a,r.responsiveCheckTime))}function n(){h.data("sby_imgLiquid_error",!0),l.addClass("sby_imgLiquid_error"),r.onItemError&&r.onItemError(i,l,h),d()}function o(){var e,t,s,a,n,o,b,y,u=0,c=0,g=l.width(),f=l.height();void 0===h.data("owidth")&&h.data("owidth",h[0].width),void 0===h.data("oheight")&&h.data("oheight",h[0].height),r.fill===g/f>=h.data("owidth")/h.data("oheight")?(e="100%",t="auto",s=Math.floor(g),a=Math.floor(g*(h.data("oheight")/h.data("owidth")))):(e="auto",t="100%",s=Math.floor(f*(h.data("owidth")/h.data("oheight"))),a=Math.floor(f)),b=g-s,"left"===(n=r.horizontalAlign.toLowerCase())&&(c=0),"center"===n&&(c=.5*b),"right"===n&&(c=b),-1!==n.indexOf("%")&&((n=parseInt(n.replace("%",""),10))>0&&(c=b*n*.01)),y=f-a,"left"===(o=r.verticalAlign.toLowerCase())&&(u=0),"center"===o&&(u=.5*y),"bottom"===o&&(u=y),-1!==o.indexOf("%")&&((o=parseInt(o.replace("%",""),10))>0&&(u=y*o*.01)),r.hardPixels&&(e=s,t=a),h.css({width:e,height:t,"margin-left":Math.floor(c),"margin-top":Math.floor(u)}),h.data("sby_imgLiquid_oldProcessed")||(h.fadeTo(r.fadeInTime,1),h.data("sby_imgLiquid_oldProcessed",!0),r.removeBoxBackground&&l.css("background-image","none"),l.addClass("sby_imgLiquid_nobgSize"),l.addClass("sby_imgLiquid_ready")),r.onItemFinish&&r.onItemFinish(i,l,h),d()}function d(){i===t.length-1&&t.settings.onFinish&&t.settings.onFinish()}var r=t.settings,l=e(this),h=e("img:first",l);return h.length?(h.data("sby_imgLiquid_settings")?(l.removeClass("sby_imgLiquid_error").removeClass("sby_imgLiquid_ready"),r=e.extend({},h.data("sby_imgLiquid_settings"),t.options)):r=e.extend({},t.settings,function(){var e={};if(t.settings.useDataHtmlAttr){var i=l.attr("data-sby_imgLiquid-fill"),a=l.attr("data-sby_imgLiquid-horizontalAlign"),n=l.attr("data-sby_imgLiquid-verticalAlign");("true"===i||"false"===i)&&(e.fill=Boolean("true"===i)),void 0===a||"left"!==a&&"center"!==a&&"right"!==a&&-1===a.indexOf("%")||(e.horizontalAlign=a),void 0===n||"top"!==n&&"bottom"!==n&&"center"!==n&&-1===n.indexOf("%")||(e.verticalAlign=n)}return s.isIE&&t.settings.ieFadeInDisabled&&(e.fadeInTime=0),e}()),h.data("sby_imgLiquid_settings",r),r.onItemStart&&r.onItemStart(i,l,h),void(s.bgs_Available&&r.useBackgroundSize?(-1===l.css("background-image").indexOf(encodeURI(h.attr("src")))&&l.css({"background-image":'url("'+encodeURI(h.attr("src"))+'")'}),l.css({"background-size":r.fill?"cover":"contain","background-position":(r.horizontalAlign+" "+r.verticalAlign).toLowerCase(),"background-repeat":"no-repeat"}),e("a:first",l).css({display:"block",width:"100%",height:"100%"}),e("img",l).css({display:"none"}),r.onItemFinish&&r.onItemFinish(i,l,h),l.addClass("sby_imgLiquid_bgSize"),l.addClass("sby_imgLiquid_ready"),d()):function t(){if(h.data("oldSrc")&&h.data("oldSrc")!==h.attr("src")){var s=h.clone().removeAttr("style");return s.data("sby_imgLiquid_settings",h.data("sby_imgLiquid_settings")),h.parent().prepend(s),h.remove(),(h=s)[0].width=0,void setTimeout(t,10)}return h.data("sby_imgLiquid_oldProcessed")?void o():(h.data("sby_imgLiquid_oldProcessed",!1),h.data("oldSrc",h.attr("src")),e("img:not(:first)",l).css("display","none"),l.css({overflow:"hidden"}),h.fadeTo(0,0).removeAttr("width").removeAttr("height").css({visibility:"visible","max-width":"none","max-height":"none",width:"auto",height:"auto",display:"block"}),h.on("error",n),h[0].onerror=n,function e(){h.data("sby_imgLiquid_error")||h.data("sby_imgLiquid_loaded")||h.data("sby_imgLiquid_oldProcessed")||(l.is(":visible")&&h[0].complete&&h[0].width>0&&h[0].height>0?(h.data("sby_imgLiquid_loaded",!0),setTimeout(o,i*r.delay)):setTimeout(e,r.timecheckvisibility))}(),void a())}())):void n()})}})}(jQuery),e=s.injectCss,i=document.getElementsByTagName("head")[0],(t=document.createElement("style")).type="text/css",t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e)),i.appendChild(t)}function t(){this.feeds={},this.options=sbyOptions,this.isTouch=function(){if("ontouchstart"in document.documentElement)return!0;return!1}()}function s(e,i,t){this.el=e,this.index=i,this.settings=t,this.placeholderURL=window.sby.options.placeholder,t.narrowPlayer&&(this.placeholderURL=window.sby.options.placeholderNarrow),this.playerAPIReady=!1,this.consentGiven=t.consentGiven,this.players={},this.minImageWidth=0,this.imageResolution=150,this.resizedImages={},this.needsResizing=[],this.outOfPages=!1,this.isInitialized=!1,this.mostRecentlyLoadedPosts=[]}function a(){}function n(i,t){e.ajax({url:sbyOptions.adminAjaxUrl,type:"post",data:i,success:t})}t.prototype={createPage:function(i,t){void 0!==window.sbyajaxurl&&-1!==window.sbyajaxurl.indexOf(window.location.hostname)||(window.sbyajaxurl=window.location.hostname+"/wp-admin/admin-ajax.php"),e(".sby_no_js_error_message").remove(),e(".sby_no_js").removeClass("sby_no_js"),i(t)},maybeAddYTAPI:function(){if(null===document.getElementById("sby-youtube-api")){var e=document.createElement("script"),i=document.getElementsByTagName("script")[0];e.src="https://www.youtube.com/iframe_api",e.id="sby-youtube-api",i.parentNode.insertBefore(e,i)}},createLightbox:function(){var i,t=new a,s=(i=0,function(e,t){clearTimeout(i),i=setTimeout(e,t)});jQuery(window).on("resize",function(){s(function(){t.afterResize()},200)}),function(){var i=jQuery,s=function(){function e(){this.fadeDuration=500,this.fitImagesInViewport=!0,this.resizeDuration=700,this.positionFromTop=50,this.showImageNumberLabel=!0,this.alwaysShowNavOnTouchDevices=!1,this.wrapAround=!1}return e.prototype.albumLabel=function(e,i){return e+" / "+i},e}(),a=function(){function s(e){this.options=e,this.album=[],this.currentImageIndex=void 0,this.init()}return s.prototype.init=function(){this.enable(),this.build()},s.prototype.enable=function(){var e=this;i("body").on("click","a[data-sby-lightbox]",function(t){return e.start(i(t.currentTarget)),!1})},s.prototype.build=function(){var e=this;i(""+t.template()).appendTo(i("body")),this.$lightbox=i("#sby_lightbox"),this.$overlay=i("#sby_lightboxOverlay"),this.$outerContainer=this.$lightbox.find(".sby_lb-outerContainer"),this.$container=this.$lightbox.find(".sby_lb-container"),this.containerTopPadding=parseInt(this.$container.css("padding-top"),10),this.containerRightPadding=parseInt(this.$container.css("padding-right"),10),this.containerBottomPadding=parseInt(this.$container.css("padding-bottom"),10),this.containerLeftPadding=parseInt(this.$container.css("padding-left"),10),this.$overlay.hide().on("click",function(){return e.end(),!1}),jQuery(document).on("click",function(e,i,t){jQuery(e.target).closest(".sby_lb-outerContainer").length||jQuery(e.target).closest(".sby_lb-dataContainer").length||(void 0!==window.sbyLightboxPlayer&&YT.get("sby_lb-player").pauseVideo(),jQuery("#sby_lightboxOverlay, #sby_lightbox").fadeOut())}),this.$lightbox.hide(),jQuery("#sby_lightboxOverlay").on("click",function(t){return void 0!==window.sbyLightboxPlayer&&YT.get("sby_lb-player").pauseVideo(),"sby_lightbox"===i(t.target).attr("id")&&e.end(),!1}),this.$lightbox.find(".sby_lb-prev").on("click",function(){return void 0!==window.sbyLightboxPlayer&&YT.get("sby_lb-player").pauseVideo(),e.changeImage(0===e.currentImageIndex?e.album.length-1:e.currentImageIndex-1),!1}),this.$lightbox.find(".sby_lb-container").on("swiperight",function(){return void 0!==window.sbyLightboxPlayer&&YT.get("sby_lb-player").pauseVideo(),e.changeImage(0===e.currentImageIndex?e.album.length-1:e.currentImageIndex-1),!1}),this.$lightbox.find(".sby_lb-next").on("click",function(){return void 0!==window.sbyLightboxPlayer&&YT.get("sby_lb-player").pauseVideo(),e.changeImage(e.currentImageIndex===e.album.length-1?0:e.currentImageIndex+1),!1}),this.$lightbox.find(".sby_lb-container").on("swipeleft",function(){return void 0!==window.sbyLightboxPlayer&&YT.get("sby_lb-player").pauseVideo(),e.changeImage(e.currentImageIndex===e.album.length-1?0:e.currentImageIndex+1),!1}),this.$lightbox.find(".sby_lb-loader, .sby_lb-close").on("click",function(){return void 0!==window.sbyLightboxPlayer&&YT.get("sby_lb-player").pauseVideo(),e.end(),!1})},s.prototype.start=function(e){function s(e){a.album.push(t.getData(e))}var a=this,n=i(window);n.on("resize",i.proxy(this.sizeOverlay,this)),i("select, object, embed").css({visibility:"hidden"}),this.sizeOverlay(),this.album=[];var o,d=0,r=e.attr("data-sby-lightbox");if(r){o=i(e.prop("tagName")+'[data-sby-lightbox="'+r+'"]');for(var l=0;l<o.length;l=++l)s(i(o[l])),o[l]===e[0]&&(d=l)}else if("lightbox"===e.attr("rel"))s(e);else{o=i(e.prop("tagName")+'[rel="'+e.attr("rel")+'"]');for(var h=0;h<o.length;h=++h)s(i(o[h])),o[h]===e[0]&&(d=h)}var b=n.scrollTop()+this.options.positionFromTop,y=n.scrollLeft();this.$lightbox.css({top:b+"px",left:y+"px"}).fadeIn(this.options.fadeDuration),this.changeImage(d)},s.prototype.changeImage=function(e){var t=this;this.disableKeyboardNav();var s=this.$lightbox.find(".sby_lb-image");this.$overlay.fadeIn(this.options.fadeDuration),i(".sby_lb-loader").fadeIn("slow"),this.$lightbox.find(".sby_lb-image, .sby_lb-nav, .sby_lb-prev, .sby_lb-next, .sby_lb-dataContainer, .sby_lb-numbers, .sby_lb-caption").hide(),this.$outerContainer.addClass("animating");var a=new Image;a.onload=function(){var n,o,d,r,l,h;s.attr("src",t.album[e].link),i(a),s.width(a.width),s.height(a.height),t.options.fitImagesInViewport&&(h=i(window).width(),l=i(window).height(),r=h-t.containerLeftPadding-t.containerRightPadding-20-100,d=l-t.containerTopPadding-t.containerBottomPadding-150,(a.width>r||a.height>d)&&(a.width/r>a.height/d?(o=r,n=parseInt(a.height/(a.width/o),10),s.width(o),s.height(n)):(n=d,o=parseInt(a.width/(a.height/n),10),s.width(o),s.height(n)))),t.sizeContainer(s.width(),s.height())},a.src=this.album[e].link,this.currentImageIndex=e},s.prototype.sizeOverlay=function(){this.$overlay.width(i(window).width()).height(i(document).height())},s.prototype.sizeContainer=function(e,i){function t(){s.$lightbox.find(".sby_lb-dataContainer").width(o),s.$lightbox.find(".sby_lb-prevLink").height(d),s.$lightbox.find(".sby_lb-nextLink").height(d),s.showImage()}var s=this,a=this.$outerContainer.outerWidth(),n=this.$outerContainer.outerHeight(),o=e+this.containerLeftPadding+this.containerRightPadding,d=i+this.containerTopPadding+this.containerBottomPadding;a!==o||n!==d?this.$outerContainer.animate({width:o,height:d},this.options.resizeDuration,"swing",function(){t()}):t()},s.prototype.showImage=function(){this.$lightbox.find(".sby_lb-loader").hide(),this.$lightbox.find(".sby_lb-image").fadeIn("slow"),this.updateNav(),this.updateDetails(),this.preloadNeighboringImages(),this.enableKeyboardNav()},s.prototype.updateNav=function(){var e=!1;try{document.createEvent("TouchEvent"),e=!!this.options.alwaysShowNavOnTouchDevices}catch(e){}this.$lightbox.find(".sby_lb-nav").show(),this.album.length>1&&(this.options.wrapAround?(e&&this.$lightbox.find(".sby_lb-prev, .sby_lb-next").css("opacity","1"),this.$lightbox.find(".sby_lb-prev, .sby_lb-next").show()):(this.currentImageIndex>0&&(this.$lightbox.find(".sby_lb-prev").show(),e&&this.$lightbox.find(".sby_lb-prev").css("opacity","1")),this.currentImageIndex<this.album.length-1&&(this.$lightbox.find(".sby_lb-next").show(),e&&this.$lightbox.find(".sby_lb-next").css("opacity","1"))))},s.prototype.updateDetails=function(){var i=this;jQuery("iframe.sby_lb-player-loaded").length&&(jQuery(".sby_lb-player-placeholder").replaceWith(jQuery("iframe.sby_lb-player-loaded")),jQuery("iframe.sby_lb-player-loaded").removeClass("sby_lb-player-loaded").show());var s=window.sby.feeds[this.album[this.currentImageIndex].feedIndex];if(t.beforePlayerSetup(this.$lightbox,this.album[this.currentImageIndex],this.currentImageIndex,this.album,s),sby_supports_video()){if(jQuery("#sby_lightbox").removeClass("sby_video_lightbox"),s.settings.consentGiven&&this.album[this.currentImageIndex].video.length){jQuery(".sby_gdpr_notice").remove();var a="sby_lb-player";jQuery("#sby_lightbox").addClass("sby_video_lightbox");var n=this.album[this.currentImageIndex].video,o=sbyOptions.autoplay;if(void 0===window.sbyLightboxPlayer){var d={host:window.location.protocol+"//www.youtube-nocookie.com",videoId:n,playerVars:{modestbranding:1,rel:0,autoplay:o},events:{onStateChange:function(i){var t=i.target.getVideoData().video_id;s.afterStateChange(a,t,i,e("#"+a).closest(".sby_video_thumbnail_wrap"))}}};s.maybeAddCTA(a),window.sbyLightboxPlayer=new window.YT.Player(a,d)}else window.sbyLightboxPlayer.loadVideoById(n);this.$outerContainer.removeClass("animating"),this.$lightbox.find(".sby_lb-dataContainer").fadeIn(this.options.resizeDuration,function(){return i.sizeOverlay()}),setTimeout(function(){e("#sby_lightbox .sby_lb-player").css({height:e("#sby_lightbox .sby_lb-outerContainer").height()+"px",width:e("#sby_lightbox .sby_lb-outerContainer").width()+"px",top:0})},400),this.$lightbox.find("iframe").length&&this.$lightbox.find("iframe").attr("title",this.album[this.currentImageIndex].videoTitle)}else{var r=e(".sby_item[data-video-id="+this.album[this.currentImageIndex].video+"]").find(".sby_video_thumbnail").attr("data-full-res");e(".sby_lb-image").attr("src",r),this.$outerContainer.removeClass("animating"),this.$lightbox.find(".sby_lb-dataContainer").fadeIn(this.options.resizeDuration,function(){return i.sizeOverlay()}),jQuery(".sby_lb-container").prepend('<a href="https://www.youtube.com/watch?v='+this.album[this.currentImageIndex].video+'" target="_blank" rel="noopener noreferrer" class="sby_gdpr_notice"><svg style="color: rgba(255,255,255,1)" class="svg-inline--fa fa-play fa-w-14 sby_playbtn" aria-label="Play" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="play" role="presentation" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"></path></svg></a>')}t.afterPlayerSetup(this.$lightbox,this.album[this.currentImageIndex],this.currentImageIndex,this.album),this.album.length>1&&this.options.showImageNumberLabel?this.$lightbox.find(".sby_lb-number").text(this.options.albumLabel(this.currentImageIndex+1,this.album.length)).fadeIn("fast"):this.$lightbox.find(".sby_lb-number").hide()}},s.prototype.preloadNeighboringImages=function(){this.album.length>this.currentImageIndex+1&&((new Image).src=this.album[this.currentImageIndex+1].link);this.currentImageIndex>0&&((new Image).src=this.album[this.currentImageIndex-1].link)},s.prototype.enableKeyboardNav=function(){i(document).on("keyup.keyboard",i.proxy(this.keyboardAction,this))},s.prototype.disableKeyboardNav=function(){i(document).off(".keyboard")},s.prototype.keyboardAction=function(i){var t=event.keyCode,s=String.fromCharCode(t).toLowerCase();27===t||s.match(/x|o|c/)?(sby_supports_video()&&e("#sby_lightbox video.sby_video")[0].pause(),e("#sby_lightbox iframe").attr("src",""),this.end()):"p"===s||37===t?(0!==this.currentImageIndex?this.changeImage(this.currentImageIndex-1):this.options.wrapAround&&this.album.length>1&&this.changeImage(this.album.length-1),sby_supports_video()&&e("#sby_lightbox video.sby_video")[0].pause(),e("#sby_lightbox iframe").attr("src","")):"n"!==s&&39!==t||(this.currentImageIndex!==this.album.length-1?this.changeImage(this.currentImageIndex+1):this.options.wrapAround&&this.album.length>1&&this.changeImage(0),void 0!==window.sbyLightboxPlayer&&YT.get("sby_lb-player").pauseVideo())},s.prototype.end=function(){this.disableKeyboardNav(),i(window).off("resize",this.sizeOverlay),this.$lightbox.fadeOut(this.options.fadeDuration),this.$overlay.fadeOut(this.options.fadeDuration),i("select, object, embed").css({visibility:"visible"})},s}();i(function(){var i=new s;new a(i),e(".sby_lightbox_action a").off().on("click",function(){e(this).parent().find(".sby_lightbox_tooltip").toggle()})})}.call(this)},createFeeds:function(i){window.sby.createLightbox(),i.whenFeedsCreated(e(".sb_youtube").each(function(i){e(this).attr("data-sby-index",i+1),e(this).find(".sby_player").replaceWith('<div id="sby_player'+i+'"></div>');var t=e(this),a=void 0!==t.attr("data-sby-flags")?t.attr("data-sby-flags").split(","):[],o=void 0!==t.attr("data-options")?JSON.parse(t.attr("data-options")):{};if(a.indexOf("testAjax")>-1){window.sby.triggeredTest=!0;n({action:"sby_on_ajax_test_trigger"},function(e){console.log("did test")})}var d={cols:t.attr("data-cols"),colsmobile:"same"!==t.attr("data-colsmobile")?t.attr("data-colsmobile"):t.attr("data-cols"),num:t.attr("data-num"),imgRes:t.attr("data-res"),feedID:t.attr("data-feedid"),postID:"undefind"!=typeof t.attr("data-postid")?t.attr("data-postid"):"unknown",shortCodeAtts:t.attr("data-shortcode-atts"),resizingEnabled:-1===a.indexOf("resizeDisable"),imageLoadEnabled:-1===a.indexOf("imageLoadDisable"),debugEnabled:a.indexOf("debug")>-1,favorLocal:a.indexOf("favorLocal")>-1,ajaxPostLoad:a.indexOf("ajaxPostLoad")>-1,checkWPPosts:a.indexOf("checkWPPosts")>-1,cacheAll:a.indexOf("cacheAll")>-1,gdpr:a.indexOf("gdpr")>-1,consentGiven:-1===a.indexOf("gdpr"),noCDN:a.indexOf("disablecdn")>-1,lightboxEnabled:void 0!==t.attr("data-sby-supports-lightbox"),locator:a.indexOf("locator")>-1,autoMinRes:1,general:o};window.sby.feeds[i]=function(e,i,t){return new s(e,i,t)}(this,i,d),void 0!==window.sbyAPIReady&&(window.sby.feeds[i].playerAPIReady=!0),window.sby.feeds[i].setResizedImages(),window.sby.feeds[i].init();var r=jQuery.Event("sbyafterfeedcreate");r.feed=window.sby.feeds[i],jQuery(window).trigger(r)}))},afterFeedsCreated:function(){e(".sb_instagram_header").each(function(){var i=e(this);i.find(".sby_header_link").on("mouseenter mouseleave",function(e){switch(e.type){case"mouseenter":i.find(".sby_header_img_hover").addClass("sby_fade_in");break;case"mouseleave":i.find(".sby_header_img_hover").removeClass("sby_fade_in")}})})},encodeHTML:function(e){return void 0===e?"":e.replace(/(>)/g,">").replace(/(<)/g,"<").replace(/(<br\/>)/g,"<br>").replace(/(<br>)/g,"<br>")},urlDetect:function(e){return e.match(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&\/\/=]*)/g)}},s.prototype={init:function(){var i=this;i.settings.consentGiven=i.checkConsent(),i.settings.consentGiven&&window.sby.maybeAddYTAPI(),i.settings.noCDN&&!i.settings.consentGiven&&(e(this.el).find(".sb_youtube_header").length?e(this.el).find(".sb_youtube_header").addClass("sby_no_consent"):e(this.el).prev(".sb_youtube_header").length&&e(this.el).prev(".sb_youtube_header").addClass("sby_no_consent")),e(this.el).find("#sby_mod_error").length&&e(this.el).prepend(e(this.el).find("#sby_mod_error")),this.settings.ajaxPostLoad?this.getNewPostSet():this.afterInitialImagesLoaded();var t,s=(t=0,function(e,i){clearTimeout(t),t=setTimeout(e,i)});jQuery(window).on("resize",function(){s(function(){i.afterResize()},500)})},initLayout:function(){this.initGalleryLayout(),this.initGrid()},initGalleryLayout:function(){var i=e(this.el),t=this;i.hasClass("sby_layout_gallery")&&i.find(".sby_player_outer_wrap").length&&(this.maybeRaiseSingleImageResolution(i.find(".sby_player_outer_wrap"),0,!0),i.find(".sby_player_outer_wrap .sby_video_thumbnail").off().on("click",function(i){if((!t.settings.lightboxEnabled||t.settings.lightboxEnabled&&t.settings.noCDN)&&(t.settings.noCDN||!t.settings.consentGiven))return e(this).closest(".sby_item").length,void(void 0!==e(this).closest(".sby_item").attr("data-video-id")&&e(this).attr("href","https://www.youtube.com/watch?v="+e(this).closest(".sby_item").attr("data-video-id")));i.preventDefault(),t.onThumbnailClick(e(this),!0)}),i.find(".sby_item").first().addClass("sby_current"),i.mouseenter(function(){t.canCreatePlayer()&&(i.find(".sby_player_outer_wrap iframe").length?void 0===t.player&&t.playerEagerLoaded()&&t.createPlayer("sby_player"+t.index):(i.addClass("sby_player_added").find(".sby_player_outer_wrap").addClass("sby_player_loading"),i.find(".sby_player_outer_wrap .sby_video_thumbnail").find(".sby_loader").show().removeClass("sby_hidden"),t.createPlayer("sby_player"+t.index)))}),window.sbySemiEagerLoading&&t.createPlayer("sby_player"+t.index),t.settings.noCDN&&i.find(".sby_player_outer_wrap").append('<div class="sby_play_btn">\n <span class="sby_play_btn_bg"></span>\n <svg aria-hidden="true" focusable="false" data-prefix="fab" data-icon="youtube" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" class="svg-inline--fa fa-youtube fa-w-18"><path fill="currentColor" d="M549.655 124.083c-6.281-23.65-24.787-42.276-48.284-48.597C458.781 64 288 64 288 64S117.22 64 74.629 75.486c-23.497 6.322-42.003 24.947-48.284 48.597-11.412 42.867-11.412 132.305-11.412 132.305s0 89.438 11.412 132.305c6.281 23.65 24.787 41.5 48.284 47.821C117.22 448 288 448 288 448s170.78 0 213.371-11.486c23.497-6.321 42.003-24.171 48.284-47.821 11.412-42.867 11.412-132.305 11.412-132.305s0-89.438-11.412-132.305zm-317.51 213.508V175.185l142.739 81.205-142.739 81.201z" class=""></path></svg> </div>'))},createPlayer:function(i,t,s,a){var n=e(this.el),o=this;if(t=void 0!==t?t:this.getVideoID(n.find(".sby_item").first()),s=void 0!==s?s:0,void 0===a&&(a={host:window.location.protocol+"//www.youtube-nocookie.com",videoId:t,playerVars:{modestbranding:1,rel:0,autoplay:s}}),void 0===a.events&&(a.events={onReady:function(){n.find(".sby_player_outer_wrap").removeClass("sby_player_loading").find(".sby_video_thumbnail").css("z-index",-1).find(".sby_loader").hide().addClass("sby_hidden"),e("#"+i).length&&e("#"+i).closest(".sby_video_thumbnail_wrap").find(".sby_video_thumbnail").length&&e("#"+i).closest(".sby_video_thumbnail_wrap").find(".sby_video_thumbnail").fadeTo(0,"slow",function(){e(this).css("z-index",-1),e(this).find(".sby_loader").hide().addClass("sby_hidden"),e(this).closest(".sby_item").removeClass("sby_player_loading")});var t=jQuery.Event("sbyafterplayerready");t.feed=o,t.player=this,jQuery(window).trigger(t)},onStateChange:function(s){n.find(".sby_player_outer_wrap").removeClass("sby_player_loading").find(".sby_video_thumbnail").css("z-index",-1).find(".sby_loader").hide().addClass("sby_hidden"),o.afterStateChange(i,t,s,e("#"+i).closest(".sby_video_thumbnail_wrap")),1===s.data&&void 0!==o.players&&n.find(".sby_item").each(function(){var i=o.getVideoID(e(this));e(this).find("iframe").length&&i!==t&&void 0!==o.players[i]&&"function"==typeof o.players[i].pauseVideo&&o.players[i].pauseVideo()})}}),window.sbyEagerLoading)var d=YT.get(i);else d=new window.YT.Player(i,a);this.maybeAddCTA(i),n.hasClass("sby_layout_list")&&void 0===this.players[t]?this.players[t]=d:void 0===this.player&&(this.player=d);var r=jQuery.Event("sbyafterplayercreated");return r.feed=this,jQuery(window).trigger(r),n.find(".sby_player_outer_wrap .sby_play_btn").remove(),d},afterStateChange:function(e,i,t,s){},afterInitialImagesLoaded:function(){this.initLayout(),this.loadMoreButtonInit(),this.hideExtraItemsForWidth(),this.beforeNewImagesRevealed(),this.revealNewImages(),this.afterNewImagesRevealed(),this.afterFeedSet(),this.sizePlayer(),this.sizeItems(),this.settings.consentGiven?this.applyFullFeatures():this.removeFeatures()},afterResize:function(){this.setImageHeight(),this.setImageResolution(),this.maybeRaiseImageResolution(),this.setImageSizeClass(),this.sizePlayer(),this.sizeItems()},afterLoadMoreClicked:function(e){e.find(".sby_loader").removeClass("sby_hidden"),e.find(".sby_btn_text").addClass("sby_hidden"),e.closest(".sb_youtube").find(".sby_num_diff_hide").addClass("sby_transition").removeClass("sby_num_diff_hide")},afterNewImagesLoaded:function(){var i=e(this.el),t=this;this.beforeNewImagesRevealed(),this.revealNewImages(),this.afterNewImagesRevealed(),this.sizePlayer(),this.sizeItems(),setTimeout(function(){i.find(".sby_loader").addClass("sby_hidden"),i.find(".sby_btn_text").removeClass("sby_hidden"),t.maybeRaiseImageResolution()},500),this.settings.consentGiven?this.applyFullFeatures():this.removeFeatures()},beforeNewImagesRevealed:function(){this.setImageHeight(),this.maybeRaiseImageResolution(!0),this.setImageSizeClass()},afterFeedSet:function(){},sizePlayer:function(){var i=e(this.el),t=this;if(i.hasClass("sby_layout_gallery")){$playerThumbnail=i.find(".sby_player_item").find(".sby_player_video_thumbnail");var s=$playerThumbnail.innerWidth(),a=Math.floor(9*s/16);t.settings.narrowPlayer&&(a=Math.floor(3*s/4)),$playerThumbnail.css("height",a+"px").css("overflow","hidden")}else i.hasClass("sby_layout_list")&&i.find(".sby_item").each(function(){$playerThumbnail=e(this).find(".sby_item_video_thumbnail");var i=$playerThumbnail.innerWidth(),s=Math.floor(9*i/16);t.settings.narrowPlayer&&(s=Math.floor(3*i/4)),$playerThumbnail.css("height",s+"px").css("overflow","hidden")})},sizeItems:function(){var i=e(this.el);i.hasClass("sby_layout_list")||i.find(".sby_item").find(".sby_item_video_thumbnail").each(function(){if(e(this).hasClass("sby_imgLiquid_ready")){var i=e(this).innerWidth(),t=Math.floor(9*i/16);e(this).css("height",t+"px").css("overflow","hidden")}})},revealNewImages:function(){var i=e(this.el),t=this;this.applyImageLiquid(),"function"==typeof sbyCustomJS&&setTimeout(function(){sbyCustomJS()},100),i.find(".sby-screenreader").find("img").remove(),i.find(".sby_item.sby_new").each(function(i){var s=jQuery(this),a=s.attr("data-video-id");window.sbyEagerLoading&&t.canCreatePlayer()&&e("#sby_player_"+a).length&&(player=new YT.Player("sby_player_"+a,{height:"100",width:"100",videoId:a,playerVars:{modestbranding:1,rel:0,autoplay:0},events:{onStateChange:function(e){e.target.getVideoData().video_id;1===e.data&&s.find(".sby_item").each(function(){var i=jQuery(this).attr("data-video-id");jQuery(this).find("iframe").length&&jQuery(e.target.a).attr("id")!==jQuery(this).find("iframe").attr("id")&&YT.get("sby_player_"+i).pauseVideo()})}}})),s.find(".sby_video_thumbnail").on("mouseenter",function(){t.onThumbnailEnter(e(this),!1)}),s.find(".sby_player_wrap").on("mouseleave",function(){t.onThumbnailLeave(e(this),!1)}),s.find(".sby_video_thumbnail").on("click",function(i){if((!t.settings.lightboxEnabled||t.settings.lightboxEnabled&&t.settings.noCDN)&&(t.settings.noCDN||!t.settings.consentGiven))return e(this).closest(".sby_item").length,void(void 0!==e(this).closest(".sby_item").attr("data-video-id")&&e(this).attr("href","https://www.youtube.com/watch?v="+e(this).closest(".sby_item").attr("data-video-id")));i.preventDefault(),t.onThumbnailClick(e(this),!1)}),t.settings.lightboxEnabled&&(s.find(".sby_video_thumbnail").attr("data-sby-lightbox",t.index),"undefined"!=typeof sbyOptions&&void 0!==sbyOptions.lightboxPlaceholder&&(t.settings.narrowPlayer?s.find(".sby_video_thumbnail").attr("href",sbyOptions.lightboxPlaceholderNarrow):s.find(".sby_video_thumbnail").attr("href",sbyOptions.lightboxPlaceholder))),t.afterItemRevealed(s),""===s.find(".sby_info_item").text().trim()&&s.find(".sby_info_item").addClass("sby_no_space")}),i.find(".sby_player_item").each(function(e){var i=jQuery(this);t.afterItemRevealed(i)}),setTimeout(function(){i.find(".sby_item.sby_new").removeClass("sby_new");var e=10;i.find(".sby_transition").length;i.find(".sby_transition").each(function(i){var t=jQuery(this);setTimeout(function(){t.removeClass("sby_transition")},e),e+=10})},500)},afterItemRevealed:function(){},afterNewImagesRevealed:function(){this.listenForVisibilityChange(),this.sendNeedsResizingToServer(),this.sendCheckWPPostsToServer(),this.settings.imageLoadEnabled||e(".sby_no_resraise").removeClass("sby_no_resraise");var i=e.Event("sbyafterimagesloaded");i.el=e(this.el),e(window).trigger(i)},setResizedImages:function(){e(this.el).find(".sby_resized_image_data").length&&void 0!==e(this.el).find(".sby_resized_image_data").attr("data-resized")&&0===e(this.el).find(".sby_resized_image_data").attr("data-resized").indexOf('{"')&&(this.resizedImages=JSON.parse(e(this.el).find(".sby_resized_image_data").attr("data-resized")),e(this.el).find(".sby_resized_image_data").remove())},sendNeedsResizingToServer:function(){var i=this;if(i.needsResizing.length>0&&i.settings.resizingEnabled){var t=e(this.el).find(".sby_item").length;n({action:"sby_resized_images_submit",needs_resizing:i.needsResizing,offset:t,feed_id:i.settings.feedID,location:i.locationGuess(),post_id:i.settings.postID,atts:i.settings.shortCodeAtts},function(e){if(0===e.trim().indexOf("{")){var t=JSON.parse(e);i.settings.debugEnabled&&console.log(t)}})}},sendCheckWPPostsToServer:function(){var i=this;if(i.settings.checkWPPosts||i.settings.singleCheckPosts){var t=void 0!==i.settings.feedID?i.settings.feedID:"sby_single",s=i.mostRecentlyLoadedPosts;i.mostRecentlyLoadedPosts=[];n({action:"sby_check_wp_submit",feed_id:t,atts:i.settings.shortCodeAtts,location:i.locationGuess(),post_id:i.settings.postID,offset:e(this.el).hasClass("sby_layout_carousel")?Math.floor(e(this.el).find(".sby_item").length/2-1):e(this.el).find(".sby_item").length,posts:s,cache_all:i.settings.cacheAll},function(e){if(0===e.trim().indexOf("{")){var t=JSON.parse(e);i.settings.debugEnabled&&console.log(t),i.afterSendCheckWPPostsToServer(t)}})}},afterSendCheckWPPostsToServer:function(e){},loadMoreButtonInit:function(){var i=e(this.el),t=this;i.find(".sby_footer .sby_load_btn").off().on("click",function(){t.afterLoadMoreClicked(jQuery(this)),t.getNewPostSet()})},getNewPostSet:function(){var i=e(this.el),t=this;n({action:"sby_load_more_clicked",offset:i.find(".sby_item").length,feed_id:t.settings.feedID,location:t.locationGuess(),post_id:t.settings.postID,atts:t.settings.shortCodeAtts,current_resolution:t.imageResolution},function(s){if(0===s.trim().indexOf("{")){var a=JSON.parse(s),n=void 0!==a.feedStatus.checkWPPosts&&a.feedStatus.checkWPPosts;t.settings.debugEnabled&&console.log(a),t.settings.checkWPPosts=!!n,t.appendNewPosts(a.html),t.addResizedImages(a.resizedImages),t.settings.ajaxPostLoad?(t.settings.ajaxPostLoad=!1,t.afterInitialImagesLoaded()):t.afterNewImagesLoaded(),a.feedStatus.shouldPaginate?t.outOfPages=!1:(t.outOfPages=!0,i.find(".sby_load_btn").hide()),e(".sby_no_js").removeClass("sby_no_js")}})},appendNewPosts:function(i){var t=e(this.el);t.find(".sby_items_wrap .sby_item").length?t.find(".sby_items_wrap .sby_item").last().after(i):t.find(".sby_items_wrap").append(i)},addResizedImages:function(e){for(var i in e)this.resizedImages[i]=e[i]},setImageHeight:function(){},maybeRaiseSingleImageResolution:function(i,t,s){var a=this,n=a.getImageUrls(i),o=i.find(".sby_video_thumbnail > img").attr("src"),d=150;s=void 0!==s&&s;if(!(i.hasClass("sby_no_resraise")||!a.settings.consentGiven&&a.settings.noCDN)){e.each(n,function(e,i){i===o&&(d=parseInt(e),s=!1)});var r=640;switch(a.settings.imgRes){case"thumb":r=120;break;case"medium":r=320;break;case"large":r=480;break;case"full":r=640;break;default:var l=Math.max(a.settings.autoMinRes,i.find(".sby_video_thumbnail").innerWidth());switch(a.getBestResolutionForAuto(l,1,e(this.el).find("sby_item").first())){case 480:r=480;break;case 320:r=320;break;case 120:r=120}}if(r>d||o===a.placeholderURL||s){if(a.settings.debugEnabled){var h=o===a.placeholderURL?"was placeholder":"too small";console.log("rais res for "+o,h)}var b=n[r];i.find(".sby_video_thumbnail > img").attr("src",b),i.find(".sby_video_thumbnail").hasClass("sby_imgLiquid_ready")&&i.find(".sby_video_thumbnail").css("background-image",'url("'+b+'")')}i.find("img").on("error",function(){if(e(this).hasClass("sby_img_error"))console.log("unfixed error "+e(this).attr("src"));else{if(e(this).addClass("sby_img_error"),e(this).attr("src").indexOf("i.ytimg.com")>-1)a.settings.favorLocal=!0,a.getImageUrls(e(this).closest(".sby_item"))[640];else void 0!==e(this).closest(".sby_video_thumbnail").attr("data-full-res")||e(this).closest(".sby_video_thumbnail").attr("href");setTimeout(function(){a.afterResize()},1500)}})}},maybeRaiseImageResolution:function(i){var t=this,s=void 0!==i&&!0===i?".sby_item.sby_new":".sby_item",a=!t.isInitialized;e(t.el).find(s).each(function(i){!e(this).hasClass("sby_num_diff_hide")&&e(this).find(".sby_video_thumbnail").length&&void 0!==e(this).find(".sby_video_thumbnail").attr("data-img-src-set")&&t.maybeRaiseSingleImageResolution(e(this),i,a)}),t.isInitialized=!0},getBestResolutionForAuto:function(i,t,s){(isNaN(t)||t<1)&&(t=1);var a=i*t,n=10*Math.ceil(a/10),o=[120,320,480,640];if(s.hasClass("sby_highlighted")&&(n*=2),-1===o.indexOf(parseInt(n))){var d=!1;e.each(o,function(e,i){i>parseInt(n)&&!d&&(n=i,d=!0)})}return n},hideExtraItemsForWidth:function(){if("carousel"!==this.layout){var i=e(this.el),t=void 0!==i.attr("data-num")&&""!==i.attr("data-num")?parseInt(i.attr("data-num")):1,s=void 0!==i.attr("data-nummobile")&&""!==i.attr("data-nummobile")?parseInt(i.attr("data-nummobile")):t;i.hasClass(".sby_layout_carousel")||(e(window).width()<480?s<i.find(".sby_item").length&&i.find(".sby_item").slice(s-i.find(".sby_item").length).addClass("sby_num_diff_hide"):t<i.find(".sby_item").length&&i.find(".sby_item").slice(t-i.find(".sby_item").length).addClass("sby_num_diff_hide"))}},setImageSizeClass:function(){var i=e(this.el);i.removeClass("sby_small sby_medium");var t=i.innerWidth(),s=parseInt(i.find(".sby_items_wrap").outerWidth()-i.find(".sby_items_wrap").width())/2,a=this.getColumnCount(),n=(t-s*(a+2))/a;n>140&&n<240?i.addClass("sby_medium"):n<=140&&i.addClass("sby_small")},setMinImageWidth:function(){e(this.el).find(".sby_item .sby_video_thumbnail").first().length?this.minImageWidth=e(this.el).find(".sby_item .sby_video_thumbnail").first().innerWidth():this.minImageWidth=150},setImageResolution:function(){if("auto"===this.settings.imgRes)this.imageResolution="auto";else switch(this.settings.imgRes){case"thumb":this.imageResolution=150;break;case"medium":this.imageResolution=320;break;default:this.imageResolution=640}},getImageUrls:function(e){var i=JSON.parse(e.find(".sby_video_thumbnail").attr("data-img-src-set").replace(/\\\//g,"/")),t=e.attr("id").replace("sby_","").replace("player_","");if(void 0!==this.resizedImages[t]&&"video"!==this.resizedImages[t]&&"pending"!==this.resizedImages[t]&&"error"!==this.resizedImages[t].id&&"video"!==this.resizedImages[t].id&&"pending"!==this.resizedImages[t].id){if(void 0!==this.resizedImages[t].sizes){var s=[];void 0!==this.resizedImages[t].sizes.full&&(s.push(640),i[640]=sbyOptions.resized_url+this.resizedImages[t].id+"full.jpg",e.find(".sby_link_area").attr("href",sbyOptions.resized_url+this.resizedImages[t].id+"full.jpg"),e.find(".sby_video_thumbnail").attr("data-full-res",sbyOptions.resized_url+this.resizedImages[t].id+"full.jpg")),void 0!==this.resizedImages[t].sizes.low&&(s.push(320),i[320]=sbyOptions.resized_url+this.resizedImages[t].id+"low.jpg",this.settings.favorLocal&&void 0===this.resizedImages[t].sizes.full&&(e.find(".sby_link_area").attr("href",sbyOptions.resized_url+this.resizedImages[t].id+"low.jpg"),e.find(".sby_video_thumbnail").attr("data-full-res",sbyOptions.resized_url+this.resizedImages[t].id+"low.jpg"))),void 0!==this.resizedImages[t].sizes.thumb&&(s.push(150),i[150]=sbyOptions.resized_url+this.resizedImages[t].id+"thumb.jpg"),this.settings.favorLocal&&(-1===s.indexOf(640)&&s.indexOf(320)>-1&&(i[640]=sbyOptions.resized_url+this.resizedImages[t].id+"low.jpg"),-1===s.indexOf(320)&&(s.indexOf(640)>-1?i[320]=sbyOptions.resized_url+this.resizedImages[t].id+"full.jpg":s.indexOf(150)>-1&&(i[320]=sbyOptions.resized_url+this.resizedImages[t].id+"thumb.jpg")),-1===s.indexOf(150)&&(s.indexOf(320)>-1?i[150]=sbyOptions.resized_url+this.resizedImages[t].id+"low.jpg":s.indexOf(640)>-1&&(i[150]=sbyOptions.resized_url+this.resizedImages[t].id+"full.jpg")))}}else(void 0===this.resizedImages[t]||void 0!==this.resizedImages[t].id&&"pending"!==this.resizedImages[t].id&&"error"!==this.resizedImages[t].id)&&this.addToNeedsResizing(t);return i},getVideoID:function(i){if(i.hasClass("sby_item")||i.hasClass("sby_player_item")){if(void 0!==i.find(".sby_video_thumbnail").attr("data-video-id"))return i.find(".sby_video_thumbnail").attr("data-video-id")}else if(i.closest("sby_item").length||i.closest("sby_player_item").length){var t=i.closest("sby_item").length?i.closest("sby_item"):i.closest("sby_player_item");if(void 0!==t.find(".sby_video_thumbnail").attr("data-video-id"))return t.find(".sby_video_thumbnail").attr("data-video-id")}else{if(i.hasClass("sb_youtube"))return i.find(".sby_item").first().find(".sby_video_thumbnail").attr("data-video-id");if(e(this.el).find(".sby_video_thumbnail").first().length&&void 0!==e(this.el).find(".sby_video_thumbnail").first().attr("data-video-id"))return e(this.el).find(".sby_video_thumbnail").first().attr("data-video-id")}return""},getAvatarUrl:function(e,i){if(""===e)return"";var t=this.settings.general.avatars;return"local"===(i=void 0!==i?i:"local")?void 0!==t["LCL"+e]&&1===parseInt(t["LCL"+e])?sbyOptions.resized_url+e+".jpg":void 0!==t[e]?t[e]:"":void 0!==t[e]?t[e]:void 0!==t["LCL"+e]&&1===parseInt(t["LCL"+e])?sbyOptions.resized_url+e+".jpg":""},addToNeedsResizing:function(e){-1===this.needsResizing.indexOf(e)&&this.needsResizing.push(e)},applyImageLiquid:function(){var t=e(this.el);i(),"function"==typeof t.find(".sby_player_item").sby_imgLiquid&&(t.find(".sby_player_item").length&&t.find(".sby_player_item .sby_player_video_thumbnail").sby_imgLiquid({fill:!0}),t.find(".sby_item .sby_item_video_thumbnail").sby_imgLiquid({fill:!0}))},listenForVisibilityChange:function(){var i,t,s,a=this;i=jQuery,t={callback:function(){},runOnLoad:!0,frequency:100,sbyPreviousVisibility:null},s={sbyCheckVisibility:function(e,i){if(jQuery.contains(document,e[0])){var t=i.sbyPreviousVisibility,a=e.is(":visible");i.sbyPreviousVisibility=a,null==t?i.runOnLoad&&i.callback(e,a):t!==a&&i.callback(e,a),setTimeout(function(){s.sbyCheckVisibility(e,i)},i.frequency)}}},i.fn.sbyVisibilityChanged=function(e){var a=i.extend({},t,e);return this.each(function(){s.sbyCheckVisibility(i(this),a)})},"function"==typeof e(this.el).filter(":hidden").sbyVisibilityChanged&&e(this.el).filter(":hidden").sbyVisibilityChanged({callback:function(e,i){a.afterResize()},runOnLoad:!1})},getColumnCount:function(){var i=e(this.el),t=this.settings.cols,s=this.settings.colsmobile,a=t;return sbyWindowWidth=window.innerWidth,i.hasClass("sby_mob_col_auto")?(sbyWindowWidth<640&&parseInt(t)>2&&parseInt(t)<7&&(a=2),sbyWindowWidth<640&&parseInt(t)>6&&parseInt(t)<11&&(a=4),sbyWindowWidth<=480&&parseInt(t)>2&&(a=1)):sbyWindowWidth<=480&&(a=s),parseInt(a)},onThumbnailClick:function(i,t,s){if(this.canCreatePlayer()){var a=e(this.el);if(a.hasClass("sby_layout_gallery"))if(a.find(".sby_current").removeClass("sby_current"),i.closest(".sby_item").addClass("sby_current"),i.closest(".sby_item").addClass("sby_current"),a.addClass("sby_player_added").find(".sby_player_outer_wrap").addClass("sby_player_loading"),a.find(".sby_player_outer_wrap .sby_video_thumbnail").find(".sby_loader").show().removeClass("sby_hidden"),a.find(".sby_player_outer_wrap iframe").length)if(t){s=void 0===s?this.getVideoID(a.find(".sby_item").first()):s;this.playVideoInPlayer(s)}else{s=void 0===s?this.getVideoID(i.closest(".sby_item")):s;this.changePlayerInfo(i.closest(".sby_item")),this.playVideoInPlayer(s),this.afterVideoChanged()}else if(t)this.createPlayer("sby_player"+this.index);else{var s=void 0===s?this.getVideoID(i.closest(".sby_item")):s;this.createPlayer("sby_player"+this.index,s)}else if(e(this.el).hasClass("sby_layout_grid")||e(this.el).hasClass("sby_layout_carousel")){var n=i.closest(".sby_item");s=void 0===s?this.getVideoID(n):s;this.playVideoInPlayer(s),this.afterVideoChanged()}else if(e(this.el).hasClass("sby_layout_list")){n=i.closest(".sby_item"),s=void 0===s?this.getVideoID(n):s;n.length&&!n.find("iframe").length?(n.find(".sby_loader").show().removeClass("sby_hidden"),n.addClass("sby_player_loading sby_player_loaded"),this.createPlayer("sby_player_"+s,s)):(this.playVideoInPlayer(s,n.attr("data-video-id")),this.afterVideoChanged())}}},onThumbnailEnter:function(i){if(this.canCreatePlayer()&&e(this.el).hasClass("sby_layout_list")){var t=i.closest(".sby_item"),s=this.getVideoID(t);t.find("iframe").length||(t.find(".sby_loader").show().removeClass("sby_hidden"),t.addClass("sby_player_loading sby_player_loaded"),this.createPlayer("sby_player_"+s,s,0))}},onThumbnailLeave:function(e){},changePlayerInfo:function(e){},playerEagerLoaded:function(){if(void 0!==this.player||e(this.el).hasClass("sby_player_loaded"))return!0},initGrid:function(){if(window.sbySemiEagerLoading&&jQuery("#sby_lightbox").length){var i=this;playerID="sby_lb-player",jQuery("#sby_lightbox").addClass("sby_video_lightbox");var t=e(this.el).find("sby_item").first().attr("data-video-id"),s=sbyOptions.autoplay;if(void 0===window.sbyLightboxPlayer){var a={host:window.location.protocol+"//www.youtube-nocookie.com",videoId:t,playerVars:{modestbranding:1,rel:0,autoplay:s},events:{onStateChange:function(t){var s=t.target.getVideoData().video_id;i.afterStateChange(playerID,s,t,e("#"+playerID).closest(".sby_video_thumbnail_wrap"))}}};i.maybeAddCTA(playerID),window.sbyLightboxPlayer=new window.YT.Player(playerID,a)}}},maybeAddCTA:function(e,i){},canCreatePlayer:function(){return!e(this.el).find("#sby_blank").length&&(this.playerEagerLoaded()||this.playerAPIReady&&this.settings.consentGiven||window.sbyAPIReady&&this.settings.consentGiven)},playVideoInPlayer:function(e,i){void 0!==this.player&&void 0!==this.player.loadVideoById?this.player.loadVideoById(e):void 0!==window.sbyLightboxPlayer&&void 0!==window.sbyLightboxPlayer.loadVideoById?window.sbyLightboxPlayer.loadVideoById(e):void 0!==i&&void 0!==this.players&&void 0!==this.players[i]&&void 0!==this.players[i].loadVideoById&&this.players[i].loadVideoById(e)},afterVideoChanged:function(){e(this.el).hasClass("sby_layout_gallery")&&(e(this.el).find(".sby_player_outer_wrap").removeClass("sby_player_loading"),e(this.el).find(".sby_player_outer_wrap .sby_video_thumbnail").find(".sby_loader").hide().addClass("sby_hidden"),e(window).width()<480&&e("html, body").animate({scrollTop:e(this.el).find(".sby_player_outer_wrap").offset().top},300))},checkConsent:function(){if(this.settings.consentGiven||!this.settings.gdpr)return this.settings.noCDN=!1,!0;if("undefined"!=typeof CLI_Cookie)null!==CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME)&&(null!==CLI_Cookie.read("cookielawinfo-checkbox-non-necessary")&&(this.settings.consentGiven="yes"===CLI_Cookie.read("cookielawinfo-checkbox-non-necessary")),null!==CLI_Cookie.read("cookielawinfo-checkbox-necessary")&&(this.settings.consentGiven="yes"===CLI_Cookie.read("cookielawinfo-checkbox-necessary")));else if(void 0!==window.cnArgs){var e=("; "+document.cookie).split("; cookie_notice_accepted=");if(2===e.length){var i=e.pop().split(";").shift();this.settings.consentGiven="true"===i}}else void 0!==window.cookieconsent?this.settings.consentGiven="allow"===function(e){for(var i=e+"=",t=window.document.cookie.split(";"),s=0;s<t.length;s++){var a=t[s].trim();if(0==a.indexOf(i))return a.substring(i.length,a.length)}return""}("complianz_consent_status"):void 0!==window.Cookiebot?this.settings.consentGiven=Cookiebot.consented:void 0!==window.BorlabsCookie&&(this.settings.consentGiven=window.BorlabsCookie.checkCookieConsent("youtube"));var t=jQuery.Event("sbycheckconsent");return t.feed=this,jQuery(window).trigger(t),this.settings.consentGiven&&(this.settings.noCDN=!1),this.settings.consentGiven},afterConsentToggled:function(){if(this.checkConsent()){var e=this;window.sby.maybeAddYTAPI(),e.maybeRaiseImageResolution(),e.applyFullFeatures(),setTimeout(function(){e.afterResize()},500)}},removeFeatures:function(){this.settings.noCDN&&e(this.el).find(".sby_video_thumbnail").each(function(){e(this).removeAttr("data-sby-lightbox")})},applyFullFeatures:function(){var i=this;e(i.el).find(".sby_header_img img").attr("src",e(i.el).find(".sby_header_img").attr("data-avatar-url")),void 0===e(i.el).find(".sby_video_thumbnail").first().attr("data-sby-lightbox")&&i.settings.lightboxEnabled&&e(i.el).find(".sby_video_thumbnail").each(function(){e(this).attr("data-sby-lightbox",i.index)});var t=e(i.el);if(t.find(".sby_no_consent").removeClass("sby_no_consent"),t.hasClass("sby_layout_gallery")&&t.find(".sby_player_outer_wrap").length){if(this.maybeRaiseSingleImageResolution(t.find(".sby_player_outer_wrap"),0,!0),t.find(".sby_item").first().addClass("sby_current"),!i.canCreatePlayer())return;t.find(".sby_player_outer_wrap iframe").length||i.createPlayer("sby_player"+i.index)}},locationGuess:function(){var i=e(this.el),t="content";return i.closest("footer").length?t="footer":i.closest(".header").length||i.closest("header").length?t="header":(i.closest(".sidebar").length||i.closest("aside").length)&&(t="sidebar"),t}},a.prototype={getData:function(e){return{feedIndex:parseInt(e.closest(".sb_youtube").attr("data-sby-index")-1),link:e.attr("href"),videoTitle:void 0!==e.attr("data-video-title")?e.attr("data-video-title"):"YouTube Video",video:e.attr("data-video-id")}},template:function(){return"<div id='sby_lightboxOverlay' class='sby_lightboxOverlay'></div><div id='sby_lightbox' class='sby_lightbox'><div class='sby_lb-outerContainer'><div class='sby_lb-container'><img class='sby_lb-image' alt='Lightbox image placeholder' src='' /><div class='sby_lb-player sby_lb-player-placeholder' id='sby_lb-player'></div><div class='sby_lb-nav'><a class='sby_lb-prev' href='#' ><p class='sby-screenreader'>Previous Slide</p><span></span></a><a class='sby_lb-next' href='#' ><p class='sby-screenreader'>Next Slide</p><span></span></a></div><div class='sby_lb-loader'><a class='sby_lb-cancel'></a></div></div></div><div class='sby_lb-dataContainer'><div class='sby_lb-data'><div class='sby_lb-details'><div class='sby_lb-caption'></div><div class='sby_lb-info'><div class='sby_lb-number'></div></div></div><div class='sby_lb-closeContainer'><a class='sby_lb-close'></a></div></div></div></div>"},beforePlayerSetup:function(e,i,t,s,a){},afterPlayerSetup:function(e,i,t,s){},afterResize:function(){var i=e("#sby_lightbox .sby_lb-player").height();if(i>100){var t=e("#sby_lightbox .sby_lb-outerContainer").height()-i;t>10&&e("#sby_lightbox .sby_lb-player").css("top",t/2)}},pausePlayer:function(){void 0!==YT.get("sby_lb-player")&&"function"==typeof YT.get("sby_lb-player").pauseVideo?YT.get("sby_lb-player").pauseVideo():void 0!==window.sbyLightboxPlayer&&"function"==typeof window.sbyLightboxPlayer.pauseVideo&&window.sbyLightboxPlayer.pauseVideo()}},window.sby_init=function(){window.sby=new t,window.sby.createPage(window.sby.createFeeds,{whenFeedsCreated:window.sby.afterFeedsCreated})}}(jQuery),void 0===window.sbyEagerLoading&&(window.sbyEagerLoading=void 0!==window.sbyOptions&&window.sbyOptions.eagerload,jQuery("div[data-vc-video-bg]").length&&(window.sbyEagerLoading=!0)),void 0===window.sbySemiEagerLoading&&(window.sbySemiEagerLoading=void 0!==window.sbyOptions&&window.sbyOptions.semiEagerload,(jQuery("div[data-vc-video-bg]").length||window.sbyEagerLoading)&&(window.sbySemiEagerLoading=!1)),jQuery(document).ready(function(e){window.sbySemiEagerLoading||sby_init(),e("#cookie-notice a").on("click",function(){setTimeout(function(){e.each(window.sby.feeds,function(e){window.sby.feeds[e].afterConsentToggled()})},1e3)}),e("#cookie-law-info-bar a").on("click",function(){setTimeout(function(){e.each(window.sby.feeds,function(e){window.sby.feeds[e].afterConsentToggled()})},1e3)}),e(".cli-user-preference-checkbox").on("click",function(){setTimeout(function(){e.each(window.sby.feeds,function(e){window.sby.feeds[e].settings.consentGiven=!1,window.sby.feeds[e].afterConsentToggled()})},1e3)}),e(window).on("CookiebotOnAccept",function(i){e.each(window.sby.feeds,function(e){window.sby.feeds[e].settings.consentGiven=!0,window.sby.feeds[e].afterConsentToggled()})}),e(document).on("cmplzAcceptAll",function(i){e.each(window.sby.feeds,function(e){window.sby.feeds[e].settings.consentGiven=!0,window.sby.feeds[e].afterConsentToggled()})}),e(document).on("cmplzRevoke",function(i){e.each(window.sby.feeds,function(e){window.sby.feeds[e].settings.consentGiven=!1,window.sby.feeds[e].afterConsentToggled()})}),e(document).on("borlabs-cookie-consent-saved",function(i){e.each(window.sby.feeds,function(e){window.sby.feeds[e].settings.consentGiven=!1,window.sby.feeds[e].afterConsentToggled()})})})}if(window.sbySemiEagerLoading){var sbyYScriptId="sby-youtube-api",sbyYScript=document.getElementById(sbyYScriptId);if(null===sbyYScript){var tag=document.createElement("script"),firstScript=document.getElementsByTagName("script")[0];tag.src="https://www.youtube.com/iframe_api",tag.id=sbyYScriptId,firstScript.parentNode.insertBefore(tag,firstScript)}}window.onYouTubeIframeAPIReady=function(){var e=document.getElementsByClassName("sb_youtube").length;if(e>0){if(window.sbySemiEagerLoading){if(void 0!==window.sby)for(var i=0;i<e;i++)window.sby.feeds[i].playerAPIReady=!0;else window.sbyAPIReady=!0;sby_init()}else if(jQuery(".sb_youtube").each(function(e){var i=jQuery(this);i.find(".sby_live_player").length&&(player=new YT.Player(i.find(".sby_live_player").attr("id"),{events:{onReady:function(){i.find(".sby_live_player").hide(),i.find(".sby_item").remove();var t=YT.get(i.find(".sby_live_player").attr("id")).getVideoData().video_id;i.find(".sby_player_video_thumbnail").attr("data-video-id",t).css("z-index",-1);i.find(".sby_item").length;var s={action:"sby_live_retrieve",video_id:t,feed_id:i.attr("data-feedid"),atts:i.attr("data-shortcode-atts")};jQuery.ajax({url:sbyOptions.adminAjaxUrl,type:"post",data:s,success:function(t){if(0===t.trim().indexOf("{")){var s=window.sby.feeds[e],a=JSON.parse(t),n=void 0!==a.feedStatus.checkWPPosts&&a.feedStatus.checkWPPosts;s.settings.debugEnabled&&console.log(a),s.settings.checkWPPosts=!!n,s.appendNewPosts(a.html),s.addResizedImages(a.resizedImages),s.afterInitialImagesLoaded(),a.feedStatus.shouldPaginate?s.outOfPages=!1:(s.outOfPages=!0,i.find(".sby_load_btn").hide()),jQuery(".sby_no_js").removeClass("sby_no_js"),i.find(".sby_live_player").remove(),i.hasClass("sby_layout_gallery")&&s.createPlayer("sby_player"+s.index),i.find(".sby_player_item").css("opacity",1),i.find(".sby_item").css("opacity",1),i.find(".sby_player_loading").removeClass("sby_player_loading"),i.hasClass("sby_layout_list")&&i.find(".sby_item_video_thumbnail").on("mouseenter",function(){jQuery(this).css("z-index",-1)})}}})}}}))}),window.sbyEagerLoading){var t=!1,s=!1;jQuery(".sb_youtube").each(function(e){var i=jQuery(this);i.hasClass("sby_layout_list")?(jQuery(this).addClass("sby_player_loaded"),i.find(".sby_item").each(function(){videoID=jQuery(this).attr("data-video-id"),player=new YT.Player("sby_player_"+videoID,{height:"100",width:"100",videoId:videoID,playerVars:{modestbranding:1,rel:0,autoplay:s},events:{onStateChange:function(e){e.target.getVideoData().video_id;1===e.data&&i.find(".sby_item").each(function(){var e=jQuery(this).attr("data-video-id");jQuery(this).find("iframe").length&&e!==jQuery(this).find("iframe").attr("id").replace("sby_player_","")&&YT.get("sby_player_"+e).pauseVideo()})}}})})):i.hasClass("sby_layout_gallery")?(jQuery(this).addClass("sby_player_loaded"),player=new YT.Player("sby_player"+e,{height:"100",width:"100",videoId:jQuery(this).find(".sby_item").first().attr("data-video-id"),playerVars:{modestbranding:1,rel:0,autoplay:s},events:{onStateChange:function(e){e.target.getVideoData().video_id;1===e.data&&i.find(".sby_item").each(function(){var i=jQuery(this).attr("data-video-id");jQuery(this).find("iframe").length&&jQuery(e.target.a).attr("id")!==jQuery(this).find("iframe").attr("id")&&YT.get("sby_player_"+i).pauseVideo()})}}})):t=!0})}else if(void 0!==window.sby)for(i=0;i<e;i++)window.sby.feeds[i].playerAPIReady=!0;else window.sbyAPIReady=!0;t&&(jQuery("#sby_lb-player").length||jQuery(".sb_youtube").first().append('<div class="sby_lb-player-loaded sby_lb-player" id="sby_lb-player" style="display: none;"></div>'),player=new YT.Player("sby_lb-player",{height:"100",width:"100",videoId:jQuery(this).find(".sby_item").first().attr("data-video-id"),playerVars:{modestbranding:1,rel:0,autoplay:s}}),window.sbyLightboxPlayer=player)}};
|
1 |
+
var sby_js_exists=void 0!==sby_js_exists;if(!sby_js_exists){function sby_supports_video(){return!!document.createElement("video").canPlayType}!function(e){function i(){var e,i,t,s=s||{VER:"0.9.944"};s.bgs_Available=!1,s.bgs_CheckRunned=!1,function(e){e.fn.extend({sby_imgLiquid:function(i){this.defaults={fill:!0,verticalAlign:"center",horizontalAlign:"center",useBackgroundSize:!0,useDataHtmlAttr:!0,responsive:!0,delay:0,fadeInTime:0,removeBoxBackground:!0,hardPixels:!0,responsiveCheckTime:500,timecheckvisibility:500,onStart:null,onFinish:null,onItemStart:null,onItemFinish:null,onItemError:null},function(){if(!s.bgs_CheckRunned){s.bgs_CheckRunned=!0;var i=e('<span style="background-size:cover" />');e("body").append(i),function(){var e=i[0];if(e&&window.getComputedStyle){var t=window.getComputedStyle(e,null);t&&t.backgroundSize&&(s.bgs_Available="cover"===t.backgroundSize)}}(),i.remove()}}();var t=this;return this.options=i,this.settings=e.extend({},this.defaults,this.options),this.settings.onStart&&this.settings.onStart(),this.each(function(i){function a(){(r.responsive||h.data("sby_imgLiquid_oldProcessed"))&&h.data("sby_imgLiquid_settings")&&(r=h.data("sby_imgLiquid_settings"),l.actualSize=l.get(0).offsetWidth+l.get(0).offsetHeight/1e4,l.sizeOld&&l.actualSize!==l.sizeOld&&o(),l.sizeOld=l.actualSize,setTimeout(a,r.responsiveCheckTime))}function n(){h.data("sby_imgLiquid_error",!0),l.addClass("sby_imgLiquid_error"),r.onItemError&&r.onItemError(i,l,h),d()}function o(){var e,t,s,a,n,o,b,y,u=0,c=0,g=l.width(),f=l.height();void 0===h.data("owidth")&&h.data("owidth",h[0].width),void 0===h.data("oheight")&&h.data("oheight",h[0].height),r.fill===g/f>=h.data("owidth")/h.data("oheight")?(e="100%",t="auto",s=Math.floor(g),a=Math.floor(g*(h.data("oheight")/h.data("owidth")))):(e="auto",t="100%",s=Math.floor(f*(h.data("owidth")/h.data("oheight"))),a=Math.floor(f)),b=g-s,"left"===(n=r.horizontalAlign.toLowerCase())&&(c=0),"center"===n&&(c=.5*b),"right"===n&&(c=b),-1!==n.indexOf("%")&&((n=parseInt(n.replace("%",""),10))>0&&(c=b*n*.01)),y=f-a,"left"===(o=r.verticalAlign.toLowerCase())&&(u=0),"center"===o&&(u=.5*y),"bottom"===o&&(u=y),-1!==o.indexOf("%")&&((o=parseInt(o.replace("%",""),10))>0&&(u=y*o*.01)),r.hardPixels&&(e=s,t=a),h.css({width:e,height:t,"margin-left":Math.floor(c),"margin-top":Math.floor(u)}),h.data("sby_imgLiquid_oldProcessed")||(h.fadeTo(r.fadeInTime,1),h.data("sby_imgLiquid_oldProcessed",!0),r.removeBoxBackground&&l.css("background-image","none"),l.addClass("sby_imgLiquid_nobgSize"),l.addClass("sby_imgLiquid_ready")),r.onItemFinish&&r.onItemFinish(i,l,h),d()}function d(){i===t.length-1&&t.settings.onFinish&&t.settings.onFinish()}var r=t.settings,l=e(this),h=e("img:first",l);return h.length?(h.data("sby_imgLiquid_settings")?(l.removeClass("sby_imgLiquid_error").removeClass("sby_imgLiquid_ready"),r=e.extend({},h.data("sby_imgLiquid_settings"),t.options)):r=e.extend({},t.settings,function(){var e={};if(t.settings.useDataHtmlAttr){var i=l.attr("data-sby_imgLiquid-fill"),a=l.attr("data-sby_imgLiquid-horizontalAlign"),n=l.attr("data-sby_imgLiquid-verticalAlign");("true"===i||"false"===i)&&(e.fill=Boolean("true"===i)),void 0===a||"left"!==a&&"center"!==a&&"right"!==a&&-1===a.indexOf("%")||(e.horizontalAlign=a),void 0===n||"top"!==n&&"bottom"!==n&&"center"!==n&&-1===n.indexOf("%")||(e.verticalAlign=n)}return s.isIE&&t.settings.ieFadeInDisabled&&(e.fadeInTime=0),e}()),h.data("sby_imgLiquid_settings",r),r.onItemStart&&r.onItemStart(i,l,h),void(s.bgs_Available&&r.useBackgroundSize?(-1===l.css("background-image").indexOf(encodeURI(h.attr("src")))&&l.css({"background-image":'url("'+encodeURI(h.attr("src"))+'")'}),l.css({"background-size":r.fill?"cover":"contain","background-position":(r.horizontalAlign+" "+r.verticalAlign).toLowerCase(),"background-repeat":"no-repeat"}),e("a:first",l).css({display:"block",width:"100%",height:"100%"}),e("img",l).css({display:"none"}),r.onItemFinish&&r.onItemFinish(i,l,h),l.addClass("sby_imgLiquid_bgSize"),l.addClass("sby_imgLiquid_ready"),d()):function t(){if(h.data("oldSrc")&&h.data("oldSrc")!==h.attr("src")){var s=h.clone().removeAttr("style");return s.data("sby_imgLiquid_settings",h.data("sby_imgLiquid_settings")),h.parent().prepend(s),h.remove(),(h=s)[0].width=0,void setTimeout(t,10)}return h.data("sby_imgLiquid_oldProcessed")?void o():(h.data("sby_imgLiquid_oldProcessed",!1),h.data("oldSrc",h.attr("src")),e("img:not(:first)",l).css("display","none"),l.css({overflow:"hidden"}),h.fadeTo(0,0).removeAttr("width").removeAttr("height").css({visibility:"visible","max-width":"none","max-height":"none",width:"auto",height:"auto",display:"block"}),h.on("error",n),h[0].onerror=n,function e(){h.data("sby_imgLiquid_error")||h.data("sby_imgLiquid_loaded")||h.data("sby_imgLiquid_oldProcessed")||(l.is(":visible")&&h[0].complete&&h[0].width>0&&h[0].height>0?(h.data("sby_imgLiquid_loaded",!0),setTimeout(o,i*r.delay)):setTimeout(e,r.timecheckvisibility))}(),void a())}())):void n()})}})}(jQuery),e=s.injectCss,i=document.getElementsByTagName("head")[0],(t=document.createElement("style")).type="text/css",t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e)),i.appendChild(t)}function t(){this.feeds={},this.options=sbyOptions,this.isTouch=function(){if("ontouchstart"in document.documentElement)return!0;return!1}()}function s(e,i,t){this.el=e,this.index=i,this.settings=t,this.placeholderURL=window.sby.options.placeholder,t.narrowPlayer&&(this.placeholderURL=window.sby.options.placeholderNarrow),this.playerAPIReady=!1,this.consentGiven=t.consentGiven,this.players={},this.minImageWidth=0,this.imageResolution=150,this.resizedImages={},this.needsResizing=[],this.outOfPages=!1,this.isInitialized=!1,this.mostRecentlyLoadedPosts=[]}function a(){}function n(i,t){e.ajax({url:sbyOptions.adminAjaxUrl,type:"post",data:i,success:t})}t.prototype={createPage:function(i,t){void 0!==window.sbyajaxurl&&-1!==window.sbyajaxurl.indexOf(window.location.hostname)||(window.sbyajaxurl=window.location.hostname+"/wp-admin/admin-ajax.php"),e(".sby_no_js_error_message").remove(),e(".sby_no_js").removeClass("sby_no_js"),i(t)},maybeAddYTAPI:function(){if(null===document.getElementById("sby-youtube-api")){var e=document.createElement("script"),i=document.getElementsByTagName("script")[0];e.src="https://www.youtube.com/iframe_api",e.id="sby-youtube-api",i.parentNode.insertBefore(e,i)}},createLightbox:function(){var i,t=new a,s=(i=0,function(e,t){clearTimeout(i),i=setTimeout(e,t)});jQuery(window).on("resize",function(){s(function(){t.afterResize()},200)}),function(){var i=jQuery,s=function(){function e(){this.fadeDuration=500,this.fitImagesInViewport=!0,this.resizeDuration=700,this.positionFromTop=50,this.showImageNumberLabel=!0,this.alwaysShowNavOnTouchDevices=!1,this.wrapAround=!1}return e.prototype.albumLabel=function(e,i){return e+" / "+i},e}(),a=function(){function s(e){this.options=e,this.album=[],this.currentImageIndex=void 0,this.init()}return s.prototype.init=function(){this.enable(),this.build()},s.prototype.enable=function(){var e=this;i("body").on("click","a[data-sby-lightbox]",function(t){return e.start(i(t.currentTarget)),!1})},s.prototype.build=function(){var e=this;i(""+t.template()).appendTo(i("body")),this.$lightbox=i("#sby_lightbox"),this.$overlay=i("#sby_lightboxOverlay"),this.$outerContainer=this.$lightbox.find(".sby_lb-outerContainer"),this.$container=this.$lightbox.find(".sby_lb-container"),this.containerTopPadding=parseInt(this.$container.css("padding-top"),10),this.containerRightPadding=parseInt(this.$container.css("padding-right"),10),this.containerBottomPadding=parseInt(this.$container.css("padding-bottom"),10),this.containerLeftPadding=parseInt(this.$container.css("padding-left"),10),this.$overlay.hide().on("click",function(){return e.end(),!1}),jQuery(document).on("click",function(e,i,t){jQuery(e.target).closest(".sby_lb-outerContainer").length||jQuery(e.target).closest(".sby_lb-dataContainer").length||(void 0!==window.sbyLightboxPlayer&&YT.get("sby_lb-player").pauseVideo(),jQuery("#sby_lightboxOverlay, #sby_lightbox").fadeOut())}),this.$lightbox.hide(),jQuery("#sby_lightboxOverlay").on("click",function(t){return void 0!==window.sbyLightboxPlayer&&YT.get("sby_lb-player").pauseVideo(),"sby_lightbox"===i(t.target).attr("id")&&e.end(),!1}),this.$lightbox.find(".sby_lb-prev").on("click",function(){return void 0!==window.sbyLightboxPlayer&&YT.get("sby_lb-player").pauseVideo(),e.changeImage(0===e.currentImageIndex?e.album.length-1:e.currentImageIndex-1),!1}),this.$lightbox.find(".sby_lb-container").on("swiperight",function(){return void 0!==window.sbyLightboxPlayer&&YT.get("sby_lb-player").pauseVideo(),e.changeImage(0===e.currentImageIndex?e.album.length-1:e.currentImageIndex-1),!1}),this.$lightbox.find(".sby_lb-next").on("click",function(){return void 0!==window.sbyLightboxPlayer&&YT.get("sby_lb-player").pauseVideo(),e.changeImage(e.currentImageIndex===e.album.length-1?0:e.currentImageIndex+1),!1}),this.$lightbox.find(".sby_lb-container").on("swipeleft",function(){return void 0!==window.sbyLightboxPlayer&&YT.get("sby_lb-player").pauseVideo(),e.changeImage(e.currentImageIndex===e.album.length-1?0:e.currentImageIndex+1),!1}),this.$lightbox.find(".sby_lb-loader, .sby_lb-close").on("click",function(){return void 0!==window.sbyLightboxPlayer&&YT.get("sby_lb-player").pauseVideo(),e.end(),!1})},s.prototype.start=function(e){function s(e){a.album.push(t.getData(e))}var a=this,n=i(window);n.on("resize",i.proxy(this.sizeOverlay,this)),i("select, object, embed").css({visibility:"hidden"}),this.sizeOverlay(),this.album=[];var o,d=0,r=e.attr("data-sby-lightbox");if(r){o=i(e.prop("tagName")+'[data-sby-lightbox="'+r+'"]');for(var l=0;l<o.length;l=++l)s(i(o[l])),o[l]===e[0]&&(d=l)}else if("lightbox"===e.attr("rel"))s(e);else{o=i(e.prop("tagName")+'[rel="'+e.attr("rel")+'"]');for(var h=0;h<o.length;h=++h)s(i(o[h])),o[h]===e[0]&&(d=h)}var b=n.scrollTop()+this.options.positionFromTop,y=n.scrollLeft();this.$lightbox.css({top:b+"px",left:y+"px"}).fadeIn(this.options.fadeDuration),this.changeImage(d)},s.prototype.changeImage=function(e){var t=this;this.disableKeyboardNav();var s=this.$lightbox.find(".sby_lb-image");this.$overlay.fadeIn(this.options.fadeDuration),i(".sby_lb-loader").fadeIn("slow"),this.$lightbox.find(".sby_lb-image, .sby_lb-nav, .sby_lb-prev, .sby_lb-next, .sby_lb-dataContainer, .sby_lb-numbers, .sby_lb-caption").hide(),this.$outerContainer.addClass("animating");var a=new Image;a.onload=function(){var n,o,d,r,l,h;s.attr("src",t.album[e].link),i(a),s.width(a.width),s.height(a.height),t.options.fitImagesInViewport&&(h=i(window).width(),l=i(window).height(),r=h-t.containerLeftPadding-t.containerRightPadding-20-100,d=l-t.containerTopPadding-t.containerBottomPadding-150,(a.width>r||a.height>d)&&(a.width/r>a.height/d?(o=r,n=parseInt(a.height/(a.width/o),10),s.width(o),s.height(n)):(n=d,o=parseInt(a.width/(a.height/n),10),s.width(o),s.height(n)))),t.sizeContainer(s.width(),s.height())},a.src=this.album[e].link,this.currentImageIndex=e},s.prototype.sizeOverlay=function(){this.$overlay.width(i(window).width()).height(i(document).height())},s.prototype.sizeContainer=function(e,i){function t(){s.$lightbox.find(".sby_lb-dataContainer").width(o),s.$lightbox.find(".sby_lb-prevLink").height(d),s.$lightbox.find(".sby_lb-nextLink").height(d),s.showImage()}var s=this,a=this.$outerContainer.outerWidth(),n=this.$outerContainer.outerHeight(),o=e+this.containerLeftPadding+this.containerRightPadding,d=i+this.containerTopPadding+this.containerBottomPadding;a!==o||n!==d?this.$outerContainer.animate({width:o,height:d},this.options.resizeDuration,"swing",function(){t()}):t()},s.prototype.showImage=function(){this.$lightbox.find(".sby_lb-loader").hide(),this.$lightbox.find(".sby_lb-image").fadeIn("slow"),this.updateNav(),this.updateDetails(),this.preloadNeighboringImages(),this.enableKeyboardNav()},s.prototype.updateNav=function(){var e=!1;try{document.createEvent("TouchEvent"),e=!!this.options.alwaysShowNavOnTouchDevices}catch(e){}this.$lightbox.find(".sby_lb-nav").show(),this.album.length>1&&(this.options.wrapAround?(e&&this.$lightbox.find(".sby_lb-prev, .sby_lb-next").css("opacity","1"),this.$lightbox.find(".sby_lb-prev, .sby_lb-next").show()):(this.currentImageIndex>0&&(this.$lightbox.find(".sby_lb-prev").show(),e&&this.$lightbox.find(".sby_lb-prev").css("opacity","1")),this.currentImageIndex<this.album.length-1&&(this.$lightbox.find(".sby_lb-next").show(),e&&this.$lightbox.find(".sby_lb-next").css("opacity","1"))))},s.prototype.updateDetails=function(){var i=this;jQuery("iframe.sby_lb-player-loaded").length&&(jQuery(".sby_lb-player-placeholder").replaceWith(jQuery("iframe.sby_lb-player-loaded")),jQuery("iframe.sby_lb-player-loaded").removeClass("sby_lb-player-loaded").show());var s=window.sby.feeds[this.album[this.currentImageIndex].feedIndex];if(t.beforePlayerSetup(this.$lightbox,this.album[this.currentImageIndex],this.currentImageIndex,this.album,s),sby_supports_video()){if(jQuery("#sby_lightbox").removeClass("sby_video_lightbox"),s.settings.consentGiven&&this.album[this.currentImageIndex].video.length){jQuery(".sby_gdpr_notice").remove();var a="sby_lb-player";jQuery("#sby_lightbox").addClass("sby_video_lightbox");var n=this.album[this.currentImageIndex].video,o=sbyOptions.autoplay;if(void 0===window.sbyLightboxPlayer){var d={host:window.location.protocol+"//www.youtube-nocookie.com",videoId:n,playerVars:{modestbranding:1,rel:0,autoplay:o},events:{onStateChange:function(i){var t=i.target.getVideoData().video_id;s.afterStateChange(a,t,i,e("#"+a).closest(".sby_video_thumbnail_wrap"))}}};s.maybeAddCTA(a),window.sbyLightboxPlayer=new window.YT.Player(a,d)}else window.sbyLightboxPlayer.loadVideoById(n);this.$outerContainer.removeClass("animating"),this.$lightbox.find(".sby_lb-dataContainer").fadeIn(this.options.resizeDuration,function(){return i.sizeOverlay()}),setTimeout(function(){e("#sby_lightbox .sby_lb-player").css({height:e("#sby_lightbox .sby_lb-outerContainer").height()+"px",width:e("#sby_lightbox .sby_lb-outerContainer").width()+"px",top:0})},400),this.$lightbox.find("iframe").length&&this.$lightbox.find("iframe").attr("title",this.album[this.currentImageIndex].videoTitle)}else{var r=e(".sby_item[data-video-id="+this.album[this.currentImageIndex].video+"]").find(".sby_video_thumbnail").attr("data-full-res");e(".sby_lb-image").attr("src",r),this.$outerContainer.removeClass("animating"),this.$lightbox.find(".sby_lb-dataContainer").fadeIn(this.options.resizeDuration,function(){return i.sizeOverlay()}),jQuery(".sby_lb-container").prepend('<a href="https://www.youtube.com/watch?v='+this.album[this.currentImageIndex].video+'" target="_blank" rel="noopener noreferrer" class="sby_gdpr_notice"><svg style="color: rgba(255,255,255,1)" class="svg-inline--fa fa-play fa-w-14 sby_playbtn" aria-label="Play" aria-hidden="true" data-fa-processed="" data-prefix="fa" data-icon="play" role="presentation" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"></path></svg></a>')}t.afterPlayerSetup(this.$lightbox,this.album[this.currentImageIndex],this.currentImageIndex,this.album),this.album.length>1&&this.options.showImageNumberLabel?this.$lightbox.find(".sby_lb-number").text(this.options.albumLabel(this.currentImageIndex+1,this.album.length)).fadeIn("fast"):this.$lightbox.find(".sby_lb-number").hide()}},s.prototype.preloadNeighboringImages=function(){this.album.length>this.currentImageIndex+1&&((new Image).src=this.album[this.currentImageIndex+1].link);this.currentImageIndex>0&&((new Image).src=this.album[this.currentImageIndex-1].link)},s.prototype.enableKeyboardNav=function(){i(document).on("keyup.keyboard",i.proxy(this.keyboardAction,this))},s.prototype.disableKeyboardNav=function(){i(document).off(".keyboard")},s.prototype.keyboardAction=function(i){var t=event.keyCode,s=String.fromCharCode(t).toLowerCase();27===t||s.match(/x|o|c/)?(sby_supports_video()&&e("#sby_lightbox video.sby_video")[0].pause(),e("#sby_lightbox iframe").attr("src",""),this.end()):"p"===s||37===t?(0!==this.currentImageIndex?this.changeImage(this.currentImageIndex-1):this.options.wrapAround&&this.album.length>1&&this.changeImage(this.album.length-1),sby_supports_video()&&e("#sby_lightbox video.sby_video")[0].pause(),e("#sby_lightbox iframe").attr("src","")):"n"!==s&&39!==t||(this.currentImageIndex!==this.album.length-1?this.changeImage(this.currentImageIndex+1):this.options.wrapAround&&this.album.length>1&&this.changeImage(0),void 0!==window.sbyLightboxPlayer&&YT.get("sby_lb-player").pauseVideo())},s.prototype.end=function(){this.disableKeyboardNav(),i(window).off("resize",this.sizeOverlay),this.$lightbox.fadeOut(this.options.fadeDuration),this.$overlay.fadeOut(this.options.fadeDuration),i("select, object, embed").css({visibility:"visible"})},s}();i(function(){var i=new s;new a(i),e(".sby_lightbox_action a").off().on("click",function(){e(this).parent().find(".sby_lightbox_tooltip").toggle()})})}.call(this)},createFeeds:function(i){window.sby.createLightbox(),i.whenFeedsCreated(e(".sb_youtube").each(function(i){e(this).attr("data-sby-index",i+1),e(this).find(".sby_player").replaceWith('<div id="sby_player'+i+'"></div>');var t=e(this),a=void 0!==t.attr("data-sby-flags")?t.attr("data-sby-flags").split(","):[],o=void 0!==t.attr("data-options")?JSON.parse(t.attr("data-options")):{};if(a.indexOf("testAjax")>-1){window.sby.triggeredTest=!0;n({action:"sby_on_ajax_test_trigger"},function(e){console.log("did test")})}var d={cols:t.attr("data-cols"),colsmobile:"same"!==t.attr("data-colsmobile")?t.attr("data-colsmobile"):t.attr("data-cols"),num:t.attr("data-num"),imgRes:t.attr("data-res"),feedID:t.attr("data-feedid"),postID:"undefind"!=typeof t.attr("data-postid")?t.attr("data-postid"):"unknown",shortCodeAtts:t.attr("data-shortcode-atts"),resizingEnabled:-1===a.indexOf("resizeDisable"),imageLoadEnabled:-1===a.indexOf("imageLoadDisable"),debugEnabled:a.indexOf("debug")>-1,favorLocal:a.indexOf("favorLocal")>-1,ajaxPostLoad:a.indexOf("ajaxPostLoad")>-1,checkWPPosts:a.indexOf("checkWPPosts")>-1,cacheAll:a.indexOf("cacheAll")>-1,gdpr:a.indexOf("gdpr")>-1,consentGiven:-1===a.indexOf("gdpr"),noCDN:a.indexOf("disablecdn")>-1,lightboxEnabled:void 0!==t.attr("data-sby-supports-lightbox"),locator:a.indexOf("locator")>-1,autoMinRes:1,general:o};window.sby.feeds[i]=function(e,i,t){return new s(e,i,t)}(this,i,d),void 0!==window.sbyAPIReady&&(window.sby.feeds[i].playerAPIReady=!0),window.sby.feeds[i].setResizedImages(),window.sby.feeds[i].init();var r=jQuery.Event("sbyafterfeedcreate");r.feed=window.sby.feeds[i],jQuery(window).trigger(r)}))},afterFeedsCreated:function(){e(".sb_instagram_header").each(function(){var i=e(this);i.find(".sby_header_link").on("mouseenter mouseleave",function(e){switch(e.type){case"mouseenter":i.find(".sby_header_img_hover").addClass("sby_fade_in");break;case"mouseleave":i.find(".sby_header_img_hover").removeClass("sby_fade_in")}})})},encodeHTML:function(e){return void 0===e?"":e.replace(/(>)/g,">").replace(/(<)/g,"<").replace(/(<br\/>)/g,"<br>").replace(/(<br>)/g,"<br>")},urlDetect:function(e){return e.match(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&\/\/=]*)/g)}},s.prototype={init:function(){var i=this;i.settings.consentGiven=i.checkConsent(),i.settings.consentGiven&&window.sby.maybeAddYTAPI(),i.settings.noCDN&&!i.settings.consentGiven&&(e(this.el).find(".sb_youtube_header").length?e(this.el).find(".sb_youtube_header").addClass("sby_no_consent"):e(this.el).prev(".sb_youtube_header").length&&e(this.el).prev(".sb_youtube_header").addClass("sby_no_consent")),e(this.el).find("#sby_mod_error").length&&e(this.el).prepend(e(this.el).find("#sby_mod_error")),this.settings.ajaxPostLoad?this.getNewPostSet():this.afterInitialImagesLoaded();var t,s=(t=0,function(e,i){clearTimeout(t),t=setTimeout(e,i)});jQuery(window).on("resize",function(){s(function(){i.afterResize()},500)})},initLayout:function(){this.initGalleryLayout(),this.initGrid()},initGalleryLayout:function(){var i=e(this.el),t=this;i.hasClass("sby_layout_gallery")&&i.find(".sby_player_outer_wrap").length&&(this.maybeRaiseSingleImageResolution(i.find(".sby_player_outer_wrap"),0,!0),i.find(".sby_player_outer_wrap .sby_video_thumbnail").off().on("click",function(i){if((!t.settings.lightboxEnabled||t.settings.lightboxEnabled&&t.settings.noCDN)&&(t.settings.noCDN||!t.settings.consentGiven))return e(this).closest(".sby_item").length,void(void 0!==e(this).closest(".sby_item").attr("data-video-id")&&e(this).attr("href","https://www.youtube.com/watch?v="+e(this).closest(".sby_item").attr("data-video-id")));i.preventDefault(),t.onThumbnailClick(e(this),!0)}),i.find(".sby_item").first().addClass("sby_current"),i.mouseenter(function(){t.canCreatePlayer()&&(i.find(".sby_player_outer_wrap iframe").length?void 0===t.player&&t.playerEagerLoaded()&&t.createPlayer("sby_player"+t.index):(i.addClass("sby_player_added").find(".sby_player_outer_wrap").addClass("sby_player_loading"),i.find(".sby_player_outer_wrap .sby_video_thumbnail").find(".sby_loader").show().removeClass("sby_hidden"),t.createPlayer("sby_player"+t.index)))}),window.sbySemiEagerLoading&&t.createPlayer("sby_player"+t.index),t.settings.noCDN&&i.find(".sby_player_outer_wrap").append('<div class="sby_play_btn">\n <span class="sby_play_btn_bg"></span>\n <svg aria-hidden="true" focusable="false" data-prefix="fab" data-icon="youtube" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" class="svg-inline--fa fa-youtube fa-w-18"><path fill="currentColor" d="M549.655 124.083c-6.281-23.65-24.787-42.276-48.284-48.597C458.781 64 288 64 288 64S117.22 64 74.629 75.486c-23.497 6.322-42.003 24.947-48.284 48.597-11.412 42.867-11.412 132.305-11.412 132.305s0 89.438 11.412 132.305c6.281 23.65 24.787 41.5 48.284 47.821C117.22 448 288 448 288 448s170.78 0 213.371-11.486c23.497-6.321 42.003-24.171 48.284-47.821 11.412-42.867 11.412-132.305 11.412-132.305s0-89.438-11.412-132.305zm-317.51 213.508V175.185l142.739 81.205-142.739 81.201z" class=""></path></svg> </div>'))},createPlayer:function(i,t,s,a){var n=e(this.el),o=this;if(t=void 0!==t?t:this.getVideoID(n.find(".sby_item").first()),s=void 0!==s?s:0,void 0===a&&(a={host:window.location.protocol+"//www.youtube-nocookie.com",videoId:t,playerVars:{modestbranding:1,rel:0,autoplay:s}}),void 0===a.events&&(a.events={onReady:function(){n.find(".sby_player_outer_wrap").removeClass("sby_player_loading").find(".sby_video_thumbnail").css("z-index",-1).find(".sby_loader").hide().addClass("sby_hidden"),e("#"+i).length&&e("#"+i).closest(".sby_video_thumbnail_wrap").find(".sby_video_thumbnail").length&&e("#"+i).closest(".sby_video_thumbnail_wrap").find(".sby_video_thumbnail").fadeTo(0,"slow",function(){e(this).css("z-index",-1),e(this).find(".sby_loader").hide().addClass("sby_hidden"),e(this).closest(".sby_item").removeClass("sby_player_loading")});var t=jQuery.Event("sbyafterplayerready");t.feed=o,t.player=this,jQuery(window).trigger(t)},onStateChange:function(s){n.find(".sby_player_outer_wrap").removeClass("sby_player_loading").find(".sby_video_thumbnail").css("z-index",-1).find(".sby_loader").hide().addClass("sby_hidden"),o.afterStateChange(i,t,s,e("#"+i).closest(".sby_video_thumbnail_wrap")),1===s.data&&void 0!==o.players&&n.find(".sby_item").each(function(){var i=o.getVideoID(e(this));e(this).find("iframe").length&&i!==t&&void 0!==o.players[i]&&"function"==typeof o.players[i].pauseVideo&&o.players[i].pauseVideo()})}}),window.sbyEagerLoading)var d=YT.get(i);else d=new window.YT.Player(i,a);this.maybeAddCTA(i),n.hasClass("sby_layout_list")&&void 0===this.players[t]?this.players[t]=d:void 0===this.player&&(this.player=d);var r=jQuery.Event("sbyafterplayercreated");return r.feed=this,jQuery(window).trigger(r),n.find(".sby_player_outer_wrap .sby_play_btn").remove(),d},afterStateChange:function(e,i,t,s){},afterInitialImagesLoaded:function(){this.initLayout(),this.loadMoreButtonInit(),this.hideExtraItemsForWidth(),this.beforeNewImagesRevealed(),this.revealNewImages(),this.afterNewImagesRevealed(),this.afterFeedSet(),this.sizePlayer(),this.sizeItems(),this.settings.consentGiven?this.applyFullFeatures():this.removeFeatures()},afterResize:function(){this.setImageHeight(),this.setImageResolution(),this.maybeRaiseImageResolution(),this.setImageSizeClass(),this.sizePlayer(),this.sizeItems()},afterLoadMoreClicked:function(e){e.find(".sby_loader").removeClass("sby_hidden"),e.find(".sby_btn_text").addClass("sby_hidden"),e.closest(".sb_youtube").find(".sby_num_diff_hide").addClass("sby_transition").removeClass("sby_num_diff_hide")},afterNewImagesLoaded:function(){var i=e(this.el),t=this;this.beforeNewImagesRevealed(),this.revealNewImages(),this.afterNewImagesRevealed(),this.sizePlayer(),this.sizeItems(),setTimeout(function(){i.find(".sby_loader").addClass("sby_hidden"),i.find(".sby_btn_text").removeClass("sby_hidden"),t.maybeRaiseImageResolution()},500),this.settings.consentGiven?this.applyFullFeatures():this.removeFeatures()},beforeNewImagesRevealed:function(){this.setImageHeight(),this.maybeRaiseImageResolution(!0),this.setImageSizeClass()},afterFeedSet:function(){},sizePlayer:function(){var i=e(this.el),t=this;if(i.hasClass("sby_layout_gallery")){$playerThumbnail=i.find(".sby_player_item").find(".sby_player_video_thumbnail");var s=$playerThumbnail.innerWidth(),a=Math.floor(9*s/16);t.settings.narrowPlayer&&(a=Math.floor(3*s/4)),$playerThumbnail.css("height",a+"px").css("overflow","hidden")}else i.hasClass("sby_layout_list")&&i.find(".sby_item").each(function(){$playerThumbnail=e(this).find(".sby_item_video_thumbnail");var i=$playerThumbnail.innerWidth(),s=Math.floor(9*i/16);t.settings.narrowPlayer&&(s=Math.floor(3*i/4)),$playerThumbnail.css("height",s+"px").css("overflow","hidden")})},sizeItems:function(){var i=e(this.el);i.hasClass("sby_layout_list")||i.find(".sby_item").find(".sby_item_video_thumbnail").each(function(){if(e(this).hasClass("sby_imgLiquid_ready")){var i=e(this).innerWidth(),t=Math.floor(9*i/16);e(this).css("height",t+"px").css("overflow","hidden")}})},revealNewImages:function(){var i=e(this.el),t=this;this.applyImageLiquid(),"function"==typeof sbyCustomJS&&setTimeout(function(){sbyCustomJS()},100),i.find(".sby-screenreader").find("img").remove(),i.find(".sby_item.sby_new").each(function(i){var s=jQuery(this),a=s.attr("data-video-id");window.sbyEagerLoading&&t.canCreatePlayer()&&e("#sby_player_"+a).length&&(player=new YT.Player("sby_player_"+a,{height:"100",width:"100",videoId:a,playerVars:{modestbranding:1,rel:0,autoplay:0},events:{onStateChange:function(e){e.target.getVideoData().video_id;1===e.data&&s.find(".sby_item").each(function(){var i=jQuery(this).attr("data-video-id");jQuery(this).find("iframe").length&&jQuery(e.target.a).attr("id")!==jQuery(this).find("iframe").attr("id")&&YT.get("sby_player_"+i).pauseVideo()})}}})),s.find(".sby_video_thumbnail").on("mouseenter",function(){t.onThumbnailEnter(e(this),!1)}),s.find(".sby_player_wrap").on("mouseleave",function(){t.onThumbnailLeave(e(this),!1)}),s.find(".sby_video_thumbnail").on("click",function(i){if((!t.settings.lightboxEnabled||t.settings.lightboxEnabled&&t.settings.noCDN)&&(t.settings.noCDN||!t.settings.consentGiven))return e(this).closest(".sby_item").length,void(void 0!==e(this).closest(".sby_item").attr("data-video-id")&&e(this).attr("href","https://www.youtube.com/watch?v="+e(this).closest(".sby_item").attr("data-video-id")));i.preventDefault(),t.onThumbnailClick(e(this),!1)}),t.settings.lightboxEnabled&&(s.find(".sby_video_thumbnail").attr("data-sby-lightbox",t.index),"undefined"!=typeof sbyOptions&&void 0!==sbyOptions.lightboxPlaceholder&&(t.settings.narrowPlayer?s.find(".sby_video_thumbnail").attr("href",sbyOptions.lightboxPlaceholderNarrow):s.find(".sby_video_thumbnail").attr("href",sbyOptions.lightboxPlaceholder))),t.afterItemRevealed(s),""===s.find(".sby_info_item").text().trim()&&s.find(".sby_info_item").addClass("sby_no_space")}),i.find(".sby_player_item").each(function(e){var i=jQuery(this);t.afterItemRevealed(i)}),setTimeout(function(){i.find(".sby_item.sby_new").removeClass("sby_new");var e=10;i.find(".sby_transition").length;i.find(".sby_transition").each(function(i){var t=jQuery(this);setTimeout(function(){t.removeClass("sby_transition")},e),e+=10})},500)},afterItemRevealed:function(){},afterNewImagesRevealed:function(){this.listenForVisibilityChange(),this.sendNeedsResizingToServer(),this.sendCheckWPPostsToServer(),this.settings.imageLoadEnabled||e(".sby_no_resraise").removeClass("sby_no_resraise");var i=e.Event("sbyafterimagesloaded");i.el=e(this.el),e(window).trigger(i)},setResizedImages:function(){e(this.el).find(".sby_resized_image_data").length&&void 0!==e(this.el).find(".sby_resized_image_data").attr("data-resized")&&0===e(this.el).find(".sby_resized_image_data").attr("data-resized").indexOf('{"')&&(this.resizedImages=JSON.parse(e(this.el).find(".sby_resized_image_data").attr("data-resized")),e(this.el).find(".sby_resized_image_data").remove())},sendNeedsResizingToServer:function(){var i=this;if(i.needsResizing.length>0&&i.settings.resizingEnabled){var t=e(this.el).find(".sby_item").length;n({action:"sby_resized_images_submit",needs_resizing:i.needsResizing,offset:t,feed_id:i.settings.feedID,location:i.locationGuess(),post_id:i.settings.postID,atts:i.settings.shortCodeAtts},function(e){if(0===e.trim().indexOf("{")){var t=JSON.parse(e);i.settings.debugEnabled&&console.log(t)}})}},sendCheckWPPostsToServer:function(){var i=this;if(i.settings.checkWPPosts||i.settings.singleCheckPosts){var t=void 0!==i.settings.feedID?i.settings.feedID:"sby_single",s=i.mostRecentlyLoadedPosts;i.mostRecentlyLoadedPosts=[];n({action:"sby_check_wp_submit",feed_id:t,atts:i.settings.shortCodeAtts,location:i.locationGuess(),post_id:i.settings.postID,offset:e(this.el).hasClass("sby_layout_carousel")?Math.floor(e(this.el).find(".sby_item").length/2-1):e(this.el).find(".sby_item").length,posts:s,cache_all:i.settings.cacheAll},function(e){if(0===e.trim().indexOf("{")){var t=JSON.parse(e);i.settings.debugEnabled&&console.log(t),i.afterSendCheckWPPostsToServer(t)}})}},afterSendCheckWPPostsToServer:function(e){},loadMoreButtonInit:function(){var i=e(this.el),t=this;i.find(".sby_footer .sby_load_btn").off().on("click",function(){t.afterLoadMoreClicked(jQuery(this)),t.getNewPostSet()})},getNewPostSet:function(){var i=e(this.el),t=this;n({action:"sby_load_more_clicked",offset:i.find(".sby_item").length,feed_id:t.settings.feedID,location:t.locationGuess(),post_id:t.settings.postID,atts:t.settings.shortCodeAtts,current_resolution:t.imageResolution},function(s){if(0===s.trim().indexOf("{")){var a=JSON.parse(s),n=void 0!==a.feedStatus.checkWPPosts&&a.feedStatus.checkWPPosts;t.settings.debugEnabled&&console.log(a),t.settings.checkWPPosts=!!n,t.appendNewPosts(a.html),t.addResizedImages(a.resizedImages),t.settings.ajaxPostLoad?(t.settings.ajaxPostLoad=!1,t.afterInitialImagesLoaded()):t.afterNewImagesLoaded(),a.feedStatus.shouldPaginate?t.outOfPages=!1:(t.outOfPages=!0,i.find(".sby_load_btn").hide()),e(".sby_no_js").removeClass("sby_no_js")}})},appendNewPosts:function(i){var t=e(this.el);t.find(".sby_items_wrap .sby_item").length?t.find(".sby_items_wrap .sby_item").last().after(i):t.find(".sby_items_wrap").append(i)},addResizedImages:function(e){for(var i in e)this.resizedImages[i]=e[i]},setImageHeight:function(){},maybeRaiseSingleImageResolution:function(i,t,s){var a=this,n=a.getImageUrls(i),o=i.find(".sby_video_thumbnail > img").attr("src"),d=150;s=void 0!==s&&s;if(!(i.hasClass("sby_no_resraise")||!a.settings.consentGiven&&a.settings.noCDN)){e.each(n,function(e,i){i===o&&(d=parseInt(e),s=!1)});var r=640;switch(a.settings.imgRes){case"thumb":r=120;break;case"medium":r=320;break;case"large":r=480;break;case"full":r=640;break;default:var l=Math.max(a.settings.autoMinRes,i.find(".sby_video_thumbnail").innerWidth());switch(a.getBestResolutionForAuto(l,1,e(this.el).find("sby_item").first())){case 480:r=480;break;case 320:r=320;break;case 120:r=120}}if(r>d||o===a.placeholderURL||s){if(a.settings.debugEnabled){var h=o===a.placeholderURL?"was placeholder":"too small";console.log("rais res for "+o,h)}var b=n[r];i.find(".sby_video_thumbnail > img").attr("src",b),i.find(".sby_video_thumbnail").hasClass("sby_imgLiquid_ready")&&i.find(".sby_video_thumbnail").css("background-image",'url("'+b+'")')}i.find("img").on("error",function(){if(e(this).hasClass("sby_img_error"))console.log("unfixed error "+e(this).attr("src"));else{if(e(this).addClass("sby_img_error"),e(this).attr("src").indexOf("i.ytimg.com")>-1)a.settings.favorLocal=!0,a.getImageUrls(e(this).closest(".sby_item"))[640];else void 0!==e(this).closest(".sby_video_thumbnail").attr("data-full-res")||e(this).closest(".sby_video_thumbnail").attr("href");setTimeout(function(){a.afterResize()},1500)}})}},maybeRaiseImageResolution:function(i){var t=this,s=void 0!==i&&!0===i?".sby_item.sby_new":".sby_item",a=!t.isInitialized;e(t.el).find(s).each(function(i){!e(this).hasClass("sby_num_diff_hide")&&e(this).find(".sby_video_thumbnail").length&&void 0!==e(this).find(".sby_video_thumbnail").attr("data-img-src-set")&&t.maybeRaiseSingleImageResolution(e(this),i,a)}),t.isInitialized=!0},getBestResolutionForAuto:function(i,t,s){(isNaN(t)||t<1)&&(t=1);var a=i*t,n=10*Math.ceil(a/10),o=[120,320,480,640];if(s.hasClass("sby_highlighted")&&(n*=2),-1===o.indexOf(parseInt(n))){var d=!1;e.each(o,function(e,i){i>parseInt(n)&&!d&&(n=i,d=!0)})}return n},hideExtraItemsForWidth:function(){if("carousel"!==this.layout){var i=e(this.el),t=void 0!==i.attr("data-num")&&""!==i.attr("data-num")?parseInt(i.attr("data-num")):1,s=void 0!==i.attr("data-nummobile")&&""!==i.attr("data-nummobile")?parseInt(i.attr("data-nummobile")):t;i.hasClass(".sby_layout_carousel")||(e(window).width()<480?s<i.find(".sby_item").length&&i.find(".sby_item").slice(s-i.find(".sby_item").length).addClass("sby_num_diff_hide"):t<i.find(".sby_item").length&&i.find(".sby_item").slice(t-i.find(".sby_item").length).addClass("sby_num_diff_hide"))}},setImageSizeClass:function(){var i=e(this.el);i.removeClass("sby_small sby_medium");var t=i.innerWidth(),s=parseInt(i.find(".sby_items_wrap").outerWidth()-i.find(".sby_items_wrap").width())/2,a=this.getColumnCount(),n=(t-s*(a+2))/a;n>140&&n<240?i.addClass("sby_medium"):n<=140&&i.addClass("sby_small")},setMinImageWidth:function(){e(this.el).find(".sby_item .sby_video_thumbnail").first().length?this.minImageWidth=e(this.el).find(".sby_item .sby_video_thumbnail").first().innerWidth():this.minImageWidth=150},setImageResolution:function(){if("auto"===this.settings.imgRes)this.imageResolution="auto";else switch(this.settings.imgRes){case"thumb":this.imageResolution=150;break;case"medium":this.imageResolution=320;break;default:this.imageResolution=640}},getImageUrls:function(e){var i=JSON.parse(e.find(".sby_video_thumbnail").attr("data-img-src-set").replace(/\\\//g,"/")),t=e.attr("id").replace("sby_","").replace("player_","");if(void 0!==this.resizedImages[t]&&"video"!==this.resizedImages[t]&&"pending"!==this.resizedImages[t]&&"error"!==this.resizedImages[t].id&&"video"!==this.resizedImages[t].id&&"pending"!==this.resizedImages[t].id){if(void 0!==this.resizedImages[t].sizes){var s=[];void 0!==this.resizedImages[t].sizes.full&&(s.push(640),i[640]=sbyOptions.resized_url+this.resizedImages[t].id+"full.jpg",e.find(".sby_link_area").attr("href",sbyOptions.resized_url+this.resizedImages[t].id+"full.jpg"),e.find(".sby_video_thumbnail").attr("data-full-res",sbyOptions.resized_url+this.resizedImages[t].id+"full.jpg")),void 0!==this.resizedImages[t].sizes.low&&(s.push(320),i[320]=sbyOptions.resized_url+this.resizedImages[t].id+"low.jpg",this.settings.favorLocal&&void 0===this.resizedImages[t].sizes.full&&(e.find(".sby_link_area").attr("href",sbyOptions.resized_url+this.resizedImages[t].id+"low.jpg"),e.find(".sby_video_thumbnail").attr("data-full-res",sbyOptions.resized_url+this.resizedImages[t].id+"low.jpg"))),void 0!==this.resizedImages[t].sizes.thumb&&(s.push(150),i[150]=sbyOptions.resized_url+this.resizedImages[t].id+"thumb.jpg"),this.settings.favorLocal&&(-1===s.indexOf(640)&&s.indexOf(320)>-1&&(i[640]=sbyOptions.resized_url+this.resizedImages[t].id+"low.jpg"),-1===s.indexOf(320)&&(s.indexOf(640)>-1?i[320]=sbyOptions.resized_url+this.resizedImages[t].id+"full.jpg":s.indexOf(150)>-1&&(i[320]=sbyOptions.resized_url+this.resizedImages[t].id+"thumb.jpg")),-1===s.indexOf(150)&&(s.indexOf(320)>-1?i[150]=sbyOptions.resized_url+this.resizedImages[t].id+"low.jpg":s.indexOf(640)>-1&&(i[150]=sbyOptions.resized_url+this.resizedImages[t].id+"full.jpg")))}}else(void 0===this.resizedImages[t]||void 0!==this.resizedImages[t].id&&"pending"!==this.resizedImages[t].id&&"error"!==this.resizedImages[t].id)&&this.addToNeedsResizing(t);return i},getVideoID:function(i){if(i.hasClass("sby_item")||i.hasClass("sby_player_item")){if(void 0!==i.find(".sby_video_thumbnail").attr("data-video-id"))return i.find(".sby_video_thumbnail").attr("data-video-id")}else if(i.closest("sby_item").length||i.closest("sby_player_item").length){var t=i.closest("sby_item").length?i.closest("sby_item"):i.closest("sby_player_item");if(void 0!==t.find(".sby_video_thumbnail").attr("data-video-id"))return t.find(".sby_video_thumbnail").attr("data-video-id")}else{if(i.hasClass("sb_youtube"))return i.find(".sby_item").first().find(".sby_video_thumbnail").attr("data-video-id");if(e(this.el).find(".sby_video_thumbnail").first().length&&void 0!==e(this.el).find(".sby_video_thumbnail").first().attr("data-video-id"))return e(this.el).find(".sby_video_thumbnail").first().attr("data-video-id")}return""},getAvatarUrl:function(e,i){if(""===e)return"";var t=this.settings.general.avatars;return"local"===(i=void 0!==i?i:"local")?void 0!==t["LCL"+e]&&1===parseInt(t["LCL"+e])?sbyOptions.resized_url+e+".jpg":void 0!==t[e]?t[e]:"":void 0!==t[e]?t[e]:void 0!==t["LCL"+e]&&1===parseInt(t["LCL"+e])?sbyOptions.resized_url+e+".jpg":""},addToNeedsResizing:function(e){-1===this.needsResizing.indexOf(e)&&this.needsResizing.push(e)},applyImageLiquid:function(){var t=e(this.el);i(),"function"==typeof t.find(".sby_player_item").sby_imgLiquid&&(t.find(".sby_player_item").length&&t.find(".sby_player_item .sby_player_video_thumbnail").sby_imgLiquid({fill:!0}),t.find(".sby_item .sby_item_video_thumbnail").sby_imgLiquid({fill:!0}))},listenForVisibilityChange:function(){var i,t,s,a=this;i=jQuery,t={callback:function(){},runOnLoad:!0,frequency:100,sbyPreviousVisibility:null},s={sbyCheckVisibility:function(e,i){if(jQuery.contains(document,e[0])){var t=i.sbyPreviousVisibility,a=e.is(":visible");i.sbyPreviousVisibility=a,null==t?i.runOnLoad&&i.callback(e,a):t!==a&&i.callback(e,a),setTimeout(function(){s.sbyCheckVisibility(e,i)},i.frequency)}}},i.fn.sbyVisibilityChanged=function(e){var a=i.extend({},t,e);return this.each(function(){s.sbyCheckVisibility(i(this),a)})},"function"==typeof e(this.el).filter(":hidden").sbyVisibilityChanged&&e(this.el).filter(":hidden").sbyVisibilityChanged({callback:function(e,i){a.afterResize()},runOnLoad:!1})},getColumnCount:function(){var i=e(this.el),t=this.settings.cols,s=this.settings.colsmobile,a=t;return sbyWindowWidth=window.innerWidth,i.hasClass("sby_mob_col_auto")?(sbyWindowWidth<640&&parseInt(t)>2&&parseInt(t)<7&&(a=2),sbyWindowWidth<640&&parseInt(t)>6&&parseInt(t)<11&&(a=4),sbyWindowWidth<=480&&parseInt(t)>2&&(a=1)):sbyWindowWidth<=480&&(a=s),parseInt(a)},onThumbnailClick:function(i,t,s){if(this.canCreatePlayer()){var a=e(this.el);if(a.hasClass("sby_layout_gallery"))if(a.find(".sby_current").removeClass("sby_current"),i.closest(".sby_item").addClass("sby_current"),i.closest(".sby_item").addClass("sby_current"),a.addClass("sby_player_added").find(".sby_player_outer_wrap").addClass("sby_player_loading"),a.find(".sby_player_outer_wrap .sby_video_thumbnail").find(".sby_loader").show().removeClass("sby_hidden"),a.find(".sby_player_outer_wrap iframe").length)if(t){s=void 0===s?this.getVideoID(a.find(".sby_item").first()):s;this.playVideoInPlayer(s)}else{s=void 0===s?this.getVideoID(i.closest(".sby_item")):s;this.changePlayerInfo(i.closest(".sby_item")),this.playVideoInPlayer(s),this.afterVideoChanged()}else if(t)this.createPlayer("sby_player"+this.index);else{var s=void 0===s?this.getVideoID(i.closest(".sby_item")):s;this.createPlayer("sby_player"+this.index,s)}else if(e(this.el).hasClass("sby_layout_grid")||e(this.el).hasClass("sby_layout_carousel")){var n=i.closest(".sby_item");s=void 0===s?this.getVideoID(n):s;this.playVideoInPlayer(s),this.afterVideoChanged()}else if(e(this.el).hasClass("sby_layout_list")){n=i.closest(".sby_item"),s=void 0===s?this.getVideoID(n):s;n.length&&!n.find("iframe").length?(n.find(".sby_loader").show().removeClass("sby_hidden"),n.addClass("sby_player_loading sby_player_loaded"),this.createPlayer("sby_player_"+s,s)):(this.playVideoInPlayer(s,n.attr("data-video-id")),this.afterVideoChanged())}}},onThumbnailEnter:function(i){if(this.canCreatePlayer()&&e(this.el).hasClass("sby_layout_list")){var t=i.closest(".sby_item"),s=this.getVideoID(t);t.find("iframe").length||(t.find(".sby_loader").show().removeClass("sby_hidden"),t.addClass("sby_player_loading sby_player_loaded"),this.createPlayer("sby_player_"+s,s,0))}},onThumbnailLeave:function(e){},changePlayerInfo:function(e){},playerEagerLoaded:function(){if(void 0!==this.player||e(this.el).hasClass("sby_player_loaded"))return!0},initGrid:function(){if(window.sbySemiEagerLoading&&jQuery("#sby_lightbox").length){var i=this;playerID="sby_lb-player",jQuery("#sby_lightbox").addClass("sby_video_lightbox");var t=e(this.el).find("sby_item").first().attr("data-video-id"),s=sbyOptions.autoplay;if(void 0===window.sbyLightboxPlayer){var a={host:window.location.protocol+"//www.youtube-nocookie.com",videoId:t,playerVars:{modestbranding:1,rel:0,autoplay:s},events:{onStateChange:function(t){var s=t.target.getVideoData().video_id;i.afterStateChange(playerID,s,t,e("#"+playerID).closest(".sby_video_thumbnail_wrap"))}}};i.maybeAddCTA(playerID),window.sbyLightboxPlayer=new window.YT.Player(playerID,a)}}},maybeAddCTA:function(e,i){},canCreatePlayer:function(){return!e(this.el).find("#sby_blank").length&&(this.playerEagerLoaded()||this.playerAPIReady&&this.settings.consentGiven||window.sbyAPIReady&&this.settings.consentGiven)},playVideoInPlayer:function(e,i){void 0!==this.player&&void 0!==this.player.loadVideoById?this.player.loadVideoById(e):void 0!==window.sbyLightboxPlayer&&void 0!==window.sbyLightboxPlayer.loadVideoById?window.sbyLightboxPlayer.loadVideoById(e):void 0!==i&&void 0!==this.players&&void 0!==this.players[i]&&void 0!==this.players[i].loadVideoById&&this.players[i].loadVideoById(e)},afterVideoChanged:function(){e(this.el).hasClass("sby_layout_gallery")&&(e(this.el).find(".sby_player_outer_wrap").removeClass("sby_player_loading"),e(this.el).find(".sby_player_outer_wrap .sby_video_thumbnail").find(".sby_loader").hide().addClass("sby_hidden"),e(window).width()<480&&e("html, body").animate({scrollTop:e(this.el).find(".sby_player_outer_wrap").offset().top},300))},checkConsent:function(){if(this.settings.consentGiven||!this.settings.gdpr)return this.settings.noCDN=!1,!0;if("undefined"!=typeof CLI_Cookie)null!==CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME)&&(null!==CLI_Cookie.read("cookielawinfo-checkbox-non-necessary")&&(this.settings.consentGiven="yes"===CLI_Cookie.read("cookielawinfo-checkbox-non-necessary")),null!==CLI_Cookie.read("cookielawinfo-checkbox-necessary")&&(this.settings.consentGiven="yes"===CLI_Cookie.read("cookielawinfo-checkbox-necessary")));else if(void 0!==window.cnArgs){var e=("; "+document.cookie).split("; cookie_notice_accepted=");if(2===e.length){var i=e.pop().split(";").shift();this.settings.consentGiven="true"===i}}else void 0!==window.cookieconsent?this.settings.consentGiven="allow"===function(e){for(var i=e+"=",t=window.document.cookie.split(";"),s=0;s<t.length;s++){var a=t[s].trim();if(0==a.indexOf(i))return a.substring(i.length,a.length)}return""}("cmplz_consent_status")||jQuery("body").hasClass("cmplz-status-marketing"):void 0!==window.Cookiebot?this.settings.consentGiven=Cookiebot.consented:void 0!==window.BorlabsCookie&&(this.settings.consentGiven=window.BorlabsCookie.checkCookieConsent("youtube"));var t=jQuery.Event("sbycheckconsent");return t.feed=this,jQuery(window).trigger(t),this.settings.consentGiven&&(this.settings.noCDN=!1),this.settings.consentGiven},afterConsentToggled:function(){if(this.checkConsent()){var e=this;window.sby.maybeAddYTAPI(),e.maybeRaiseImageResolution(),e.applyFullFeatures(),setTimeout(function(){e.afterResize()},500)}},removeFeatures:function(){this.settings.noCDN&&e(this.el).find(".sby_video_thumbnail").each(function(){e(this).removeAttr("data-sby-lightbox")})},applyFullFeatures:function(){var i=this;e(i.el).find(".sby_header_img img").attr("src",e(i.el).find(".sby_header_img").attr("data-avatar-url")),void 0===e(i.el).find(".sby_video_thumbnail").first().attr("data-sby-lightbox")&&i.settings.lightboxEnabled&&e(i.el).find(".sby_video_thumbnail").each(function(){e(this).attr("data-sby-lightbox",i.index)});var t=e(i.el);if(t.find(".sby_no_consent").removeClass("sby_no_consent"),t.hasClass("sby_layout_gallery")&&t.find(".sby_player_outer_wrap").length){if(this.maybeRaiseSingleImageResolution(t.find(".sby_player_outer_wrap"),0,!0),t.find(".sby_item").first().addClass("sby_current"),!i.canCreatePlayer())return;t.find(".sby_player_outer_wrap iframe").length||i.createPlayer("sby_player"+i.index)}},locationGuess:function(){var i=e(this.el),t="content";return i.closest("footer").length?t="footer":i.closest(".header").length||i.closest("header").length?t="header":(i.closest(".sidebar").length||i.closest("aside").length)&&(t="sidebar"),t}},a.prototype={getData:function(e){return{feedIndex:parseInt(e.closest(".sb_youtube").attr("data-sby-index")-1),link:e.attr("href"),videoTitle:void 0!==e.attr("data-video-title")?e.attr("data-video-title"):"YouTube Video",video:e.attr("data-video-id")}},template:function(){return"<div id='sby_lightboxOverlay' class='sby_lightboxOverlay'></div><div id='sby_lightbox' class='sby_lightbox'><div class='sby_lb-outerContainer'><div class='sby_lb-container'><img class='sby_lb-image' alt='Lightbox image placeholder' src='' /><div class='sby_lb-player sby_lb-player-placeholder' id='sby_lb-player'></div><div class='sby_lb-nav'><a class='sby_lb-prev' href='#' ><p class='sby-screenreader'>Previous Slide</p><span></span></a><a class='sby_lb-next' href='#' ><p class='sby-screenreader'>Next Slide</p><span></span></a></div><div class='sby_lb-loader'><a class='sby_lb-cancel'></a></div></div></div><div class='sby_lb-dataContainer'><div class='sby_lb-data'><div class='sby_lb-details'><div class='sby_lb-caption'></div><div class='sby_lb-info'><div class='sby_lb-number'></div></div></div><div class='sby_lb-closeContainer'><a class='sby_lb-close'></a></div></div></div></div>"},beforePlayerSetup:function(e,i,t,s,a){},afterPlayerSetup:function(e,i,t,s){},afterResize:function(){var i=e("#sby_lightbox .sby_lb-player").height();if(i>100){var t=e("#sby_lightbox .sby_lb-outerContainer").height()-i;t>10&&e("#sby_lightbox .sby_lb-player").css("top",t/2)}},pausePlayer:function(){void 0!==YT.get("sby_lb-player")&&"function"==typeof YT.get("sby_lb-player").pauseVideo?YT.get("sby_lb-player").pauseVideo():void 0!==window.sbyLightboxPlayer&&"function"==typeof window.sbyLightboxPlayer.pauseVideo&&window.sbyLightboxPlayer.pauseVideo()}},window.sby_init=function(){window.sby=new t,window.sby.createPage(window.sby.createFeeds,{whenFeedsCreated:window.sby.afterFeedsCreated})}}(jQuery),void 0===window.sbyEagerLoading&&(window.sbyEagerLoading=void 0!==window.sbyOptions&&window.sbyOptions.eagerload,jQuery("div[data-vc-video-bg]").length&&(window.sbyEagerLoading=!0)),void 0===window.sbySemiEagerLoading&&(window.sbySemiEagerLoading=void 0!==window.sbyOptions&&window.sbyOptions.semiEagerload,(jQuery("div[data-vc-video-bg]").length||window.sbyEagerLoading)&&(window.sbySemiEagerLoading=!1)),jQuery(document).ready(function(e){window.sbySemiEagerLoading||sby_init(),e("#cookie-notice a").on("click",function(){setTimeout(function(){e.each(window.sby.feeds,function(e){window.sby.feeds[e].afterConsentToggled()})},1e3)}),e("#cookie-law-info-bar a").on("click",function(){setTimeout(function(){e.each(window.sby.feeds,function(e){window.sby.feeds[e].afterConsentToggled()})},1e3)}),e(".cli-user-preference-checkbox").on("click",function(){setTimeout(function(){e.each(window.sby.feeds,function(e){window.sby.feeds[e].settings.consentGiven=!1,window.sby.feeds[e].afterConsentToggled()})},1e3)}),e(window).on("CookiebotOnAccept",function(i){e.each(window.sby.feeds,function(e){window.sby.feeds[e].settings.consentGiven=!0,window.sby.feeds[e].afterConsentToggled()})}),e(document).on("cmplzAcceptAll",function(i){e.each(window.sby.feeds,function(e){window.sby.feeds[e].settings.consentGiven=!0,window.sby.feeds[e].afterConsentToggled()})}),e(document).on("cmplzRevoke",function(i){e.each(window.sby.feeds,function(e){window.sby.feeds[e].settings.consentGiven=!1,window.sby.feeds[e].afterConsentToggled()})}),e(document).on("borlabs-cookie-consent-saved",function(i){e.each(window.sby.feeds,function(e){window.sby.feeds[e].settings.consentGiven=!1,window.sby.feeds[e].afterConsentToggled()})})})}if(window.sbySemiEagerLoading){var sbyYScriptId="sby-youtube-api",sbyYScript=document.getElementById(sbyYScriptId);if(null===sbyYScript){var tag=document.createElement("script"),firstScript=document.getElementsByTagName("script")[0];tag.src="https://www.youtube.com/iframe_api",tag.id=sbyYScriptId,firstScript.parentNode.insertBefore(tag,firstScript)}}window.onYouTubeIframeAPIReady=function(){var e=document.getElementsByClassName("sb_youtube").length;if(e>0){if(window.sbySemiEagerLoading){if(void 0!==window.sby)for(var i=0;i<e;i++)window.sby.feeds[i].playerAPIReady=!0;else window.sbyAPIReady=!0;sby_init()}else if(jQuery(".sb_youtube").each(function(e){var i=jQuery(this);i.find(".sby_live_player").length&&(player=new YT.Player(i.find(".sby_live_player").attr("id"),{events:{onReady:function(){i.find(".sby_live_player").hide(),i.find(".sby_item").remove();var t=YT.get(i.find(".sby_live_player").attr("id")).getVideoData().video_id;i.find(".sby_player_video_thumbnail").attr("data-video-id",t).css("z-index",-1);i.find(".sby_item").length;var s={action:"sby_live_retrieve",video_id:t,feed_id:i.attr("data-feedid"),atts:i.attr("data-shortcode-atts")};jQuery.ajax({url:sbyOptions.adminAjaxUrl,type:"post",data:s,success:function(t){if(0===t.trim().indexOf("{")){var s=window.sby.feeds[e],a=JSON.parse(t),n=void 0!==a.feedStatus.checkWPPosts&&a.feedStatus.checkWPPosts;s.settings.debugEnabled&&console.log(a),s.settings.checkWPPosts=!!n,s.appendNewPosts(a.html),s.addResizedImages(a.resizedImages),s.afterInitialImagesLoaded(),a.feedStatus.shouldPaginate?s.outOfPages=!1:(s.outOfPages=!0,i.find(".sby_load_btn").hide()),jQuery(".sby_no_js").removeClass("sby_no_js"),i.find(".sby_live_player").remove(),i.hasClass("sby_layout_gallery")&&s.createPlayer("sby_player"+s.index),i.find(".sby_player_item").css("opacity",1),i.find(".sby_item").css("opacity",1),i.find(".sby_player_loading").removeClass("sby_player_loading"),i.hasClass("sby_layout_list")&&i.find(".sby_item_video_thumbnail").on("mouseenter",function(){jQuery(this).css("z-index",-1)})}}})}}}))}),window.sbyEagerLoading){var t=!1,s=!1;jQuery(".sb_youtube").each(function(e){var i=jQuery(this);i.hasClass("sby_layout_list")?(jQuery(this).addClass("sby_player_loaded"),i.find(".sby_item").each(function(){videoID=jQuery(this).attr("data-video-id"),player=new YT.Player("sby_player_"+videoID,{height:"100",width:"100",videoId:videoID,playerVars:{modestbranding:1,rel:0,autoplay:s},events:{onStateChange:function(e){e.target.getVideoData().video_id;1===e.data&&i.find(".sby_item").each(function(){var e=jQuery(this).attr("data-video-id");jQuery(this).find("iframe").length&&e!==jQuery(this).find("iframe").attr("id").replace("sby_player_","")&&YT.get("sby_player_"+e).pauseVideo()})}}})})):i.hasClass("sby_layout_gallery")?(jQuery(this).addClass("sby_player_loaded"),player=new YT.Player("sby_player"+e,{height:"100",width:"100",videoId:jQuery(this).find(".sby_item").first().attr("data-video-id"),playerVars:{modestbranding:1,rel:0,autoplay:s},events:{onStateChange:function(e){e.target.getVideoData().video_id;1===e.data&&i.find(".sby_item").each(function(){var i=jQuery(this).attr("data-video-id");jQuery(this).find("iframe").length&&jQuery(e.target.a).attr("id")!==jQuery(this).find("iframe").attr("id")&&YT.get("sby_player_"+i).pauseVideo()})}}})):t=!0})}else if(void 0!==window.sby)for(i=0;i<e;i++)window.sby.feeds[i].playerAPIReady=!0;else window.sbyAPIReady=!0;t&&(jQuery("#sby_lb-player").length||jQuery(".sb_youtube").first().append('<div class="sby_lb-player-loaded sby_lb-player" id="sby_lb-player" style="display: none;"></div>'),player=new YT.Player("sby_lb-player",{height:"100",width:"100",videoId:jQuery(this).find(".sby_item").first().attr("data-video-id"),playerVars:{modestbranding:1,rel:0,autoplay:s}}),window.sbyLightboxPlayer=player)}};
|
languages/feeds-for-youtube-fr_FR.po
CHANGED
@@ -217,7 +217,7 @@ msgid ""
|
|
217 |
"that the plugin will check for new data in the background so that the feed "
|
218 |
"is updated behind the scenes. You can select at what time and how often the "
|
219 |
"plugin should check for new data using the settings below. <b>Please note</"
|
220 |
-
"b> that the plugin will initially check for data from
|
221 |
"page first loads, but then after that will check in the background on the "
|
222 |
"schedule selected - unless the cache is cleared."
|
223 |
msgstr ""
|
217 |
"that the plugin will check for new data in the background so that the feed "
|
218 |
"is updated behind the scenes. You can select at what time and how often the "
|
219 |
"plugin should check for new data using the settings below. <b>Please note</"
|
220 |
+
"b> that the plugin will initially check for data from YouTube when the "
|
221 |
"page first loads, but then after that will check in the background on the "
|
222 |
"schedule selected - unless the cache is cleared."
|
223 |
msgstr ""
|
languages/feeds-for-youtube.pot
CHANGED
@@ -212,13 +212,13 @@ msgid ""
|
|
212 |
"minutes then the plugin will clear the cached data after that length of "
|
213 |
"time, and the next time the page is viewed it will check for new data. "
|
214 |
"<b>Tip:</b> If you're experiencing an issue with the plugin not updating "
|
215 |
-
"automatically then try enabling the setting labeled <b>'
|
216 |
"on interval'</b> which is located on the 'Customize' tab.<br><br>\n"
|
217 |
" <b>2. In the background</b><br>Selecting this option means "
|
218 |
"that the plugin will check for new data in the background so that the feed "
|
219 |
"is updated behind the scenes. You can select at what time and how often the "
|
220 |
"plugin should check for new data using the settings below. <b>Please note</"
|
221 |
-
"b> that the plugin will initially check for data from
|
222 |
"page first loads, but then after that will check in the background on the "
|
223 |
"schedule selected - unless the cache is cleared."
|
224 |
msgstr ""
|
212 |
"minutes then the plugin will clear the cached data after that length of "
|
213 |
"time, and the next time the page is viewed it will check for new data. "
|
214 |
"<b>Tip:</b> If you're experiencing an issue with the plugin not updating "
|
215 |
+
"automatically then try enabling the setting labeled <b>'Cron Clear Cache "
|
216 |
"on interval'</b> which is located on the 'Customize' tab.<br><br>\n"
|
217 |
" <b>2. In the background</b><br>Selecting this option means "
|
218 |
"that the plugin will check for new data in the background so that the feed "
|
219 |
"is updated behind the scenes. You can select at what time and how often the "
|
220 |
"plugin should check for new data using the settings below. <b>Please note</"
|
221 |
+
"b> that the plugin will initially check for data from YouTube when the "
|
222 |
"page first loads, but then after that will check in the background on the "
|
223 |
"schedule selected - unless the cache is cleared."
|
224 |
msgstr ""
|
youtube-feed.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Feeds for YouTube
|
4 |
Plugin URI: http://smashballoon.com/youtube-feed
|
5 |
Description: The Feeds for YouTube plugin allows you to display customizable YouTube feeds from any YouTube channel.
|
6 |
-
Version: 1.4.
|
7 |
Author: Smash Balloon YouTube Team
|
8 |
Author URI: http://smashballoon.com/
|
9 |
Text Domain: feeds-for-youtube
|
@@ -26,7 +26,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
26 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
27 |
|
28 |
if ( ! defined( 'SBYVER' ) ) {
|
29 |
-
define( 'SBYVER', '1.4.
|
30 |
}
|
31 |
if ( ! defined( 'SBY_DBVERSION' ) ) {
|
32 |
define( 'SBY_DBVERSION', '1.4' );
|
3 |
Plugin Name: Feeds for YouTube
|
4 |
Plugin URI: http://smashballoon.com/youtube-feed
|
5 |
Description: The Feeds for YouTube plugin allows you to display customizable YouTube feeds from any YouTube channel.
|
6 |
+
Version: 1.4.3
|
7 |
Author: Smash Balloon YouTube Team
|
8 |
Author URI: http://smashballoon.com/
|
9 |
Text Domain: feeds-for-youtube
|
26 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
27 |
|
28 |
if ( ! defined( 'SBYVER' ) ) {
|
29 |
+
define( 'SBYVER', '1.4.3' );
|
30 |
}
|
31 |
if ( ! defined( 'SBY_DBVERSION' ) ) {
|
32 |
define( 'SBY_DBVERSION', '1.4' );
|