Skip to content

Commit 1c4538d

Browse files
committed
Merge branch 'develop'
2 parents 34f842c + 90dce90 commit 1c4538d

File tree

6 files changed

+57
-28
lines changed

6 files changed

+57
-28
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/)
55
and this project adheres to [Semantic Versioning](http://semver.org/).
66

7+
## [4.22] - 2022-08-06
8+
### Changed
9+
* YouTube embeds in the lightbox now begin playing automatically, if the browser allows it.
10+
711
## [4.21.1] - 2022-07-20
812
### Fixed
913
* An out-of-memory PHP error when importing items.

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"ext-json": "*",
1818
"ext-simplexml": "*",
1919
"psr/log": "^1.1",
20-
"twig/twig": "^1.0 | ^2.10",
20+
"twig/twig": "1.44.6",
2121
"twig/extensions": "^1.5.4",
2222
"dhii/di": "^0.1.1",
2323
"dhii/di-abstract": "^0.1",

composer.lock

+25-16
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/custom.js

+10-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
jQuery( document ).ready( function() {
2-
if(jQuery.fn.colorbox) {
3-
jQuery( '.colorbox' ).colorbox(
4-
{iframe:true, width:'80%', height:'80%'}
5-
);
6-
}
7-
});
1+
jQuery(document).ready(function ($) {
2+
if ($.fn.colorbox) {
3+
const links = $('.colorbox')
4+
links.colorbox({
5+
iframe: true,
6+
width: '80%',
7+
height: '80%',
8+
})
9+
}
10+
})

src/Twig/Extensions/WpraExtension.php

+15-2
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,21 @@ protected function getWpraItemUrlFunction()
135135
return '';
136136
}
137137

138-
if ($options['link_to_embed'] && !empty($item['embed_url'])) {
139-
return $item['embed_url'];
138+
if ($options['link_to_embed']) {
139+
if ($item['is_yt'] && $item['yt_embed_url']) {
140+
$embedUrl = $item['yt_embed_url'];
141+
$linkBehavior = isset($options['links_open_behavior']) ? $options['links_open_behavior'] : '';
142+
143+
if ($linkBehavior === 'lightbox') {
144+
$embedUrl .= '?autoplay=1';
145+
}
146+
147+
return $embedUrl;
148+
}
149+
150+
if (!empty($item['embed_url'])) {
151+
return $item['embed_url'];
152+
}
140153
}
141154

142155
return $item['url'];

wp-rss-aggregator.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Plugin Name: WP RSS Aggregator
55
* Plugin URI: https://www.wprssaggregator.com/#utm_source=wpadmin&utm_medium=plugin&utm_campaign=wpraplugin
66
* Description: Imports and aggregates multiple RSS Feeds.
7-
* Version: 4.21.1
7+
* Version: 4.22
88
* Author: RebelCode
99
* Author URI: https://www.wprssaggregator.com
1010
* Text Domain: wprss
@@ -76,7 +76,7 @@
7676

7777
// Set the version number of the plugin.
7878
if( !defined( 'WPRSS_VERSION' ) )
79-
define( 'WPRSS_VERSION', '4.21.1' );
79+
define( 'WPRSS_VERSION', '4.22' );
8080

8181
if( !defined( 'WPRSS_WP_MIN_VERSION' ) )
8282
define( 'WPRSS_WP_MIN_VERSION', '4.8' );

0 commit comments

Comments
 (0)