Plugin Directory

Changeset 2736803


Ignore:
Timestamp:
06/03/2022 07:28:31 AM (4 years ago)
Author:
codup
Message:

#Codup WooCommerce Gift Product Update

Location:
woo-product-as-gift/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • woo-product-as-gift/trunk/class/class-wc-gift-settings.php

    r2714814 r2736803  
    6666                delete_option("wcgw-gift-detail");
    6767            }
    68             $wcgw_wrapping_style = (isset($_POST["wcgw-wrapping-style"])) ? wp_unslash($_POST["wcgw-wrapping-style"]) : false;
    69             $first_set = (isset($_POST["wcgw-wrapping-style"]["name"][0])) ? wp_unslash($_POST["wcgw-wrapping-style"]["name"][0]) : false;
     68            $wcgw_wrapping_style = (isset($_POST["wcgw-wrapping-style"])) ? filter_var_array(wp_unslash($_POST["wcgw-wrapping-style"])) : false;
     69            $first_set = (isset($_POST["wcgw-wrapping-style"]["name"][0])) ? wp_kses_post(wp_unslash($_POST["wcgw-wrapping-style"]["name"][0])) : false;
     70
    7071            if ( !empty($first_set) ) {
    7172                $this->save_styles($wcgw_wrapping_style);
  • woo-product-as-gift/trunk/partials/gifts-settings.php

    r2714814 r2736803  
    66    if ( filter_input(INPUT_GET, 'page') == "wc-gift-settings" ) {
    77        if ( filter_input(INPUT_GET, 'tab') ) {
    8             $active_tab = $_GET['tab'];
     8            $active_tab = wp_kses_post($_GET['tab']);
    99        }
    1010    }
  • woo-product-as-gift/trunk/partials/wrapping.php

    r2714814 r2736803  
    5858                                        ?>
    5959                                        <div>
    60                                             <input name="wcgw-wrapping-style[image][]" data-image='<?php echo esc_attr($no_image); ?>' value="<?php echo $style["image"]; ?>" type="hidden" />
     60                                            <input name="wcgw-wrapping-style[image][]" data-image='<?php echo esc_attr($no_image); ?>' value="<?php esc_attr($style["image"]); ?>" type="hidden" />
    6161                                            <button type="button" class="upload_image_button button">Upload</button>
    6262                                        </div>
     
    7070                                }
    7171                                ?>
    72                                 <p class="dashicons <?php echo $class; ?>"></p>
     72                                <p class="dashicons <?php esc_attr($class); ?>"></p>
    7373                            </div>
    7474                            <?php
Note: See TracChangeset for help on using the changeset viewer.