From dc36e139599d01ed7b0a03aa72888462b46fdc77 Mon Sep 17 00:00:00 2001 From: Oleksandr Yendzevych Date: Thu, 26 Jan 2023 15:59:48 +0200 Subject: [PATCH] Version 1.8.3 (#89) * Improved accessibility of the Video Popup block. * Added the ability to load block assets outside Getwid. * Fixed an issue with the Tabs block styles being broken when it's nested inside itself. * Fixed an issue with the Media Text Slider block not working properly in WP 6.1. --- .gitignore | 1 + getwid.php | 2 +- includes/blocks/accordion.php | 2 +- includes/blocks/advanced-heading.php | 2 +- includes/blocks/advanced-spacer.php | 2 +- includes/blocks/banner.php | 2 +- includes/blocks/circle-progress-bar.php | 2 +- includes/blocks/contact-form.php | 2 +- includes/blocks/content-slider.php | 2 +- includes/blocks/content-timeline.php | 2 +- includes/blocks/countdown.php | 2 +- includes/blocks/counter.php | 2 +- includes/blocks/custom-post-type.php | 2 +- includes/blocks/google-map.php | 2 +- includes/blocks/image-hotspot.php | 2 +- includes/blocks/images-slider.php | 2 +- includes/blocks/images-stack.php | 2 +- includes/blocks/instagram.php | 2 +- includes/blocks/mailchimp.php | 2 +- includes/blocks/media-text-slider.php | 2 +- includes/blocks/person.php | 2 +- includes/blocks/post-carousel.php | 2 +- includes/blocks/post-slider.php | 2 +- includes/blocks/price-box.php | 2 +- includes/blocks/price-list.php | 2 +- includes/blocks/progress-bar.php | 2 +- includes/blocks/recent-posts.php | 2 +- includes/blocks/section.php | 2 +- includes/blocks/social-links.php | 2 +- includes/blocks/table-of-contents.php | 2 +- includes/blocks/table.php | 2 +- includes/blocks/tabs.php | 2 +- .../template-parts/acf/background-image.php | 2 +- includes/blocks/template-parts/acf/image.php | 2 +- includes/blocks/template-parts/acf/select.php | 2 +- .../blocks/template-parts/acf/wysiwyg.php | 2 +- .../blocks/template-parts/post-author.php | 2 +- .../blocks/template-parts/post-button.php | 2 +- .../blocks/template-parts/post-categories.php | 2 +- .../blocks/template-parts/post-comments.php | 2 +- .../blocks/template-parts/post-content.php | 2 +- .../template-parts/post-custom-field.php | 2 +- includes/blocks/template-parts/post-date.php | 2 +- .../post-featured-background-image.php | 2 +- .../template-parts/post-featured-image.php | 2 +- includes/blocks/template-parts/post-link.php | 2 +- includes/blocks/template-parts/post-meta.php | 2 +- includes/blocks/template-parts/post-tags.php | 2 +- includes/blocks/template-parts/post-title.php | 2 +- includes/blocks/testimonial.php | 2 +- includes/blocks/toggle.php | 2 +- includes/blocks/video-popup.php | 2 +- includes/settings-page.php | 8 ++-- languages/getwid.pot | 12 +++--- readme.txt | 6 +++ .../media-text-slider/edit.js | 2 +- src/blocks/tabs/tabs/style.scss | 37 +++++++++---------- src/blocks/video-popup/edit.js | 23 ++++++++++-- src/blocks/video-popup/save.js | 29 +++++++++++---- 59 files changed, 129 insertions(+), 91 deletions(-) diff --git a/.gitignore b/.gitignore index 5d8cdb3ca..95a85cb5c 100755 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ .idea /stats.json /src/blocks/all-blocks +*.code-workspace \ No newline at end of file diff --git a/getwid.php b/getwid.php index 4d86a4dd4..80b1a2fee 100755 --- a/getwid.php +++ b/getwid.php @@ -3,7 +3,7 @@ * Plugin Name: Getwid * Plugin URI: https://motopress.com/products/getwid/ * Description: Extra Gutenberg blocks for building seamless and aesthetic websites in the WordPress block editor. - * Version: 1.8.2 + * Version: 1.8.3 * Author: MotoPress * Author URI: https://motopress.com/ * License: GPLv2 or later diff --git a/includes/blocks/accordion.php b/includes/blocks/accordion.php index 462684286..300daa200 100755 --- a/includes/blocks/accordion.php +++ b/includes/blocks/accordion.php @@ -46,7 +46,7 @@ public function block_frontend_styles($styles) { return $styles; } - private function block_frontend_assets() { + public function block_frontend_assets() { if ( is_admin() ) { return; diff --git a/includes/blocks/advanced-heading.php b/includes/blocks/advanced-heading.php index 47265662f..0f5fe0ce7 100755 --- a/includes/blocks/advanced-heading.php +++ b/includes/blocks/advanced-heading.php @@ -22,7 +22,7 @@ public function getLabel() { return __('Advanced Heading', 'getwid'); } - private function block_frontend_assets() { + public function block_frontend_assets() { if ( is_admin() ) { return; diff --git a/includes/blocks/advanced-spacer.php b/includes/blocks/advanced-spacer.php index aae99b148..230ec1dcf 100755 --- a/includes/blocks/advanced-spacer.php +++ b/includes/blocks/advanced-spacer.php @@ -23,7 +23,7 @@ public function getLabel() { return __('Advanced Spacer', 'getwid'); } - private function block_frontend_assets( $attributes = null ) { + public function block_frontend_assets( $attributes = null ) { if ( is_admin() ) { return; diff --git a/includes/blocks/banner.php b/includes/blocks/banner.php index 0a32ff8b0..c37ce8948 100755 --- a/includes/blocks/banner.php +++ b/includes/blocks/banner.php @@ -22,7 +22,7 @@ public function getLabel() { return __('Banner', 'getwid'); } - private function block_frontend_assets( $attributes = null ) { + public function block_frontend_assets( $attributes = null ) { if ( is_admin() ) { return; diff --git a/includes/blocks/circle-progress-bar.php b/includes/blocks/circle-progress-bar.php index 2b8d6bf10..97a6d0b6e 100755 --- a/includes/blocks/circle-progress-bar.php +++ b/includes/blocks/circle-progress-bar.php @@ -31,7 +31,7 @@ public function getLabel() { return __('Circular Progress Bar', 'getwid'); } - private function block_frontend_assets( $attributes = null ) { + public function block_frontend_assets( $attributes = null ) { if ( is_admin() ) { return; diff --git a/includes/blocks/contact-form.php b/includes/blocks/contact-form.php index 6417b2ee3..b304fbe45 100755 --- a/includes/blocks/contact-form.php +++ b/includes/blocks/contact-form.php @@ -114,7 +114,7 @@ public function render_captcha_block( $attributes ) { } /* #endregion */ - private function block_frontend_assets() { + public function block_frontend_assets() { if ( is_admin() ) { return; diff --git a/includes/blocks/content-slider.php b/includes/blocks/content-slider.php index 1e00b972b..1af19f84a 100644 --- a/includes/blocks/content-slider.php +++ b/includes/blocks/content-slider.php @@ -77,7 +77,7 @@ public function block_editor_scripts($scripts) { return $scripts; } - private function block_frontend_assets() { + public function block_frontend_assets() { if ( is_admin() ) { return; diff --git a/includes/blocks/content-timeline.php b/includes/blocks/content-timeline.php index 38429530b..f7ca77e8f 100755 --- a/includes/blocks/content-timeline.php +++ b/includes/blocks/content-timeline.php @@ -23,7 +23,7 @@ public function getLabel() { return __('Content Timeline', 'getwid'); } - private function block_frontend_assets() { + public function block_frontend_assets() { if ( is_admin() ) { return; diff --git a/includes/blocks/countdown.php b/includes/blocks/countdown.php index dd460e05f..404652799 100755 --- a/includes/blocks/countdown.php +++ b/includes/blocks/countdown.php @@ -184,7 +184,7 @@ public function block_editor_scripts($scripts) { return $scripts; } - private function block_frontend_assets() { + public function block_frontend_assets() { if ( is_admin() ) { return; diff --git a/includes/blocks/counter.php b/includes/blocks/counter.php index 5989d89d0..13fe3e24f 100755 --- a/includes/blocks/counter.php +++ b/includes/blocks/counter.php @@ -54,7 +54,7 @@ public function block_editor_scripts( $scripts ) { return $scripts; } - private function block_frontend_assets() { + public function block_frontend_assets() { if ( is_admin() ) { return; diff --git a/includes/blocks/custom-post-type.php b/includes/blocks/custom-post-type.php index 050f08539..d6e1d5400 100755 --- a/includes/blocks/custom-post-type.php +++ b/includes/blocks/custom-post-type.php @@ -130,7 +130,7 @@ public function block_frontend_styles($styles) { return $styles; } - private function block_frontend_assets() { + public function block_frontend_assets() { if ( is_admin() ) { return; diff --git a/includes/blocks/google-map.php b/includes/blocks/google-map.php index c5d1bf584..1b65c55bb 100755 --- a/includes/blocks/google-map.php +++ b/includes/blocks/google-map.php @@ -79,7 +79,7 @@ public function get_google_api_key() { wp_send_json_success( $response ); } - private function block_frontend_assets( $attributes = [], $content = '' ) { + public function block_frontend_assets( $attributes = [], $content = '' ) { if ( is_admin() ) { return; diff --git a/includes/blocks/image-hotspot.php b/includes/blocks/image-hotspot.php index 78faf1c39..65578c1d9 100755 --- a/includes/blocks/image-hotspot.php +++ b/includes/blocks/image-hotspot.php @@ -126,7 +126,7 @@ public function block_editor_scripts($scripts) { return $scripts; } - private function block_frontend_assets() { + public function block_frontend_assets() { if ( is_admin() ) { return; diff --git a/includes/blocks/images-slider.php b/includes/blocks/images-slider.php index e6e6bbba6..590298494 100755 --- a/includes/blocks/images-slider.php +++ b/includes/blocks/images-slider.php @@ -82,7 +82,7 @@ public function block_editor_scripts($scripts) { return $scripts; } - private function block_frontend_assets() { + public function block_frontend_assets() { if ( is_admin() ) { return; diff --git a/includes/blocks/images-stack.php b/includes/blocks/images-stack.php index d6b902085..69febffd0 100755 --- a/includes/blocks/images-stack.php +++ b/includes/blocks/images-stack.php @@ -23,7 +23,7 @@ public function getLabel() { return __('Image Stack Gallery', 'getwid'); } - private function block_frontend_assets() { + public function block_frontend_assets() { if ( is_admin() ) { return; diff --git a/includes/blocks/instagram.php b/includes/blocks/instagram.php index ae9b94185..af0376f2f 100755 --- a/includes/blocks/instagram.php +++ b/includes/blocks/instagram.php @@ -71,7 +71,7 @@ public function block_frontend_styles($styles) { return $styles; } - private function block_frontend_assets() { + public function block_frontend_assets() { if ( is_admin() ) { return; diff --git a/includes/blocks/mailchimp.php b/includes/blocks/mailchimp.php index e44a0281b..1f7f074b8 100755 --- a/includes/blocks/mailchimp.php +++ b/includes/blocks/mailchimp.php @@ -62,7 +62,7 @@ private function register_mailchimp_blocks() { /* #endregion */ } - private function block_frontend_assets() { + public function block_frontend_assets() { if ( is_admin() ) { return; diff --git a/includes/blocks/media-text-slider.php b/includes/blocks/media-text-slider.php index 420024dd8..fb71831bc 100755 --- a/includes/blocks/media-text-slider.php +++ b/includes/blocks/media-text-slider.php @@ -84,7 +84,7 @@ public function block_editor_scripts($scripts) { return $scripts; } - private function block_frontend_assets() { + public function block_frontend_assets() { if ( is_admin() ) { return; diff --git a/includes/blocks/person.php b/includes/blocks/person.php index 67f366d69..66f248b7a 100755 --- a/includes/blocks/person.php +++ b/includes/blocks/person.php @@ -23,7 +23,7 @@ public function getLabel() { return __('Person', 'getwid'); } - private function block_frontend_assets() { + public function block_frontend_assets() { if ( is_admin() ) { return; diff --git a/includes/blocks/post-carousel.php b/includes/blocks/post-carousel.php index fe0cf9554..ceb1d9bb9 100755 --- a/includes/blocks/post-carousel.php +++ b/includes/blocks/post-carousel.php @@ -219,7 +219,7 @@ public function block_frontend_styles($styles) { return $styles; } - private function block_frontend_assets() { + public function block_frontend_assets() { if ( is_admin() ) { return; diff --git a/includes/blocks/post-slider.php b/includes/blocks/post-slider.php index 4026ba029..9d3a43909 100755 --- a/includes/blocks/post-slider.php +++ b/includes/blocks/post-slider.php @@ -207,7 +207,7 @@ public function block_frontend_styles($styles) { return $styles; } - private function block_frontend_assets() { + public function block_frontend_assets() { if ( is_admin() ) { return; diff --git a/includes/blocks/price-box.php b/includes/blocks/price-box.php index 90148e5a4..6b87d55cd 100755 --- a/includes/blocks/price-box.php +++ b/includes/blocks/price-box.php @@ -23,7 +23,7 @@ public function getLabel() { return __('Price Box', 'getwid'); } - private function block_frontend_assets() { + public function block_frontend_assets() { if ( is_admin() ) { return; diff --git a/includes/blocks/price-list.php b/includes/blocks/price-list.php index f9136b8fa..0a6e44101 100755 --- a/includes/blocks/price-list.php +++ b/includes/blocks/price-list.php @@ -23,7 +23,7 @@ public function getLabel() { return __('Price List', 'getwid'); } - private function block_frontend_assets() { + public function block_frontend_assets() { if ( is_admin() ) { return; diff --git a/includes/blocks/progress-bar.php b/includes/blocks/progress-bar.php index 0da7f9158..be09f30b3 100755 --- a/includes/blocks/progress-bar.php +++ b/includes/blocks/progress-bar.php @@ -31,7 +31,7 @@ public function getLabel() { return __('Progress Bar', 'getwid'); } - private function block_frontend_assets() { + public function block_frontend_assets() { if ( is_admin() ) { return; diff --git a/includes/blocks/recent-posts.php b/includes/blocks/recent-posts.php index 1c83f8865..7e3850069 100755 --- a/includes/blocks/recent-posts.php +++ b/includes/blocks/recent-posts.php @@ -94,7 +94,7 @@ public function getLabel() { return __('Recent Posts', 'getwid'); } - private function block_frontend_assets() { + public function block_frontend_assets() { if ( is_admin() ) { return; diff --git a/includes/blocks/section.php b/includes/blocks/section.php index b2234536f..db45a97dd 100755 --- a/includes/blocks/section.php +++ b/includes/blocks/section.php @@ -118,7 +118,7 @@ public function block_editor_scripts($scripts) { return $scripts; } - private function block_frontend_assets( $attributes = [], $content = '' ) { + public function block_frontend_assets( $attributes = [], $content = '' ) { if ( is_admin() ) { return; diff --git a/includes/blocks/social-links.php b/includes/blocks/social-links.php index a04d9305d..55905921c 100755 --- a/includes/blocks/social-links.php +++ b/includes/blocks/social-links.php @@ -35,7 +35,7 @@ public function block_frontend_styles($styles) { return $styles; } - private function block_frontend_assets() { + public function block_frontend_assets() { if ( is_admin() ) { return; diff --git a/includes/blocks/table-of-contents.php b/includes/blocks/table-of-contents.php index ff7753f00..d8671db1f 100755 --- a/includes/blocks/table-of-contents.php +++ b/includes/blocks/table-of-contents.php @@ -31,7 +31,7 @@ public function getLabel() { return __('Table of Contents', 'getwid'); } - private function block_frontend_assets() { + public function block_frontend_assets() { if ( is_admin() ) { return; diff --git a/includes/blocks/table.php b/includes/blocks/table.php index ca9473435..0c941950b 100755 --- a/includes/blocks/table.php +++ b/includes/blocks/table.php @@ -22,7 +22,7 @@ public function getLabel() { return __( 'Table', 'getwid' ); } - private function block_frontend_assets() { + public function block_frontend_assets() { if ( is_admin() ) { return; diff --git a/includes/blocks/tabs.php b/includes/blocks/tabs.php index 5cbc751f1..04d3ffdfa 100755 --- a/includes/blocks/tabs.php +++ b/includes/blocks/tabs.php @@ -37,7 +37,7 @@ public function block_editor_scripts($scripts) { return $scripts; } - private function block_frontend_assets() { + public function block_frontend_assets() { if ( is_admin() ) { return; diff --git a/includes/blocks/template-parts/acf/background-image.php b/includes/blocks/template-parts/acf/background-image.php index 2e63734bb..042c9fc9b 100644 --- a/includes/blocks/template-parts/acf/background-image.php +++ b/includes/blocks/template-parts/acf/background-image.php @@ -160,7 +160,7 @@ public function __construct() { ); } - private function block_frontend_assets() { + public function block_frontend_assets() { if ( is_admin() ) { return; diff --git a/includes/blocks/template-parts/acf/image.php b/includes/blocks/template-parts/acf/image.php index 4184258e1..fddf2ddc6 100644 --- a/includes/blocks/template-parts/acf/image.php +++ b/includes/blocks/template-parts/acf/image.php @@ -39,7 +39,7 @@ public function __construct() { ); } - private function block_frontend_assets() { + public function block_frontend_assets() { if ( is_admin() ) { return; diff --git a/includes/blocks/template-parts/acf/select.php b/includes/blocks/template-parts/acf/select.php index 5c01d497f..e8b26c60d 100644 --- a/includes/blocks/template-parts/acf/select.php +++ b/includes/blocks/template-parts/acf/select.php @@ -62,7 +62,7 @@ public function __construct() { ); } - private function block_frontend_assets() { + public function block_frontend_assets() { if ( is_admin() ) { return; diff --git a/includes/blocks/template-parts/acf/wysiwyg.php b/includes/blocks/template-parts/acf/wysiwyg.php index 6f0282bfb..062e93990 100644 --- a/includes/blocks/template-parts/acf/wysiwyg.php +++ b/includes/blocks/template-parts/acf/wysiwyg.php @@ -55,7 +55,7 @@ public function __construct() { ); } - private function block_frontend_assets() { + public function block_frontend_assets() { if ( is_admin() ) { return; diff --git a/includes/blocks/template-parts/post-author.php b/includes/blocks/template-parts/post-author.php index 50b129c07..bd0ffc93f 100755 --- a/includes/blocks/template-parts/post-author.php +++ b/includes/blocks/template-parts/post-author.php @@ -62,7 +62,7 @@ public function __construct() { ); } - private function block_frontend_assets() { + public function block_frontend_assets() { if ( is_admin() ) { return; diff --git a/includes/blocks/template-parts/post-button.php b/includes/blocks/template-parts/post-button.php index 92a4f733f..4126862b6 100755 --- a/includes/blocks/template-parts/post-button.php +++ b/includes/blocks/template-parts/post-button.php @@ -47,7 +47,7 @@ public function __construct() { ); } - private function block_frontend_assets() { + public function block_frontend_assets() { if ( is_admin() ) { return; diff --git a/includes/blocks/template-parts/post-categories.php b/includes/blocks/template-parts/post-categories.php index 5d7fae04e..da13e4f9c 100755 --- a/includes/blocks/template-parts/post-categories.php +++ b/includes/blocks/template-parts/post-categories.php @@ -67,7 +67,7 @@ public function __construct() { ); } - private function block_frontend_assets() { + public function block_frontend_assets() { if ( is_admin() ) { return; diff --git a/includes/blocks/template-parts/post-comments.php b/includes/blocks/template-parts/post-comments.php index 85711e64a..ce97c7a50 100755 --- a/includes/blocks/template-parts/post-comments.php +++ b/includes/blocks/template-parts/post-comments.php @@ -63,7 +63,7 @@ public function __construct() { ); } - private function block_frontend_assets() { + public function block_frontend_assets() { if ( is_admin() ) { return; diff --git a/includes/blocks/template-parts/post-content.php b/includes/blocks/template-parts/post-content.php index d117ebb94..384616224 100755 --- a/includes/blocks/template-parts/post-content.php +++ b/includes/blocks/template-parts/post-content.php @@ -50,7 +50,7 @@ public function __construct() { ); } - private function block_frontend_assets() { + public function block_frontend_assets() { if ( is_admin() ) { return; diff --git a/includes/blocks/template-parts/post-custom-field.php b/includes/blocks/template-parts/post-custom-field.php index 246e3b7da..a64c18024 100755 --- a/includes/blocks/template-parts/post-custom-field.php +++ b/includes/blocks/template-parts/post-custom-field.php @@ -53,7 +53,7 @@ public function __construct() { ); } - private function block_frontend_assets() { + public function block_frontend_assets() { if ( is_admin() ) { return; diff --git a/includes/blocks/template-parts/post-date.php b/includes/blocks/template-parts/post-date.php index 83ede1a2e..20894078e 100755 --- a/includes/blocks/template-parts/post-date.php +++ b/includes/blocks/template-parts/post-date.php @@ -70,7 +70,7 @@ public function __construct() { ); } - private function block_frontend_assets() { + public function block_frontend_assets() { if ( is_admin() ) { return; diff --git a/includes/blocks/template-parts/post-featured-background-image.php b/includes/blocks/template-parts/post-featured-background-image.php index 39f254cdf..7b78b6ee8 100755 --- a/includes/blocks/template-parts/post-featured-background-image.php +++ b/includes/blocks/template-parts/post-featured-background-image.php @@ -161,7 +161,7 @@ public function __construct() { ); } - private function block_frontend_assets() { + public function block_frontend_assets() { if ( is_admin() ) { return; diff --git a/includes/blocks/template-parts/post-featured-image.php b/includes/blocks/template-parts/post-featured-image.php index ce6ec9e74..1241a2107 100755 --- a/includes/blocks/template-parts/post-featured-image.php +++ b/includes/blocks/template-parts/post-featured-image.php @@ -36,7 +36,7 @@ public function __construct() { ); } - private function block_frontend_assets() { + public function block_frontend_assets() { if ( is_admin() ) { return; diff --git a/includes/blocks/template-parts/post-link.php b/includes/blocks/template-parts/post-link.php index 3f5b17995..e03dc4f96 100755 --- a/includes/blocks/template-parts/post-link.php +++ b/includes/blocks/template-parts/post-link.php @@ -41,7 +41,7 @@ public function __construct() { ); } - private function block_frontend_assets() { + public function block_frontend_assets() { if ( is_admin() ) { return; diff --git a/includes/blocks/template-parts/post-meta.php b/includes/blocks/template-parts/post-meta.php index 711e44291..245d4c91a 100755 --- a/includes/blocks/template-parts/post-meta.php +++ b/includes/blocks/template-parts/post-meta.php @@ -45,7 +45,7 @@ public function __construct() { ); } - private function block_frontend_assets() { + public function block_frontend_assets() { if ( is_admin() ) { return; diff --git a/includes/blocks/template-parts/post-tags.php b/includes/blocks/template-parts/post-tags.php index ff4c0fd24..02a1ca555 100755 --- a/includes/blocks/template-parts/post-tags.php +++ b/includes/blocks/template-parts/post-tags.php @@ -66,7 +66,7 @@ public function __construct() { ); } - private function block_frontend_assets() { + public function block_frontend_assets() { if ( is_admin() ) { return; diff --git a/includes/blocks/template-parts/post-title.php b/includes/blocks/template-parts/post-title.php index cb86ca6f2..27e1e8460 100755 --- a/includes/blocks/template-parts/post-title.php +++ b/includes/blocks/template-parts/post-title.php @@ -58,7 +58,7 @@ public function __construct() { ); } - private function block_frontend_assets() { + public function block_frontend_assets() { if ( is_admin() ) { return; diff --git a/includes/blocks/testimonial.php b/includes/blocks/testimonial.php index a173eb8e5..d814055df 100755 --- a/includes/blocks/testimonial.php +++ b/includes/blocks/testimonial.php @@ -23,7 +23,7 @@ public function getLabel() { return __('Testimonial', 'getwid'); } - private function block_frontend_assets() { + public function block_frontend_assets() { if ( is_admin() ) { return; diff --git a/includes/blocks/toggle.php b/includes/blocks/toggle.php index ee1654422..77a4b9358 100755 --- a/includes/blocks/toggle.php +++ b/includes/blocks/toggle.php @@ -41,7 +41,7 @@ public function block_frontend_styles($styles) { return $styles; } - private function block_frontend_assets() { + public function block_frontend_assets() { if ( is_admin() ) { return; diff --git a/includes/blocks/video-popup.php b/includes/blocks/video-popup.php index 025631da5..8cfc39bdc 100755 --- a/includes/blocks/video-popup.php +++ b/includes/blocks/video-popup.php @@ -56,7 +56,7 @@ public function block_frontend_styles($styles) { return $styles; } - private function block_frontend_assets() { + public function block_frontend_assets() { if ( is_admin() ) { return; diff --git a/includes/settings-page.php b/includes/settings-page.php index 129dc12ca..85f3f0f6a 100755 --- a/includes/settings-page.php +++ b/includes/settings-page.php @@ -173,7 +173,7 @@ public function registerFields() { /* #endregion */ /* #region AssetsOptimization */ - add_settings_field( 'getwid_assets_optimization', __( 'Performance Optimization', 'getwid' ) . ' (Beta)', + add_settings_field( 'getwid_assets_optimization', __( 'Performance Optimization', 'getwid' ), [ $this, 'renderAssetsOptimization'], 'getwid_general', 'getwid_general' ); register_setting( 'getwid_general', 'getwid_load_assets_on_demand', [ 'type' => 'boolean', 'default' => false, 'sanitize_callback' => 'rest_sanitize_boolean' ] ); @@ -236,7 +236,7 @@ public function renderSectionContentWidth() { ?> -

+

/> - +

/> - +

\n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2022-06-29T17:01:28+03:00\n" +"POT-Creation-Date: 2023-01-26T15:31:47+02:00\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"X-Generator: WP-CLI 2.4.0\n" +"X-Generator: WP-CLI 2.7.1\n" "X-Domain: getwid\n" #. Plugin Name of the plugin @@ -509,7 +509,7 @@ msgid "px" msgstr "" #: includes/settings-page.php:239 -msgid "Default width of content area in the Section block. Leave empty to use the width set in your theme." +msgid "Default width of the content area in the Section block. Leave empty to use $content_width set in your theme. Set 0 to disable this option and control it via CSS." msgstr "" #: includes/settings-page.php:262 diff --git a/readme.txt b/readme.txt index cbf388ba8..10f8fc9fe 100644 --- a/readme.txt +++ b/readme.txt @@ -182,6 +182,12 @@ Getwid plugin is distributed under the terms of the GNU GPL. == Changelog == += 1.8.3, Jan 26 2023 = +* Improved accessibility of the Video Popup block. +* Added the ability to load block assets outside Getwid. +* Fixed an issue with the Tabs block styles being broken when it's nested inside itself. +* Fixed an issue with the Media Text Slider block not working properly in WP 6.1. + = 1.8.2, Jun 29 2022 = * Added the ability to set the width of the cell borders in the Advanced Table block. * Added new parameters for the Content Slider block - Adaptive Height and Draggable. diff --git a/src/blocks/media-text-slider/media-text-slider/edit.js b/src/blocks/media-text-slider/media-text-slider/edit.js index 7d995c147..78bd3a637 100755 --- a/src/blocks/media-text-slider/media-text-slider/edit.js +++ b/src/blocks/media-text-slider/media-text-slider/edit.js @@ -157,7 +157,7 @@ class Edit extends Component { }; $.each( innerBlocksOuter, (index, item) => { - if ( isEqual( contentBlockId, item.innerBlocks[ 0 ].clientId ) ) { + if ( !!item.innerBlocks[ 0 ] && isEqual( contentBlockId, item.innerBlocks[ 0 ].clientId ) ) { dispatch( 'core/block-editor' ).updateBlockAttributes( contentBlockId, { innerParent: InnerBlocksProps } ); } } ); diff --git a/src/blocks/tabs/tabs/style.scss b/src/blocks/tabs/tabs/style.scss index 9f18b6ca4..46bcbf6f3 100755 --- a/src/blocks/tabs/tabs/style.scss +++ b/src/blocks/tabs/tabs/style.scss @@ -2,7 +2,7 @@ * getwid-tabs */ -.wp-block-getwid-tabs { + .wp-block-getwid-tabs { //Specific variables for this block $border_color: #ebeef1; @@ -117,40 +117,39 @@ display: flex; /*rtl:raw: flex-direction: row-reverse; */ - .wp-block-getwid-tabs__nav-links { + > .wp-block-getwid-tabs__nav-links { flex-direction: column; align-items: initial; /*rtl:raw: justify-content: flex-start; */ flex: 1 0 auto; margin: 0 -1px 0 0; max-width: 25%; - } - .wp-block-getwid-tabs__nav-link { - margin: 0 0 5px 0; - border: 1px solid #eee; - border-right: 0; + .wp-block-getwid-tabs__nav-link { + margin: 0 0 5px 0; + border: 1px solid #eee; + border-right: 0; - * { - word-wrap: break-word; - hyphens: auto; - } + * { + word-wrap: break-word; + hyphens: auto; + } - &:last-child { - margin-bottom: 0; + &:last-child { + margin-bottom: 0; + } } } - .wp-block-getwid-tabs__tab-content { - flex: 0 1 auto; - min-width: 0; + > .wp-block-getwid-tabs__tab-content-wrapper { + flex: 1; } } .has-layout-vertical-right { flex-direction: row-reverse #{'/*rtl: row;*/'}; - .wp-block-getwid-tabs__nav-links { + > .wp-block-getwid-tabs__nav-links { margin: 0 0 0 -1px; .wp-block-getwid-tabs__nav-link { @@ -161,13 +160,13 @@ } .has-layout-horizontal-center { - .wp-block-getwid-tabs__nav-links { + > .wp-block-getwid-tabs__nav-links { justify-content: center; } } .has-layout-horizontal-right { - .wp-block-getwid-tabs__nav-links { + > .wp-block-getwid-tabs__nav-links { justify-content: flex-end #{'/*rtl: flex-start*/'}; } } diff --git a/src/blocks/video-popup/edit.js b/src/blocks/video-popup/edit.js index dc4b6f033..8215eb2d9 100755 --- a/src/blocks/video-popup/edit.js +++ b/src/blocks/video-popup/edit.js @@ -91,7 +91,6 @@ class Edit extends Component { id, url, title, - text, link, align, minHeight, @@ -247,6 +246,23 @@ class Edit extends Component { } }; + const imgAttributes = { + src: url, + alt: '', + className: classnames( + `${baseClass}__image`, + `${baseClass}__source`, + (id ? `wp-image-${id}` : ''), + ) + }; + + const hasTitle = !RichText.isEmpty(title); + + if (hasTitle) { + linkAttributes['aria-label'] = title; + imgAttributes.alt = title; + } + const controls = ( @@ -291,6 +307,8 @@ class Edit extends Component { ); + console.log(imgAttributes); + return (

@@ -310,8 +328,7 @@ class Edit extends Component {
{!!url && ( - + )}
diff --git a/src/blocks/video-popup/save.js b/src/blocks/video-popup/save.js index ab36cecd0..4842265e2 100755 --- a/src/blocks/video-popup/save.js +++ b/src/blocks/video-popup/save.js @@ -27,7 +27,6 @@ class Save extends Component { id, url, title, - text, link, align, minHeight, @@ -141,21 +140,37 @@ class Save extends Component { } }; + const imgAttributes = { + src: url, + alt: '', + className: classnames( + `${baseClass}__image`, + `${baseClass}__source`, + (id ? `wp-image-${id}` : ''), + ) + }; + + const hasTitle = !RichText.isEmpty(title); + + if (hasTitle) { + linkAttributes['aria-label'] = title; + imgAttributes.alt = title; + } + return (