diff --git a/CHANGELOG.md b/CHANGELOG.md index ac1d003..4793f44 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 1.9.2 +* Improve the text for screen readers upon activating the embedded content +* Fixed compatibility with other widget plugins +* Fixed handling of videos in Divi + ## 1.9.1 * Fixed an error while uninstalling the plugin * Fixed aspect ratio of embeds embedded via Divi diff --git a/assets/js/divi.js b/assets/js/divi.js new file mode 100644 index 0000000..67160dd --- /dev/null +++ b/assets/js/divi.js @@ -0,0 +1,15 @@ +/** + * Divi functionality + * + * @author Epiphyt + * @license GPL2 + * @package epiphyt\Embed_Privacy + */ +document.addEventListener( 'DOMContentLoaded', () => { + // Generate responsive video wrapper for Embed Privacy container + if ( $.fn.fitVids ) { + $( '#main-content' ).fitVids( { + customSelector: ".embed-privacy-container" + } ); + } +} ); diff --git a/assets/style/scss/divi.scss b/assets/style/scss/divi.scss index 7ce3e99..e4e2921 100644 --- a/assets/style/scss/divi.scss +++ b/assets/style/scss/divi.scss @@ -1,5 +1,10 @@ .embed-privacy-container { line-height: 1.7em; + + .fluid-width-video-wrapper > & { + inset: 0; + position: absolute; + } } // prevent hiding container around Embed Privacy diff --git a/embed-privacy.php b/embed-privacy.php index be7b903..827b594 100644 --- a/embed-privacy.php +++ b/embed-privacy.php @@ -4,7 +4,7 @@ /* Plugin Name: Embed Privacy Description: Embed Privacy prevents from loading external embeds directly and lets the user control which one should be loaded. -Version: 1.9.1 +Version: 1.9.2 Author: Epiphyt Author URI: https://epiph.yt License: GPL2 @@ -29,7 +29,7 @@ // exit if ABSPATH is not defined \defined( 'ABSPATH' ) || exit; -\define( 'EMBED_PRIVACY_VERSION', '1.9.1' ); +\define( 'EMBED_PRIVACY_VERSION', '1.9.2' ); if ( ! \defined( 'EPI_EMBED_PRIVACY_BASE' ) ) { \define( 'EPI_EMBED_PRIVACY_BASE', \WP_PLUGIN_DIR . '/embed-privacy/' ); @@ -58,7 +58,7 @@ function disable_plugin() { /** * Autoload all necessary classes. * - * @param string $class The class name of the autoloaded class + * @param string $class The class name of the auto-loaded class */ \spl_autoload_register( function( $class ) { $path = \explode( '\\', $class ); diff --git a/inc/class-embed-privacy-widget-output-filter.php b/inc/class-embed-privacy-widget-output-filter.php index 3d3be02..a918099 100644 --- a/inc/class-embed-privacy-widget-output-filter.php +++ b/inc/class-embed-privacy-widget-output-filter.php @@ -69,8 +69,7 @@ public static function get_instance() { * Initialize the functionality by registering actions and filters. */ private function __construct() { - // priority of 9 to run before the Widget Logic plugin. - \add_filter( 'dynamic_sidebar_params', [ $this, 'filter_dynamic_sidebar_params' ], 9 ); + \add_filter( 'dynamic_sidebar_params', [ $this, 'filter_dynamic_sidebar_params' ], \PHP_INT_MAX ); } /** diff --git a/inc/class-embed-privacy.php b/inc/class-embed-privacy.php index b431715..0505c60 100644 --- a/inc/class-embed-privacy.php +++ b/inc/class-embed-privacy.php @@ -977,7 +977,7 @@ public function get_output_template( $embed_provider, $embed_provider_lowercase, $footer_content .= '
'; @@ -994,8 +994,16 @@ public function get_output_template( $embed_provider, $embed_provider_lowercase, } ?>