diff --git a/admin/admin-init.php b/admin/admin-init.php index 243cb8f..aaed471 100755 --- a/admin/admin-init.php +++ b/admin/admin-init.php @@ -217,7 +217,7 @@ public function admin_settings_page( $page_data = array() ) { $activated_first_tab = false; $tab_data = false; foreach ( $tabs as $tab ) { - echo ' $current_page, 'tab' => $tab['name'] ), admin_url( $page_data['admin_url'] ) ) ) . '" class="nav-tab '; if ( $current_tab == '' && $activated_first_tab === false ) { echo 'nav-tab-active'; $activated_first_tab = true; diff --git a/admin/admin-interface.php b/admin/admin-interface.php index 984d8d6..f4356a3 100755 --- a/admin/admin-interface.php +++ b/admin/admin-interface.php @@ -618,6 +618,10 @@ public function save_settings( $options, $option_name = '' ) { foreach ( $options as $value ) { if ( ! isset( $value['type'] ) ) continue; if ( in_array( $value['type'], array( 'row', 'column', 'heading', 'ajax_submit', 'ajax_multi_submit' ) ) ) continue; + if ( stristr( $value['type'], 'custom_' ) !== false ) { + do_action( $this->plugin_name . '_save_setting_' . $value['type'], $value ); + continue; + } // Save for global settings of plugin framework switch ( $value['type'] ) { @@ -908,7 +912,7 @@ public function save_settings( $options, $option_name = '' ) { if ( is_array( $_POST[ $option_name ][ $id_attribute ] ) ) { $option_value = array_map( 'sanitize_textarea_field', wp_unslash( $_POST[ $option_name ][ $id_attribute ] ) ); } else { - $option_value = sanitize_textarea_field( wp_unslash( _POST[ $option_name ][ $id_attribute ] ) ); + $option_value = sanitize_textarea_field( wp_unslash( $_POST[ $option_name ][ $id_attribute ] ) ); } } else { if ( is_array( $_POST[ $option_name ][ $id_attribute ] ) ) { @@ -1030,6 +1034,14 @@ public function save_settings( $options, $option_name = '' ) { /*-----------------------------------------------------------------------------------*/ public function reset_settings( $options, $option_name = '', $reset = false, $free_version = false ) { + + if ( $reset ) { + check_admin_referer( 'save_settings_' . $this->plugin_name ); + + if ( ! current_user_can( 'manage_options' ) ) { + return false; + } + } if ( !is_array( $options ) || count( $options ) < 1 ) return; @@ -1089,6 +1101,11 @@ public function reset_settings( $options, $option_name = '', $reset = false, $fr if ( ! isset( $value['id'] ) || trim( $value['id'] ) == '' ) continue; if ( ! isset( $value['default'] ) ) $value['default'] = ''; if ( ! isset( $value['free_version'] ) ) $value['free_version'] = false; + + if ( stristr( $value['type'], 'custom_' ) !== false ) { + do_action( $this->plugin_name . '_reset_setting_' . $value['type'], $value ); + continue; + } // For way it has an option name if ( ! isset( $value['separate_option'] ) ) $value['separate_option'] = false; diff --git a/admin/admin-ui.php b/admin/admin-ui.php index 69a5996..6234373 100755 --- a/admin/admin-ui.php +++ b/admin/admin-ui.php @@ -33,7 +33,7 @@ class Admin_UI * You must change to correct plugin name that you are working */ - public $framework_version = '2.6.0'; + public $framework_version = '2.6.2'; public $plugin_name = WC_PRODUCT_SLIDER_KEY; public $plugin_path = WC_PRODUCT_SLIDER_NAME; public $google_api_key_option = ''; diff --git a/admin/includes/fonts_face.php b/admin/includes/fonts_face.php index 1220407..0cd7e3f 100755 --- a/admin/includes/fonts_face.php +++ b/admin/includes/fonts_face.php @@ -623,9 +623,9 @@ public function generate_font_css( $option, $em = '1.2' ) { $font_css = ''; if ( !@$option['style'] && !@$option['size'] && !@$option['color'] ) - $font_css = 'font-family: '.stripslashes($option["face"]).' !important;'; + $font_css = 'font-family: '.stripslashes( str_replace( array( '"', "'" ), '', $option["face"] ) ).' !important;'; else - $font_css = 'font:'.$option['style'].' '.$option['size'].'/' . $line_height . ' ' .stripslashes($option['face']).' !important; color:'.$option['color'].' !important;'; + $font_css = 'font:'.$option['style'].' '.$option['size'].'/' . $line_height . ' ' .stripslashes( str_replace( array( '"', "'" ), '', $option['face'] ) ).' !important; color:'.$option['color'].' !important;'; return apply_filters( $this->plugin_name . '_generate_font_css', $font_css, $option, $em ); } diff --git a/product-image-gallery-widget.php b/product-image-gallery-widget.php index bda7c1e..2b19da6 100755 --- a/product-image-gallery-widget.php +++ b/product-image-gallery-widget.php @@ -2,15 +2,15 @@ /* Plugin Name: Product Widget Slider for WooCommerce Description: Adds visually stunning WooCommerce product sliders to any widgeted area. Fully customizable, Widget Skin. Fully mobile responsive. Show any number of products from a selected product category. -Version: 1.9.1 +Version: 1.9.2 Author: a3rev Software Author URI: https://a3rev.com/ Requires at least: 5.6 -Tested up to: 6.0 +Tested up to: 6.1 Text Domain: woo-widget-product-slideshow Domain Path: /languages WC requires at least: 3.0 -WC tested up to: 6.5 +WC tested up to: 7.0 License: GPLv2 or later WooCommerce Widget Product Slider Lite plugin. @@ -41,7 +41,7 @@ define( 'WC_PRODUCT_SLIDER_KEY', 'woo_gallery_widget' ); define( 'WC_PRODUCT_SLIDER_PREFIX', 'wc_product_slider_' ); -define( 'WC_PRODUCT_SLIDER_VERSION', '1.9.1' ); +define( 'WC_PRODUCT_SLIDER_VERSION', '1.9.2' ); define( 'WC_PRODUCT_SLIDER_G_FONTS', true ); use \A3Rev\WCPSlider\FrameWork; diff --git a/readme.txt b/readme.txt index 35a4cbf..f76b00d 100644 --- a/readme.txt +++ b/readme.txt @@ -3,8 +3,8 @@ Contributors: a3rev, nguyencongtuan Tags: WooCommerce widgets, WooCommerce, WooCommerce widget product slideshow, WooCommerce Product images, woothemes, wordpress ecommerce Requires at least: 5.6 -Tested up to: 6.0 -Stable tag: 1.9.1 +Tested up to: 6.1 +Stable tag: 1.9.2 License: GPLv3 License URI: http://www.gnu.org/licenses/gpl-3.0.html @@ -95,6 +95,12 @@ You can use this plugin only when you have installed the WooCommerce plugin. == Changelog == += 1.9.2 - 2022/11/01 = +* This maintenance release has a security vulnerability patch, plus compatibility with WordPress major version 6.1.0 and WooCommerce version 7.0 +* Tweak - Test for compatibility with WordPress 6.1 +* Tweak - Test for compatibility with WooCommerce 7.0 +* Security – This release has a patch for a security vulnerability + = 1.9.1 - 2022/05/25 = * This release fixes a bug with the just released version 1.9.0 * Fix - Do not call update_google_map_api_key from construct of Admin UI @@ -556,6 +562,9 @@ You can use this plugin only when you have installed the WooCommerce plugin. == Upgrade Notice == += 1.9.2 = +This maintenance release has a security vulnerability patch, plus compatibility with WordPress major version 6.1.0 and WooCommerce version 7.0 + = 1.9.1 = This release fixes a bug with the just released version 1.9.0