Changeset 2924703
- Timestamp:
- 06/12/2023 09:59:15 AM (3 years ago)
- Location:
- woo-notification/trunk
- Files:
-
- 6 edited
-
CHANGELOG.txt (modified) (1 diff)
-
admin/settings.php (modified) (4 diffs)
-
includes/data.php (modified) (7 diffs)
-
includes/support.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
woo-notification.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
woo-notification/trunk/CHANGELOG.txt
r2783680 r2924703 1 /**1.2.11 - 2023.06.12**/ 2 -Updated: Change image size slug 3 1 4 /**1.2.10 - 2022.09.13**/ 2 5 -Updated: Translate for Vietnamese -
woo-notification/trunk/admin/settings.php
r2729040 r2924703 218 218 foreach ( $data as $key => $value ) { 219 219 if ( in_array( $key, $args ) ) { 220 $data[ $key ] = wp_kses_post( $this->stripslashes_deep( $value ));220 $data[ $key ] = wp_kses_post( $this->stripslashes_deep( $value ) ); 221 221 } else { 222 222 $data[ $key ] = wc_clean( $value ); … … 887 887 888 888 <td> 889 <?php global $_wp_additional_image_sizes; ?> 889 <?php 890 $additional_image_sizes = wp_get_additional_image_sizes(); 891 $default_image_sizes = array( 'thumbnail', 'medium', 'medium_large', 'large' ); 892 $image_sizes = array(); 893 894 foreach ( $default_image_sizes as $size ) { 895 $image_sizes[ $size ] = array( 896 'width' => (int) get_option( $size . '_size_w' ), 897 'height' => (int) get_option( $size . '_size_h' ), 898 'crop' => (bool) get_option( $size . '_crop' ), 899 ); 900 } 901 902 if ( $additional_image_sizes ) { 903 $image_sizes = array_merge( $image_sizes, $additional_image_sizes ); 904 } 905 906 $image_sizes['full'] = array(); 907 ?> 890 908 <select name="<?php echo esc_attr( self::set_field( 'product_sizes' ) ) ?>" 891 909 class="vi-ui fluid dropdown"> 892 <option <?php selected( self::get_field( 'product_sizes' ), 'shop_thumbnail' ) ?> 893 value="shop_thumbnail"><?php esc_attr_e( 'shop_thumbnail', 'woo-notification' ) ?> 894 - <?php echo isset( $_wp_additional_image_sizes['shop_thumbnail'] ) ? $_wp_additional_image_sizes['shop_thumbnail']['width'] . 'x' . $_wp_additional_image_sizes['shop_thumbnail']['height'] : ''; ?></option> 895 <option <?php selected( self::get_field( 'product_sizes' ), 'shop_catalog' ) ?> 896 value="shop_catalog"><?php esc_attr_e( 'shop_catalog', 'woo-notification' ) ?> 897 - <?php echo isset( $_wp_additional_image_sizes['shop_catalog'] ) ? $_wp_additional_image_sizes['shop_catalog']['width'] . 'x' . $_wp_additional_image_sizes['shop_catalog']['height'] : ''; ?></option> 898 <option <?php selected( self::get_field( 'product_sizes' ), 'shop_single' ) ?> 899 value="shop_single"><?php esc_attr_e( 'shop_single', 'woo-notification' ) ?> 900 - <?php echo isset( $_wp_additional_image_sizes['shop_single'] ) ? $_wp_additional_image_sizes['shop_single']['width'] . 'x' . $_wp_additional_image_sizes['shop_single']['height'] : ''; ?></option> 910 <?php 911 $selected_product_sizes = self::get_field( 'product_sizes' ); 912 $mapping = [ 913 'shop_thumbnail' => 'woocommerce_thumbnail', 914 'shop_catalog' => 'woocommerce_gallery_thumbnail', 915 'shop_single' => 'woocommerce_single', 916 ]; 917 if ( isset( $mapping[ $selected_product_sizes ] ) ) { 918 $selected_product_sizes = $mapping[ $selected_product_sizes ]; 919 } 920 921 foreach ( $image_sizes as $slug => $info ) { 922 $display_size = ! empty( $info['width'] ) ? " - {$info['width']}" : ''; 923 $display_size .= ! empty( $info['height'] ) ? "x{$info['height']}" : ''; 924 925 printf( "<option value='%s' %s>%s</option>", esc_attr( $slug ), selected( $selected_product_sizes, $slug, false ), esc_html( $slug . $display_size ) ); 926 } 927 ?> 901 928 </select> 902 929 … … 1446 1473 <td> 1447 1474 <textarea class="" 1448 name="<?php echo esc_attr( self::set_field( 'custom_css' ) ) ?>"><?php echo wp_kses_post( self::get_field( 'custom_css' )) ?></textarea>1475 name="<?php echo esc_attr( self::set_field( 'custom_css' ) ) ?>"><?php echo wp_kses_post( self::get_field( 'custom_css' ) ) ?></textarea> 1449 1476 </td> 1450 1477 </tr> … … 1627 1654 1628 1655 <textarea 1629 name="<?php echo esc_attr( self::set_field( 'message_purchased', 1 ) ) ?>"><?php echo strip_tags( wp_kses_post( $message) ) ?></textarea>1656 name="<?php echo esc_attr( self::set_field( 'message_purchased', 1 ) ) ?>"><?php echo strip_tags( wp_kses_post( $message ) ) ?></textarea> 1630 1657 1631 1658 <?php -
woo-notification/trunk/includes/data.php
r2579043 r2924703 62 62 'product_sizes' => 'shop_thumbnail', 63 63 'non_ajax' => 0, 64 'enable_single_product' => 0,64 'enable_single_product' => 0, 65 65 'enable_out_of_stock_product' => 0, 66 66 'product_link' => 0, 67 'rounded_corner' => 0,68 'loop_session' => 0,69 'loop_session_duration' => 1,70 'loop_session_duration_unit' => 'h',71 'loop_session_total' => '60',72 'image_padding' => '0',73 'close_icon_color' => '#000000',67 'rounded_corner' => 0, 68 'loop_session' => 0, 69 'loop_session_duration' => 1, 70 'loop_session_duration_unit' => 'h', 71 'loop_session_total' => '60', 72 'image_padding' => '0', 73 'close_icon_color' => '#000000', 74 74 ); 75 75 $this->params = apply_filters( 'woonotification_settings_args', wp_parse_args( $this->params, $args ) ); 76 // print_r($this->params);die;77 } 76 } 77 78 78 /** 79 79 * @return mixed|void … … 82 82 return apply_filters( 'woonotification_get_close_icon_color', $this->params['close_icon_color'] ); 83 83 } 84 84 85 /** 85 86 * @return mixed|void … … 123 124 return apply_filters( 'woonotification_get_rounded_corner', $this->params['rounded_corner'] ); 124 125 } 126 125 127 /** 126 128 * Get time close cookie … … 473 475 */ 474 476 public function get_product_sizes() { 475 return apply_filters( 'woonotification_get_product_sizes', $this->params['product_sizes'] ); 477 $selected_product_sizes = $this->params['product_sizes']; 478 479 $mapping = [ 480 'shop_thumbnail' => 'woocommerce_thumbnail', 481 'shop_catalog' => 'woocommerce_gallery_thumbnail', 482 'shop_single' => 'woocommerce_single', 483 ]; 484 485 return apply_filters( 'woonotification_get_product_sizes', $mapping[ $selected_product_sizes ] ?? $selected_product_sizes ); 476 486 } 477 487 … … 483 493 return apply_filters( 'woonotification_non_ajax', $this->params['non_ajax'] ); 484 494 } 495 485 496 /** 486 497 * Enable notification in single product page … … 490 501 return apply_filters( 'woonotification_enable_single_product', $this->params['enable_single_product'] ); 491 502 } 503 492 504 /** 493 505 * Get notification type show in single product … … 503 515 */ 504 516 public function show_variation() { 505 return apply_filters( 'woonotification_show_variation', isset($this->params['show_variation'])?$this->params['show_variation']:'' ); 506 } 517 return apply_filters( 'woonotification_show_variation', isset( $this->params['show_variation'] ) ? $this->params['show_variation'] : '' ); 518 } 519 507 520 public function enable_out_of_stock_product() { 508 521 return apply_filters( 'woonotification_enable_out_of_stock_product', $this->params['enable_out_of_stock_product'] ); -
woo-notification/trunk/includes/support.php
r2783680 r2924703 8 8 /** 9 9 * Class VillaTheme_Support 10 * 1.1. 710 * 1.1.8 11 11 */ 12 12 class VillaTheme_Support { 13 13 protected $plugin_base_name; 14 14 protected $ads_data; 15 protected $version = '1.1.7'; 15 protected $version = '1.1.8'; 16 protected $data = []; 16 17 17 18 public function __construct( $data ) { -
woo-notification/trunk/readme.txt
r2869089 r2924703 4 4 Tags: woocommerce, notify, marketing, boost sales ,recent sales popup,live sales,recent sales notification, villatheme, woocommerce notification, up sell 5 5 Requires at least: 5.0 6 Tested up to: 6. 0.07 WC tested up to: 6.5.06 Tested up to: 6.2.0 7 WC tested up to: 7.7.0 8 8 Stable tag: 1.2.9 9 9 License: GPLv2 or later … … 242 242 5. Front end 243 243 == Changelog == 244 245 /**1.2.11 - 2023.06.12**/ 246 -Updated: Change image size slug 244 247 245 248 /**1.2.10 - 2022.09.13**/ -
woo-notification/trunk/woo-notification.php
r2869089 r2924703 4 4 * Plugin URI: https://villatheme.com/extensions/woocommerce-notification-boost-sales/ 5 5 * Description: Increase conversion rate by highlighting other customers that have bought products. 6 * Version: 1.2.1 06 * Version: 1.2.11 7 7 * Author: Andy Ha (villatheme.com) 8 8 * Author URI: http://villatheme.com … … 10 10 * Copyright 2016-2023 VillaTheme.com. All rights reserved. 11 11 * Requires at least: 5.0 12 * Tested up to: 6. 112 * Tested up to: 6.2 13 13 * WC requires at least: 5.0 14 * WC tested up to: 7. 314 * WC tested up to: 7.7 15 15 */ 16 16 if ( ! defined( 'ABSPATH' ) ) { 17 17 exit; 18 18 } 19 define( 'VI_WNOTIFICATION_F_VERSION', '1.2.1 0' );19 define( 'VI_WNOTIFICATION_F_VERSION', '1.2.11' ); 20 20 /** 21 21 * Detect plugin. For use on Front End only.
Note: See TracChangeset
for help on using the changeset viewer.