Plugin Directory

Changeset 2650578


Ignore:
Timestamp:
12/29/2021 05:03:33 PM (3 years ago)
Author:
Rustaurius
Message:

v5.0.26 and tagging

Location:
ultimate-product-catalogue
Files:
6 added
126 edited
1 copied

Legend:

Unmodified
Added
Removed
  • ultimate-product-catalogue/tags/5.0.26/assets/js/dashboard-review-ask.js

    r2638260 r2650578  
    33
    44  jQuery(document).on( 'click', '.ewd-upcp-main-dashboard-review-ask .notice-dismiss', function( event ) {
    5     var data = 'ask_review_time=7&action=ewd_upcp_hide_review_ask';
    6     jQuery.post( ajaxurl, data, function() {} );
    7   });
     5        var params = {};
     6
     7        params.nonce  = ewd_upcp_review_ask.nonce;
     8        params.action = 'ewd_upcp_hide_review_ask';
     9        params.ask_review_time = 7;
     10
     11        var data = jQuery.param( params );
     12jQuery.post( ajaxurl, data, function() {} );
     13    });
    814
    915    jQuery( '.ewd-upcp-review-ask-yes' ).on( 'click', function() {
     
    1723        jQuery( '.ewd-upcp-review-ask-yes' ).addClass( 'ewd-upcp-hidden' );
    1824
    19         var data = 'ask_review_time=7&action=ewd_upcp_hide_review_ask';
    20         jQuery.post( ajaxurl, data, function() {} );
     25        var params = {};
     26
     27        params.nonce  = ewd_upcp_review_ask.nonce;
     28        params.action = 'ewd_upcp_hide_review_ask';
     29        params.ask_review_time = 7;
     30
     31        var data = jQuery.param( params );
     32        jQuery.post( ajaxurl, data, function() {} );
    2133    });
    2234
     
    2840        jQuery( '.ewd-upcp-review-ask-actions' ).addClass( 'ewd-upcp-hidden' );
    2941
    30         var data = 'ask_review_time=1000&action=ewd_upcp_hide_review_ask';
    31         jQuery.post( ajaxurl, data, function() {} );
     42        var params = {};
     43
     44        params.nonce  = ewd_upcp_review_ask.nonce;
     45        params.action = 'ewd_upcp_hide_review_ask';
     46        params.ask_review_time = 1000;
     47
     48        var data = jQuery.param( params );
     49        jQuery.post( ajaxurl, data, function() {} );
    3250    });
    3351
    3452    jQuery( '.ewd-upcp-review-ask-no-thanks' ).on( 'click', function() {
    35         var data = 'ask_review_time=1000&action=ewd_upcp_hide_review_ask';
    36         jQuery.post( ajaxurl, data, function() {} );
     53        var params = {};
    3754
    38         jQuery( '.ewd-upcp-main-dashboard-review-ask' ).css( 'display', 'none' );
     55        params.nonce  = ewd_upcp_review_ask.nonce;
     56        params.action = 'ewd_upcp_hide_review_ask';
     57        params.ask_review_time = 1000;
     58
     59        var data = jQuery.param( params );
     60        jQuery.post( ajaxurl, data, function() {} );
     61
     62        jQuery( '.ewd-upcp-main-dashboard-review-ask' ).css( 'display', 'none' );
    3963    });
    4064
     
    4367        jQuery( '.ewd-upcp-review-ask-thank-you-text' ).removeClass( 'ewd-upcp-hidden' );
    4468
    45         var data = 'ask_review_time=1000&action=ewd_upcp_hide_review_ask';
    46         jQuery.post( ajaxurl, data, function() {} );
     69        var params = {};
     70
     71        params.nonce  = ewd_upcp_review_ask.nonce;
     72        params.action = 'ewd_upcp_hide_review_ask';
     73        params.ask_review_time = 1000;
     74
     75        var data = jQuery.param( params );
     76        jQuery.post( ajaxurl, data, function() {} );
    4777    });
    4878
     
    5080        var feedback = jQuery( '.ewd-upcp-review-ask-feedback-explanation textarea' ).val();
    5181        var email_address = jQuery( '.ewd-upcp-review-ask-feedback-explanation input[name="feedback_email_address"]' ).val();
    52         var data = 'feedback=' + feedback + '&email_address=' + email_address + '&action=ewd_upcp_send_feedback';
    53         jQuery.post( ajaxurl, data, function() {} );
    5482
    55         var data = 'ask_review_time=1000&action=ewd_upcp_hide_review_ask';
    56         jQuery.post( ajaxurl, data, function() {} );
     83        var params = {};
    5784
    58         jQuery( '.ewd-upcp-review-ask-feedback-form' ).addClass( 'ewd-upcp-hidden' );
    59         jQuery( '.ewd-upcp-review-ask-review-text' ).addClass( 'ewd-upcp-hidden' );
    60         jQuery( '.ewd-upcp-review-ask-thank-you-text' ).removeClass( 'ewd-upcp-hidden' );
     85        params.nonce  = ewd_upcp_review_ask.nonce;
     86        params.action = 'ewd_upcp_send_feedback';
     87        params.feedback = feedback;
     88        params.email_address = email_address;
     89
     90        var data = jQuery.param( params );
     91        jQuery.post( ajaxurl, data, function() {} );
     92
     93        var params = {};
     94
     95        params.nonce  = ewd_upcp_review_ask.nonce;
     96        params.action = 'ewd_upcp_hide_review_ask';
     97        params.ask_review_time = 1000;
     98
     99        var data = jQuery.param( params );
     100        jQuery.post( ajaxurl, data, function() {} );
     101
     102        jQuery( '.ewd-upcp-review-ask-feedback-form' ).addClass( 'ewd-upcp-hidden' );
     103        jQuery( '.ewd-upcp-review-ask-review-text' ).addClass( 'ewd-upcp-hidden' );
     104        jQuery( '.ewd-upcp-review-ask-thank-you-text' ).removeClass( 'ewd-upcp-hidden' );
    61105    });
    62106});
  • ultimate-product-catalogue/tags/5.0.26/assets/js/ewd-upcp-admin.js

    r2638260 r2650578  
    222222            update: function() {
    223223
    224                 var data = jQuery( 'table.wp-list-table tbody' ).sortable('serialize') + '&action=ewd_upcp_update_category_order';
     224                var params = {
     225                    nonce: ewd_upcp_php_admin_data.nonce,
     226                    action: 'ewd_upcp_update_category_order'
     227                };
     228
     229                var query_string = jQuery( 'table.wp-list-table tbody' ).sortable('serialize');
     230                var data = jQuery.param( params ) + '&' + query_string;
    225231                jQuery.post( ajaxurl, data, function( response ) {});
    226232            }
     
    234240            update: function() {
    235241
    236                 var data = jQuery( 'table.wp-list-table tbody' ).sortable('serialize') + '&action=ewd_upcp_update_tag_order';
     242                var params = {
     243                    nonce: ewd_upcp_php_admin_data.nonce,
     244                    action: 'ewd_upcp_update_tag_order'
     245                };
     246
     247                var query_string = jQuery( 'table.wp-list-table tbody' ).sortable('serialize');
     248                var data = jQuery.param( params ) + '&' + query_string;
    237249                jQuery.post( ajaxurl, data, function( response ) {});
    238250            }
     
    253265            update: function() {
    254266
    255                 var data = jQuery( 'table.wp-list-table tbody' ).sortable('serialize') + '&action=ewd_upcp_update_product_order';
     267                var params = {
     268                    nonce: ewd_upcp_php_admin_data.nonce,
     269                    action: 'ewd_upcp_update_product_order'
     270                };
     271
     272                var query_string = jQuery( 'table.wp-list-table tbody' ).sortable('serialize');
     273                var data = jQuery.param( params ) + '&' + query_string;
    256274                jQuery.post( ajaxurl, data, function( response ) {});
    257275            }
     
    620638        event.preventDefault();
    621639
    622         var serialized = gridster_mobile.serialize();
    623        
    624         var data = 'serialized_product_page=' + JSON.stringify( serialized ) + '&action=ewd_upcp_save_serialized_product_page&type=mobile';
     640        var params = {};
     641
     642        params.nonce  = ewd_upcp_php_admin_data.nonce;
     643        params.type   = 'mobile';
     644        params.action = 'ewd_upcp_save_serialized_product_page';
     645        params.serialized_product_page = JSON.stringify( gridster_mobile.serialize() );
     646
     647        var data = jQuery.param( params );
    625648        jQuery.post( ajaxurl, data, function( response ) {
    626                            
     649
    627650            jQuery( '.gridster-mobile-save' ).after( '<div class="ewd-upcp-gridster-response">Layout Saved!</div>' );
    628651
     
    677700        event.preventDefault();
    678701
    679         var serialized = gridster.serialize();
    680        
    681         var data = 'serialized_product_page=' + JSON.stringify( serialized ) + '&action=ewd_upcp_save_serialized_product_page&type=large';
     702        var params = {};
     703
     704        params.nonce  = ewd_upcp_php_admin_data.nonce;
     705        params.type   = 'large';
     706        params.action = 'ewd_upcp_save_serialized_product_page';
     707        params.serialized_product_page = JSON.stringify( gridster.serialize() );
     708
     709        var data = jQuery.param( params );
    682710        jQuery.post( ajaxurl, data, function( response ) {
    683                            
     711
    684712            jQuery( '.gridster-large-save' ).after( '<div class="ewd-upcp-gridster-response">Layout Saved!</div>' );
    685713
  • ultimate-product-catalogue/tags/5.0.26/assets/js/ewd-upcp-welcome-screen.js

    r2638260 r2650578  
    2525        jQuery('.ewd-upcp-welcome-screen-add-category-description textarea').val('');
    2626
    27         var data = 'category_name=' + category_name + '&category_description=' + category_description + '&action=ewd_upcp_welcome_add_category';
     27        var params = {};
     28
     29        params.nonce  = ewd_upcp_getting_started.nonce;
     30        params.action = 'ewd_upcp_welcome_add_category';
     31        params.category_name = category_name;
     32        params.category_description = category_description;
     33
     34        var data = jQuery.param( params );
    2835        jQuery.post(ajaxurl, data, function(response) {
    2936            var HTML = '<tr class="upcp-welcome-screen-category">';
     
    5057        jQuery('.ewd-upcp-welcome-screen-add-catalog-page-name input').val('');
    5158
    52         var data = 'catalog_name=' + catalog_name + '&categories=' + JSON.stringify(categories) + '&action=ewd_upcp_welcome_add_catalog';
     59        var params = {};
     60
     61        params.nonce  = ewd_upcp_getting_started.nonce;
     62        params.action = 'ewd_upcp_welcome_add_catalog';
     63        params.catalog_name = catalog_name;
     64        params.categories   = JSON.stringify(categories);
     65        params.categories   = JSON.stringify(categories);
     66
     67        var data = jQuery.param( params );
    5368        jQuery.post(ajaxurl, data, function(response) {});
    5469
     
    6277        var product_search = jQuery.map( jQuery( 'input[name="product_search\\[\\]"]:checked' ), function( n, i ) { return n.value; } ).join( ',' );
    6378
    64         var data = 'currency_symbol=' + currency_symbol + '&color_scheme=' + color_scheme + '&product_links=' + product_links + '&product_search=' + product_search + '&action=ewd_upcp_welcome_set_options';
     79        var params = {};
     80
     81        params.nonce  = ewd_upcp_getting_started.nonce;
     82        params.action = 'ewd_upcp_welcome_set_options';
     83        params.currency_symbol = currency_symbol;
     84        params.color_scheme    = color_scheme;
     85        params.product_links   = product_links;
     86        params.product_search  = product_search;
     87
     88        var data = jQuery.param( params );
    6589        jQuery.post(ajaxurl, data, function(response) {
    6690            jQuery('.ewd-upcp-welcome-screen-save-options-button').after('<div class="ewd-upcp-save-message"><div class="ewd-upcp-save-message-inside">Options have been saved.</div></div>');
     
    85109        jQuery('.ewd-upcp-welcome-screen-add-product-price input').val('');
    86110
    87         var data = 'product_name=' + product_name + '&product_image=' + product_image + '&product_description=' + product_description + '&product_category=' + product_category + '&product_price=' + product_price + '&action=ewd_upcp_welcome_add_product';
     111        var params = {};
     112
     113        params.nonce  = ewd_upcp_getting_started.nonce;
     114        params.action = 'ewd_upcp_welcome_add_product';
     115        params.product_price = product_price;
     116        params.product_name  = product_name;
     117        params.product_image = product_image;
     118        params.product_description = product_description;
     119        params.product_category    = product_category;
     120
     121        var data = jQuery.param( params );
    88122        jQuery.post(ajaxurl, data, function(response) {
    89123            var HTML = '<tr class="upcp-welcome-screen-product">';
  • ultimate-product-catalogue/tags/5.0.26/assets/js/ewd-upcp.js

    r2638260 r2650578  
    525525        jQuery( '.ewd-upcp-cart-item-count' ).html( +jQuery( '.ewd-upcp-cart-item-count' ).html() + 1 );
    526526
    527         var data = 'product_id=' + jQuery( this ).data( 'product_id' ) + '&action=ewd_upcp_add_to_cart';
     527        var params = {
     528            nonce: ewd_upcp_js.nonce,
     529            product_id: jQuery( this ).data( 'product_id' ),
     530            action: 'ewd_upcp_add_to_cart'
     531        };
     532
     533        var data = jQuery.param( params );
    528534        jQuery.post( ajaxurl, data, function( response ) {} );
    529535    });
     
    535541        jQuery( '.ewd-upcp-cart-item-count' ).html( '0' );
    536542
    537         var data = '&action=ewd_upcp_clear_cart';
    538         jQuery.post( ajaxurl, data, function( response ) {} );
     543        var params = {
     544            nonce: ewd_upcp_js.nonce,
     545            action: 'ewd_upcp_clear_cart'
     546        };
     547
     548        var data = jQuery.param( params );
     549        jQuery.post( ajaxurl, data, function( response ) {} );
    539550    });
    540551}
     
    867878    window.history.replaceState( null, null, url );
    868879
    869     var data = 'id=' + id + '&excluded_views=' + excluded_views + '&orderby=' + orderby + '&order=' + order + '&ajax_url=' + ajax_url + '&current_page=' + current_page + '&products_per_page=' + products_per_page + '&default_search_text=' + default_search_text + '&product_name=' + product_name + '&max_price=' + max_price + '&min_price=' + min_price + '&category=' + categories + '&subcategory=' + subcategories + '&tags=' + tags + '&custom_fields=' + encodeURIComponent( custom_fields ) + '&request_count=' + request_count + '&action=ewd_upcp_update_catalog';
     880    var params = {};
     881
     882    params.nonce = ewd_upcp_js.nonce;
     883    params.id = id;
     884    params.excluded_views = excluded_views;
     885    params.orderby = orderby;
     886    params.order = order;
     887    params.ajax_url = ajax_url;
     888    params.current_page = current_page;
     889    params.products_per_page = products_per_page;
     890    params.default_search_text = default_search_text;
     891    params.product_name = product_name;
     892    params.max_price = max_price;
     893    params.min_price = min_price;
     894    params.category = categories;
     895    params.subcategory = subcategories;
     896    params.tags = tags;
     897    params.custom_fields = custom_fields.join(',');
     898    params.request_count = request_count;
     899    params.action = 'ewd_upcp_update_catalog';
     900
     901    var data = jQuery.param( params );
    870902
    871903    return data;
  • ultimate-product-catalogue/tags/5.0.26/ewd-upcp-templates/catalog-header-bar.php

    r2638260 r2650578  
    33    <?php foreach ( $this->get_catalog_views() as $catalog_view ) { ?>
    44
    5         <div class='ewd-upcp-toggle-icon ewd-upcp-toggle-icon-<?php echo $catalog_view; ?> ewd-upcp-toggle-icon-<?php echo $this->get_option( 'color-scheme' ); ?>'  data-view='<?php echo $catalog_view; ?>'></div>
     5        <div class='ewd-upcp-toggle-icon ewd-upcp-toggle-icon-<?php echo esc_attr( $catalog_view ); ?> ewd-upcp-toggle-icon-<?php echo esc_attr( $this->get_option( 'color-scheme' ) ); ?>' data-view='<?php echo esc_attr( $catalog_view ); ?>'></div>
    66
    77    <?php } ?>
  • ultimate-product-catalogue/tags/5.0.26/ewd-upcp-templates/catalog-pagination.php

    r2638260 r2650578  
    1 <div class='ewd-upcp-pagination' data-max_pages='<?php echo $this->max_pages; ?>'>
     1<div class='ewd-upcp-pagination' data-max_pages='<?php echo esc_attr( $this->max_pages ); ?>'>
    22
    33    <span class='displaying-num'>
    44
    5         <span class='product-count'><?php echo $this->product_count; ?></span>
     5        <span class='product-count'><?php echo esc_html( $this->product_count ); ?></span>
    66
    77        <?php echo esc_html( $this->get_label( 'label-products-pagination' ) ); ?>
     
    1818            <?php echo esc_html( $this->get_label( 'label-page' ) ); ?>
    1919
    20             <span class='current-page'><?php echo $this->current_page; ?></span>
     20            <span class='current-page'><?php echo esc_html( $this->current_page ); ?></span>
    2121
    2222            <?php echo esc_html( $this->get_label( 'label-pagination-of' ) ); ?>
    2323
    24             <span class='total-pages'><?php echo $this->max_pages; ?></span>
     24            <span class='total-pages'><?php echo esc_html( $this->max_pages ); ?></span>
    2525
    2626        </span>
  • ultimate-product-catalogue/tags/5.0.26/ewd-upcp-templates/catalog-product-content.php

    r2638260 r2650578  
    22
    33    <div class='ewd-upcp-catalog-product-description'>
    4         <?php echo $this->product->description; ?>
     4        <?php echo esc_html( $this->product->description ); ?>
    55    </div>
    66
  • ultimate-product-catalogue/tags/5.0.26/ewd-upcp-templates/catalog-product-rating.php

    r2638260 r2650578  
    33<?php if ( empty( $average_rating ) ) { return; } ?>
    44
    5 <span class='ewd-upcp-urp-review-score' title='<?php _e( 'Average Rating: ', 'ultimate-product-catalogue' ); ?> <?php echo $average_rating; ?>'>
     5<span class='ewd-upcp-urp-review-score' title='<?php _e( 'Average Rating: ', 'ultimate-product-catalogue' ); ?> <?php echo esc_attr( $average_rating ); ?>'>
    66
    77    <?php for ( $i = 1; $i <= 5; $i++ ) { ?>
  • ultimate-product-catalogue/tags/5.0.26/ewd-upcp-templates/catalog-shortcode-attributes.php

    r2638260 r2650578  
    1 <input type='hidden' name='catalog-id' value='<?php echo $this->catalog->ID; ?>' />
    2 <input type='hidden' name='catalog-excluded-views' value='<?php echo implode( ',', $this->excluded_views ); ?>' />
    3 <input type='hidden' name='catalog-current-page' value='<?php echo $this->current_page; ?>' />
    4 <input type='hidden' name='catalog-max-page' value='<?php echo $this->max_pages; ?>' />
    5 <input type='hidden' name='catalog-product-per-page' value='<?php echo $this->products_per_page; ?>' />
     1<input type='hidden' name='catalog-id' value='<?php echo esc_attr( $this->catalog->ID ); ?>' />
     2<input type='hidden' name='catalog-excluded-views' value='<?php echo esc_attr( implode( ',', $this->excluded_views ) ); ?>' />
     3<input type='hidden' name='catalog-current-page' value='<?php echo esc_attr( $this->current_page ); ?>' />
     4<input type='hidden' name='catalog-max-page' value='<?php echo esc_attr( $this->max_pages ); ?>' />
     5<input type='hidden' name='catalog-product-per-page' value='<?php echo esc_attr( $this->products_per_page ); ?>' />
    66<input type='hidden' name='catalog-default-search-text' value='<?php _e( 'Search...', 'ultimate-product-catalogue' ); ?>' />
    7 <input type='hidden' name='catalog-base-url' value='<?php echo $this->ajax_url; ?>' />
     7<input type='hidden' name='catalog-base-url' value='<?php echo esc_attr( $this->ajax_url ); ?>' />
  • ultimate-product-catalogue/tags/5.0.26/ewd-upcp-templates/catalog-sidebar-custom-field-checkbox.php

    r2638260 r2650578  
    1 <div class='ewd-upcp-catalog-sidebar-custom-field-div' data-custom_field_id='<?php echo $this->custom_field->id; ?>'>
     1<div class='ewd-upcp-catalog-sidebar-custom-field-div' data-custom_field_id='<?php echo esc_attr( $this->custom_field->id ); ?>'>
    22
    33    <div class='ewd-upcp-catalog-sidebar-title <?php echo ( $this->get_option( 'styling-sidebar-title-collapse' ) ? 'ewd-upcp-catalog-sidebar-collapsible' : '' ); ?> <?php echo ( $this->get_option( 'styling-sidebar-start-collapsed' ) ? 'ewd-upcp-sidebar-content-hidden' : '' ); ?>'>
     
    77    <?php foreach ( $this->sidebar_custom_fields[ $this->custom_field->id ] as $field_value => $field_count ) { ?>
    88
    9         <div class='ewd-upcp-catalog-sidebar-custom-field <?php echo ( $this->is_custom_field_value_selected( $field_value ) ? 'ewd-upcp-taxonomy-selected' : '' ); ?>' data-custom_field_id='<?php echo $this->custom_field->id; ?>' data-value='<?php echo $field_value; ?>'>
     9        <div class='ewd-upcp-catalog-sidebar-custom-field <?php echo ( $this->is_custom_field_value_selected( $field_value ) ? 'ewd-upcp-taxonomy-selected' : '' ); ?>' data-custom_field_id='<?php echo esc_attr( $this->custom_field->id ); ?>' data-value='<?php echo esc_attr( $field_value ); ?>'>
    1010
    11             <input type='checkbox' name='<?php echo esc_attr( $this->custom_field->id ); ?>' id='<?php echo esc_attr( $this->custom_field->id ); ?>-<?php echo $field_value; ?>' value='<?php echo $field_value; ?>' <?php echo ( $this->is_custom_field_value_selected( $field_value ) ? 'checked' : '' ); ?> >
     11            <input type='checkbox' name='<?php echo esc_attr( $this->custom_field->id ); ?>' id='<?php echo esc_attr( $this->custom_field->id ); ?>-<?php echo esc_attr( $field_value ); ?>' value='<?php echo esc_attr( $field_value ); ?>' <?php echo ( $this->is_custom_field_value_selected( $field_value ) ? 'checked' : '' ); ?> >
    1212
    13             <label class='ewd-upcp-catalog-sidebar-custom-field-value-label' for='<?php echo esc_attr( $this->custom_field->id ); ?>-<?php echo $field_value; ?>'>
     13            <label class='ewd-upcp-catalog-sidebar-custom-field-value-label' for='<?php echo esc_attr( $this->custom_field->id ); ?>-<?php echo esc_attr( $field_value ); ?>'>
    1414
    15                 <span><?php echo $field_value; ?> <span class='ewd-upcp-catalog-sidebar-custom-field-count'> (<?php echo $field_count; ?>)</span></span>
     15                <span><?php echo esc_html( $field_value ); ?> <span class='ewd-upcp-catalog-sidebar-custom-field-count'> (<?php echo esc_html( $field_count ); ?>)</span></span>
    1616   
    1717            </label>
  • ultimate-product-catalogue/tags/5.0.26/ewd-upcp-templates/catalog-sidebar-custom-field-dropdown.php

    r2638260 r2650578  
    1 <div class='ewd-upcp-catalog-sidebar-custom-field-div' data-custom_field_id='<?php echo $this->custom_field->id; ?>'>
     1<div class='ewd-upcp-catalog-sidebar-custom-field-div' data-custom_field_id='<?php echo esc_attr( $this->custom_field->id ); ?>'>
    22
    33    <div class='ewd-upcp-catalog-sidebar-title <?php echo ( $this->get_option( 'styling-sidebar-title-collapse' ) ? 'ewd-upcp-catalog-sidebar-collapsible' : '' ); ?> <?php echo ( $this->get_option( 'styling-sidebar-start-collapsed' ) ? 'ewd-upcp-sidebar-content-hidden' : '' ); ?>'>
     
    1515            <option value='<?php echo esc_attr( $field_value ); ?>' <?php echo ( $this->is_custom_field_value_selected( $field_value ) ? 'selected' : '' ); ?>>
    1616                   
    17                 <?php echo $field_value; ?> <span class='ewd-upcp-catalog-sidebar-custom-field-count'> (<?php echo $field_count; ?>)</span>
     17                <?php echo esc_html( $field_value ); ?> <span class='ewd-upcp-catalog-sidebar-custom-field-count'> (<?php echo esc_html( $field_count ); ?>)</span>
    1818
    1919            </option>
  • ultimate-product-catalogue/tags/5.0.26/ewd-upcp-templates/catalog-sidebar-custom-field-radio.php

    r2638260 r2650578  
    1 <div class='ewd-upcp-catalog-sidebar-custom-field-div' data-custom_field_id='<?php echo $this->custom_field->id; ?>'>
     1<div class='ewd-upcp-catalog-sidebar-custom-field-div' data-custom_field_id='<?php echo esc_attr( $this->custom_field->id ); ?>'>
    22
    33    <div class='ewd-upcp-catalog-sidebar-title <?php echo ( $this->get_option( 'styling-sidebar-title-collapse' ) ? 'ewd-upcp-catalog-sidebar-collapsible' : '' ); ?> <?php echo ( $this->get_option( 'styling-sidebar-start-collapsed' ) ? 'ewd-upcp-sidebar-content-hidden' : '' ); ?>'>
     
    77    <?php foreach ( $this->sidebar_custom_fields[ $this->custom_field->id ] as $field_value => $field_count ) { ?>
    88
    9         <div class='ewd-upcp-catalog-sidebar-custom-field <?php echo ( $this->is_custom_field_value_selected( $field_value ) ? 'ewd-upcp-taxonomy-selected' : '' ); ?>' data-custom_field_id='<?php echo $this->custom_field->id; ?>' data-value='<?php echo $field_value; ?>'>
     9        <div class='ewd-upcp-catalog-sidebar-custom-field <?php echo ( $this->is_custom_field_value_selected( $field_value ) ? 'ewd-upcp-taxonomy-selected' : '' ); ?>' data-custom_field_id='<?php echo esc_attr( $this->custom_field->id ); ?>' data-value='<?php echo esc_attr( $field_value ); ?>'>
    1010
    11             <input type='radio' name='<?php echo esc_attr( $this->custom_field->id ); ?>' value='<?php echo $field_value; ?>' <?php echo ( $this->is_custom_field_value_selected( $field_value ) ? 'checked' : '' ); ?> >
     11            <input type='radio' name='<?php echo esc_attr( $this->custom_field->id ); ?>' value='<?php echo esc_attr( $field_value ); ?>' <?php echo ( $this->is_custom_field_value_selected( $field_value ) ? 'checked' : '' ); ?> >
    1212
    1313            <label class='ewd-upcp-catalog-sidebar-custom-field-value-label'>
    1414
    15                 <span><?php echo $field_value; ?> <span class='ewd-upcp-catalog-sidebar-custom-field-count'> (<?php echo $field_count; ?>)</span></span>
     15                <span><?php echo esc_html( $field_value ); ?> <span class='ewd-upcp-catalog-sidebar-custom-field-count'> (<?php echo esc_html( $field_count ); ?>)</span></span>
    1616   
    1717            </label>
  • ultimate-product-catalogue/tags/5.0.26/ewd-upcp-templates/catalog-sidebar-custom-field-slider.php

    r2638260 r2650578  
    1 <div class='ewd-upcp-catalog-sidebar-custom-field-div' data-custom_field_id='<?php echo $this->custom_field->id; ?>'>
     1<div class='ewd-upcp-catalog-sidebar-custom-field-div' data-custom_field_id='<?php echo esc_attr( $this->custom_field->id ); ?>'>
    22
    33    <div class='ewd-upcp-catalog-sidebar-title <?php echo ( $this->get_option( 'styling-sidebar-title-collapse' ) ? 'ewd-upcp-catalog-sidebar-collapsible' : '' ); ?> <?php echo ( $this->get_option( 'styling-sidebar-start-collapsed' ) ? 'ewd-upcp-sidebar-content-hidden' : '' ); ?>'>
     
    55    </div>
    66
    7     <div class='ewd-upcp-catalog-sidebar-custom-field-slider' data-custom_field_id='<?php echo $this->custom_field->id; ?>'></div>
     7    <div class='ewd-upcp-catalog-sidebar-custom-field-slider' data-custom_field_id='<?php echo esc_attr( $this->custom_field->id ); ?>'></div>
    88
    99    <div class='ewd-upcp-catalog-sidebar-custom-field-slider-text-inputs'>
  • ultimate-product-catalogue/tags/5.0.26/ewd-upcp-templates/catalog-sidebar-price-filter.php

    r2638260 r2650578  
    1313            <?php $this->maybe_print_currency_symbol( 'before' ); ?>
    1414
    15             <input type='text' value='<?php echo $this->sidebar_min_price; ?>' name='ewd-upcp-price-slider-min' <?php echo ( $this->get_option( 'disable-slider-filter-text-inputs' ) ? 'disabled' : '' ); ?> data-min_price='<?php echo $this->sidebar_min_price; ?>' />
     15            <input type='text' value='<?php echo esc_attr( $this->sidebar_min_price ); ?>' name='ewd-upcp-price-slider-min' <?php echo ( $this->get_option( 'disable-slider-filter-text-inputs' ) ? 'disabled' : '' ); ?> data-min_price='<?php echo esc_attr( $this->sidebar_min_price ); ?>' />
    1616
    1717            <?php $this->maybe_print_currency_symbol( 'after' ); ?>
     
    2525            <?php $this->maybe_print_currency_symbol( 'before' ); ?>
    2626
    27             <input type='text' value='<?php echo $this->sidebar_max_price; ?>' name='ewd-upcp-price-slider-max' <?php echo ( $this->get_option( 'disable-slider-filter-text-inputs' ) ? 'disabled' : '' ); ?> data-max_price='<?php echo $this->sidebar_max_price; ?>' />
     27            <input type='text' value='<?php echo esc_attr( $this->sidebar_max_price ); ?>' name='ewd-upcp-price-slider-max' <?php echo ( $this->get_option( 'disable-slider-filter-text-inputs' ) ? 'disabled' : '' ); ?> data-max_price='<?php echo esc_attr( $this->sidebar_max_price ); ?>' />
    2828
    2929            <?php $this->maybe_print_currency_symbol( 'after' ); ?>
  • ultimate-product-catalogue/tags/5.0.26/ewd-upcp-templates/catalog-sidebar-taxonomy-checkbox.php

    r2638260 r2650578  
    1 <div class='ewd-upcp-catalog-sidebar-<?php echo $this->taxonomy_type; ?> <?php echo ( $this->is_taxonomy_selected() ? 'ewd-upcp-taxonomy-selected' : '' ); ?>' data-taxonomy_id='<?php echo $this->taxonomy_term->term_id; ?>'>
     1<div class='ewd-upcp-catalog-sidebar-<?php echo esc_attr( $this->taxonomy_type ); ?> <?php echo ( $this->is_taxonomy_selected() ? 'ewd-upcp-taxonomy-selected' : '' ); ?>' data-taxonomy_id='<?php echo esc_attr( $this->taxonomy_term->term_id ); ?>'>
    22
    33    <?php $this->maybe_print_taxonomy_image(); ?>
    44
    5     <input type='checkbox' name='<?php echo $this->taxonomy_type; ?>' id='<?php echo $this->taxonomy_type; ?>-<?php echo $this->taxonomy_term->term_id; ?>' value='<?php echo $this->taxonomy_term->term_id; ?>' <?php echo ( $this->is_taxonomy_selected() ? 'checked' : '' ); ?> >
     5    <input type='checkbox' name='<?php echo esc_attr( $this->taxonomy_type ); ?>' id='<?php echo esc_attr( $this->taxonomy_type ); ?>-<?php echo esc_attr( $this->taxonomy_term->term_id ); ?>' value='<?php echo esc_attr( $this->taxonomy_term->term_id ); ?>' <?php echo ( $this->is_taxonomy_selected() ? 'checked' : '' ); ?> >
    66
    7     <label class='ewd-upcp-catalog-sidebar-taxonomy-label' for='<?php echo $this->taxonomy_type; ?>-<?php echo $this->taxonomy_term->term_id; ?>'>
     7    <label class='ewd-upcp-catalog-sidebar-taxonomy-label' for='<?php echo esc_attr( $this->taxonomy_type ); ?>-<?php echo esc_attr( $this->taxonomy_term->term_id ); ?>'>
    88
    9         <span><?php echo $this->taxonomy_term->name; ?> <span class='ewd-upcp-catalog-sidebar-taxonomy-count'> (<?php echo $this->taxonomy_term->catalog_count; ?>)</span></span>
     9        <span><?php echo esc_html( $this->taxonomy_term->name ); ?> <span class='ewd-upcp-catalog-sidebar-taxonomy-count'> (<?php echo esc_html( $this->taxonomy_term->catalog_count ); ?>)</span></span>
    1010   
    1111    </label>
  • ultimate-product-catalogue/tags/5.0.26/ewd-upcp-templates/catalog-sidebar-taxonomy-dropdown.php

    r2638260 r2650578  
    1 <option value='<?php echo $this->taxonomy_term->term_id; ?>' <?php echo ( $this->is_taxonomy_selected() ? 'selected' : '' ); ?> >
     1<option value='<?php echo esc_attr( $this->taxonomy_term->term_id ); ?>' <?php echo ( $this->is_taxonomy_selected() ? 'selected' : '' ); ?> >
    22
    3     <?php echo $this->taxonomy_term->name; ?> <span class='ewd-upcp-catalog-sidebar-taxonomy-count'> (<?php echo $this->taxonomy_term->catalog_count; ?>)</span>
     3    <?php echo esc_html( $this->taxonomy_term->name ); ?> <span class='ewd-upcp-catalog-sidebar-taxonomy-count'> (<?php echo esc_html( $this->taxonomy_term->catalog_count ); ?>)</span>
    44
    55</option>
  • ultimate-product-catalogue/tags/5.0.26/ewd-upcp-templates/catalog-sidebar-taxonomy-radio.php

    r2638260 r2650578  
    1 <div class='ewd-upcp-catalog-sidebar-<?php echo $this->taxonomy_type; ?> <?php echo ( $this->is_taxonomy_selected() ? 'ewd-upcp-taxonomy-selected' : '' ); ?>' data-taxonomy_id='<?php echo $this->taxonomy_term->term_id; ?>'>
     1<div class='ewd-upcp-catalog-sidebar-<?php echo esc_attr( $this->taxonomy_type ); ?> <?php echo ( $this->is_taxonomy_selected() ? 'ewd-upcp-taxonomy-selected' : '' ); ?>' data-taxonomy_id='<?php echo esc_attr( $this->taxonomy_term->term_id ); ?>'>
    22
    33    <?php $this->maybe_print_taxonomy_image(); ?>
    44
    5     <input type='radio' name='<?php echo $this->taxonomy_type; ?>' id='<?php echo $this->taxonomy_type; ?>-<?php echo $this->taxonomy_term->term_id; ?>' value='<?php echo $this->taxonomy_term->term_id; ?>' <?php echo ( $this->is_taxonomy_selected() ? 'checked' : '' ); ?> >
     5    <input type='radio' name='<?php echo esc_attr( $this->taxonomy_type ); ?>' id='<?php echo esc_attr( $this->taxonomy_type ); ?>-<?php echo esc_attr( $this->taxonomy_term->term_id ); ?>' value='<?php echo esc_attr( $this->taxonomy_term->term_id ); ?>' <?php echo ( $this->is_taxonomy_selected() ? 'checked' : '' ); ?> >
    66
    7     <label class='ewd-upcp-catalog-sidebar-taxonomy-label' for='<?php echo $this->taxonomy_type; ?>-<?php echo $this->taxonomy_term->term_id; ?>'>
     7    <label class='ewd-upcp-catalog-sidebar-taxonomy-label' for='<?php echo esc_attr( $this->taxonomy_type ); ?>-<?php echo esc_attr( $this->taxonomy_term->term_id ); ?>'>
    88
    9         <?php echo $this->taxonomy_term->name; ?> <span class='ewd-upcp-catalog-sidebar-taxonomy-count'> (<?php echo $this->taxonomy_term->catalog_count; ?>)</span>
     9        <?php echo esc_html( $this->taxonomy_term->name ); ?> <span class='ewd-upcp-catalog-sidebar-taxonomy-count'> (<?php echo esc_html( $this->taxonomy_term->catalog_count ); ?>)</span>
    1010   
    1111    </label>
  • ultimate-product-catalogue/tags/5.0.26/ewd-upcp-templates/custom-large-single-product.php

    r2638260 r2650578  
    1 <div id='ewd-upcp-single-product-<?php echo $this->product->id; ?>' class='ewd-upcp-custom-product-page ewd-upcp-product-page'>
     1<div id='ewd-upcp-single-product-<?php echo esc_attr( $this->product->id ); ?>' class='ewd-upcp-custom-product-page ewd-upcp-product-page'>
    22
    33    <?php $this->print_product_breadcrumbs(); ?>
  • ultimate-product-catalogue/tags/5.0.26/ewd-upcp-templates/custom-mobile-single-product.php

    r2638260 r2650578  
    1 <div id='ewd-upcp-single-product-<?php echo $this->product->id; ?>' class='ewd-upcp-custom-mobile-product-page ewd-upcp-product-page ewd-upcp-hidden'>
     1<div id='ewd-upcp-single-product-<?php echo esc_attr( $this->product->id ); ?>' class='ewd-upcp-custom-mobile-product-page ewd-upcp-product-page ewd-upcp-hidden'>
    22
    33    <?php foreach ( $this->get_custom_product_page_elements() as $page_element ) { ?>
  • ultimate-product-catalogue/tags/5.0.26/ewd-upcp-templates/custom-single-product.php

    r2638260 r2650578  
    1 <div id='ewd-upcp-single-product-<?php echo $this->product->id; ?>' class='ewd-upcp-custom-product-page ewd-upcp-product-page'>
     1<div id='ewd-upcp-single-product-<?php echo esc_attr( $this->product->id ); ?>' class='ewd-upcp-custom-product-page ewd-upcp-product-page'>
    22
    33    <?php $this->print_product_breadcrumbs(); ?>
  • ultimate-product-catalogue/tags/5.0.26/ewd-upcp-templates/default-single-product.php

    r2638260 r2650578  
    1 <div id='ewd-upcp-single-product-<?php echo $this->product->id; ?>' class='ewd-upcp-standard-product-page ewd-upcp-product-page'>
     1<div id='ewd-upcp-single-product-<?php echo esc_attr( $this->product->id ); ?>' class='ewd-upcp-standard-product-page ewd-upcp-product-page'>
    22
    33    <?php $this->print_product_breadcrumbs(); ?>
  • ultimate-product-catalogue/tags/5.0.26/ewd-upcp-templates/shop-style-single-product.php

    r2638260 r2650578  
    1 <div id='ewd-upcp-single-product-<?php echo $this->product->id; ?>' class='ewd-upcp-tabbed-product-page ewd-upcp-product-page ewd-upcp-shop-style-product-page'>
     1<div id='ewd-upcp-single-product-<?php echo esc_attr( $this->product->id ); ?>' class='ewd-upcp-tabbed-product-page ewd-upcp-product-page ewd-upcp-shop-style-product-page'>
    22
    33    <?php $this->print_product_breadcrumbs(); ?>
  • ultimate-product-catalogue/tags/5.0.26/ewd-upcp-templates/single-product-additional-images.php

    r2638260 r2650578  
    33    <?php foreach ( $this->product->get_all_images() as $count => $image ) { ?>
    44       
    5         <a class='ewd-upcp-thumbnail-anchor <?php echo ( ! empty( $image->video_key ) ? 'ewd-upcp-video-thumbnail' : '' ); ?> <?php echo $this->get_additional_images_lightbox_class(); ?>' href='<?php echo esc_attr( $image->url ); ?>' data-ulbsource='<?php echo esc_attr( $image->url ); ?>' data-ulbtitle='<?php echo esc_attr( $image->description ); ?>' data-ulbdescription='<?php echo esc_attr( $image->description ); ?>' data-video_key='<?php echo ( ! empty( $image->video_key ) ? $image->video_key : '' ); ?>'>
    6             <img src='<?php echo esc_attr( $image->url ); ?>' class='ewd-upcp-single-product-thumbnail'>
     5        <a class='ewd-upcp-thumbnail-anchor <?php echo ( ! empty( $image->video_key ) ? 'ewd-upcp-video-thumbnail' : '' ); ?> <?php echo esc_attr( $this->get_additional_images_lightbox_class() ); ?>' href='<?php echo esc_url( $image->url ); ?>' data-ulbsource='<?php echo esc_attr( $image->url ); ?>' data-ulbtitle='<?php echo esc_attr( $image->description ); ?>' data-ulbdescription='<?php echo esc_attr( $image->description ); ?>' data-video_key='<?php echo ( ! empty( $image->video_key ) ? esc_attr( $image->video_key ) : '' ); ?>'>
     6            <img src='<?php echo esc_url( $image->url ); ?>' class='ewd-upcp-single-product-thumbnail'>
    77        </a>
    88
    9     <?php } ?>     
     9    <?php } ?>
    1010
    1111</div>
  • ultimate-product-catalogue/tags/5.0.26/ewd-upcp-templates/single-product-custom-element-additional-images.php

    r2638260 r2650578  
    1 <li data-col='<?php echo $this->element->col; ?>' data-row='<?php echo $this->element->row; ?>' data-sizex='<?php echo $this->element->size_x; ?>' data-sizey='<?php echo $this->element->size_y; ?>' class='ewd-upcp-single-product-custom-element'>
     1<li data-col='<?php echo esc_attr( $this->element->col ); ?>' data-row='<?php echo esc_attr( $this->element->row ); ?>' data-sizex='<?php echo esc_attr( $this->element->size_x ); ?>' data-sizey='<?php echo esc_attr( $this->element->size_y ); ?>' class='ewd-upcp-single-product-custom-element'>
    22
    33    <?php $this->print_additional_images(); ?>
  • ultimate-product-catalogue/tags/5.0.26/ewd-upcp-templates/single-product-custom-element-back-to-catalog.php

    r2638260 r2650578  
    1 <li data-col='<?php echo $this->element->col; ?>' data-row='<?php echo $this->element->row; ?>' data-sizex='<?php echo $this->element->size_x; ?>' data-sizey='<?php echo $this->element->size_y; ?>' class='ewd-upcp-single-product-custom-element'>
     1<li data-col='<?php echo esc_attr( $this->element->col ); ?>' data-row='<?php echo esc_attr( $this->element->row ); ?>' data-sizex='<?php echo esc_attr( $this->element->size_x ); ?>' data-sizey='<?php echo esc_attr( $this->element->size_y ); ?>' class='ewd-upcp-single-product-custom-element'>
    22
    33    <a class='ewd-upcp-catalogue-link' href='<?php echo esc_attr( $this->catalog_url ); ?>'>
  • ultimate-product-catalogue/tags/5.0.26/ewd-upcp-templates/single-product-custom-element-blank.php

    r2638260 r2650578  
    1 <li data-col='<?php echo $this->element->col; ?>' data-row='<?php echo $this->element->row; ?>' data-sizex='<?php echo $this->element->size_x; ?>' data-sizey='<?php echo $this->element->size_y; ?>' class='ewd-upcp-single-product-custom-element'>
     1<li data-col='<?php echo esc_attr( $this->element->col ); ?>' data-row='<?php echo esc_attr( $this->element->row ); ?>' data-sizex='<?php echo esc_attr( $this->element->size_x ); ?>' data-sizey='<?php echo esc_attr( $this->element->size_y ); ?>' class='ewd-upcp-single-product-custom-element'>
    22
    33</li>
  • ultimate-product-catalogue/tags/5.0.26/ewd-upcp-templates/single-product-custom-element-categories-label.php

    r2638260 r2650578  
    1 <li data-col='<?php echo $this->element->col; ?>' data-row='<?php echo $this->element->row; ?>' data-sizex='<?php echo $this->element->size_x; ?>' data-sizey='<?php echo $this->element->size_y; ?>' class='ewd-upcp-single-product-custom-element'>
     1<li data-col='<?php echo esc_attr( $this->element->col ); ?>' data-row='<?php echo esc_attr( $this->element->row ); ?>' data-sizex='<?php echo esc_attr( $this->element->size_x ); ?>' data-sizey='<?php echo esc_attr( $this->element->size_y ); ?>' class='ewd-upcp-single-product-custom-element'>
    22
    33    <?php echo esc_html( $this->get_categories_label() ); ?>
  • ultimate-product-catalogue/tags/5.0.26/ewd-upcp-templates/single-product-custom-element-categories.php

    r2638260 r2650578  
    1 <li data-col='<?php echo $this->element->col; ?>' data-row='<?php echo $this->element->row; ?>' data-sizex='<?php echo $this->element->size_x; ?>' data-sizey='<?php echo $this->element->size_y; ?>' class='ewd-upcp-single-product-custom-element'>
     1<li data-col='<?php echo esc_attr( $this->element->col ); ?>' data-row='<?php echo esc_attr( $this->element->row ); ?>' data-sizex='<?php echo esc_attr( $this->element->size_x ); ?>' data-sizey='<?php echo esc_attr( $this->element->size_y ); ?>' class='ewd-upcp-single-product-custom-element'>
    22
    33    <?php echo esc_html( $this->product->get_category_names() ); ?>
  • ultimate-product-catalogue/tags/5.0.26/ewd-upcp-templates/single-product-custom-element-custom-field.php

    r2638260 r2650578  
    1 <li data-col='<?php echo $this->element->col; ?>' data-row='<?php echo $this->element->row; ?>' data-sizex='<?php echo $this->element->size_x; ?>' data-sizey='<?php echo $this->element->size_y; ?>' class='ewd-upcp-single-product-custom-element'>
     1<li data-col='<?php echo esc_attr( $this->element->col ); ?>' data-row='<?php echo esc_attr( $this->element->row ); ?>' data-sizex='<?php echo esc_attr( $this->element->size_x ); ?>' data-sizey='<?php echo esc_attr( $this->element->size_y ); ?>' class='ewd-upcp-single-product-custom-element'>
    22
    3     <?php echo $this->product->custom_fields[ $this->element->element_id ]; ?>
     3    <?php echo esc_html( $this->product->custom_fields[ $this->element->element_id ] ); ?>
    44
    55</li>
  • ultimate-product-catalogue/tags/5.0.26/ewd-upcp-templates/single-product-custom-element-description.php

    r2638260 r2650578  
    1 <li data-col='<?php echo $this->element->col; ?>' data-row='<?php echo $this->element->row; ?>' data-sizex='<?php echo $this->element->size_x; ?>' data-sizey='<?php echo $this->element->size_y; ?>' class='ewd-upcp-single-product-custom-element'>
     1<li data-col='<?php echo esc_attr( $this->element->col ); ?>' data-row='<?php echo esc_attr( $this->element->row ); ?>' data-sizex='<?php echo esc_attr( $this->element->size_x ); ?>' data-sizey='<?php echo esc_attr( $this->element->size_y ); ?>' class='ewd-upcp-single-product-custom-element'>
    22
    33    <?php $this->print_product_description(); ?>
  • ultimate-product-catalogue/tags/5.0.26/ewd-upcp-templates/single-product-custom-element-link.php

    r2638260 r2650578  
    1 <li data-col='<?php echo $this->element->col; ?>' data-row='<?php echo $this->element->row; ?>' data-sizex='<?php echo $this->element->size_x; ?>' data-sizey='<?php echo $this->element->size_y; ?>' class='ewd-upcp-single-product-custom-element'>
     1<li data-col='<?php echo esc_attr( $this->element->col ); ?>' data-row='<?php echo esc_attr( $this->element->row ); ?>' data-sizex='<?php echo esc_attr( $this->element->size_x ); ?>' data-sizey='<?php echo esc_attr( $this->element->size_y ); ?>' class='ewd-upcp-single-product-custom-element'>
    22
    33    <a class='no-underline' href='<?php echo esc_attr( $this->details_link ); ?>'>
  • ultimate-product-catalogue/tags/5.0.26/ewd-upcp-templates/single-product-custom-element-main-image.php

    r2638260 r2650578  
    1 <li data-col='<?php echo $this->element->col; ?>' data-row='<?php echo $this->element->row; ?>' data-sizex='<?php echo $this->element->size_x; ?>' data-sizey='<?php echo $this->element->size_y; ?>' class='ewd-upcp-single-product-custom-element'>
     1<li data-col='<?php echo esc_attr( $this->element->col ); ?>' data-row='<?php echo esc_attr( $this->element->row ); ?>' data-sizex='<?php echo esc_attr( $this->element->size_x ); ?>' data-sizey='<?php echo esc_attr( $this->element->size_y ); ?>' class='ewd-upcp-single-product-custom-element'>
    22
    33    <?php $this->print_main_image(); ?>
  • ultimate-product-catalogue/tags/5.0.26/ewd-upcp-templates/single-product-custom-element-next-previous.php

    r2638260 r2650578  
    1 <li data-col='<?php echo $this->element->col; ?>' data-row='<?php echo $this->element->row; ?>' data-sizex='<?php echo $this->element->size_x; ?>' data-sizey='<?php echo $this->element->size_y; ?>' class='ewd-upcp-single-product-custom-element'>
     1<li data-col='<?php echo esc_attr( $this->element->col ); ?>' data-row='<?php echo esc_attr( $this->element->row ); ?>' data-sizex='<?php echo esc_attr( $this->element->size_x ); ?>' data-sizey='<?php echo esc_attr( $this->element->size_y ); ?>' class='ewd-upcp-single-product-custom-element'>
    22
    33    <?php $this->maybe_print_next_previous_products(); ?>
  • ultimate-product-catalogue/tags/5.0.26/ewd-upcp-templates/single-product-custom-element-price-label.php

    r2638260 r2650578  
    1 <li data-col='<?php echo $this->element->col; ?>' data-row='<?php echo $this->element->row; ?>' data-sizex='<?php echo $this->element->size_x; ?>' data-sizey='<?php echo $this->element->size_y; ?>' class='ewd-upcp-single-product-custom-element'>
     1<li data-col='<?php echo esc_attr( $this->element->col ); ?>' data-row='<?php echo esc_attr( $this->element->row ); ?>' data-sizex='<?php echo esc_attr( $this->element->size_x ); ?>' data-sizey='<?php echo esc_attr( $this->element->size_y ); ?>' class='ewd-upcp-single-product-custom-element'>
    22
    33    <?php _e( 'Price', 'ultimate-product-catalogue' ); ?>:
  • ultimate-product-catalogue/tags/5.0.26/ewd-upcp-templates/single-product-custom-element-price.php

    r2638260 r2650578  
    1 <li data-col='<?php echo $this->element->col; ?>' data-row='<?php echo $this->element->row; ?>' data-sizex='<?php echo $this->element->size_x; ?>' data-sizey='<?php echo $this->element->size_y; ?>' class='ewd-upcp-single-product-custom-element'>
     1<li data-col='<?php echo esc_attr( $this->element->col ); ?>' data-row='<?php echo esc_attr( $this->element->row ); ?>' data-sizex='<?php echo esc_attr( $this->element->size_x ); ?>' data-sizey='<?php echo esc_attr( $this->element->size_y ); ?>' class='ewd-upcp-single-product-custom-element'>
    22
    33    <?php $this->maybe_print_next_previous_products(); ?>
  • ultimate-product-catalogue/tags/5.0.26/ewd-upcp-templates/single-product-custom-element-related-products.php

    r2638260 r2650578  
    1 <li data-col='<?php echo $this->element->col; ?>' data-row='<?php echo $this->element->row; ?>' data-sizex='<?php echo $this->element->size_x; ?>' data-sizey='<?php echo $this->element->size_y; ?>' class='ewd-upcp-single-product-custom-element'>
     1<li data-col='<?php echo esc_attr( $this->element->col ); ?>' data-row='<?php echo esc_attr( $this->element->row ); ?>' data-sizex='<?php echo esc_attr( $this->element->size_x ); ?>' data-sizey='<?php echo esc_attr( $this->element->size_y ); ?>' class='ewd-upcp-single-product-custom-element'>
    22
    33    <?php $this->maybe_print_related_products(); ?>
  • ultimate-product-catalogue/tags/5.0.26/ewd-upcp-templates/single-product-custom-element-subcategories-label.php

    r2638260 r2650578  
    1 <li data-col='<?php echo $this->element->col; ?>' data-row='<?php echo $this->element->row; ?>' data-sizex='<?php echo $this->element->size_x; ?>' data-sizey='<?php echo $this->element->size_y; ?>' class='ewd-upcp-single-product-custom-element'>
     1<li data-col='<?php echo esc_attr( $this->element->col ); ?>' data-row='<?php echo esc_attr( $this->element->row ); ?>' data-sizex='<?php echo esc_attr( $this->element->size_x ); ?>' data-sizey='<?php echo esc_attr( $this->element->size_y ); ?>' class='ewd-upcp-single-product-custom-element'>
    22
    33    <?php echo esc_html( $this->get_subcategories_label() ); ?>
  • ultimate-product-catalogue/tags/5.0.26/ewd-upcp-templates/single-product-custom-element-subcategories.php

    r2638260 r2650578  
    1 <li data-col='<?php echo $this->element->col; ?>' data-row='<?php echo $this->element->row; ?>' data-sizex='<?php echo $this->element->size_x; ?>' data-sizey='<?php echo $this->element->size_y; ?>' class='ewd-upcp-single-product-custom-element'>
     1<li data-col='<?php echo esc_attr( $this->element->col ); ?>' data-row='<?php echo esc_attr( $this->element->row ); ?>' data-sizex='<?php echo esc_attr( $this->element->size_x ); ?>' data-sizey='<?php echo esc_attr( $this->element->size_y ); ?>' class='ewd-upcp-single-product-custom-element'>
    22
    33    <?php echo esc_html( $this->product->get_subcategory_names() ); ?>
  • ultimate-product-catalogue/tags/5.0.26/ewd-upcp-templates/single-product-custom-element-tags-label.php

    r2638260 r2650578  
    1 <li data-col='<?php echo $this->element->col; ?>' data-row='<?php echo $this->element->row; ?>' data-sizex='<?php echo $this->element->size_x; ?>' data-sizey='<?php echo $this->element->size_y; ?>' class='ewd-upcp-single-product-custom-element'>
     1<li data-col='<?php echo esc_attr( $this->element->col ); ?>' data-row='<?php echo esc_attr( $this->element->row ); ?>' data-sizex='<?php echo esc_attr( $this->element->size_x ); ?>' data-sizey='<?php echo esc_attr( $this->element->size_y ); ?>' class='ewd-upcp-single-product-custom-element'>
    22
    33    <?php echo esc_html( $this->get_tags_label() ); ?>
  • ultimate-product-catalogue/tags/5.0.26/ewd-upcp-templates/single-product-custom-element-tags.php

    r2638260 r2650578  
    1 <li data-col='<?php echo $this->element->col; ?>' data-row='<?php echo $this->element->row; ?>' data-sizex='<?php echo $this->element->size_x; ?>' data-sizey='<?php echo $this->element->size_y; ?>' class='ewd-upcp-single-product-custom-element'>
     1<li data-col='<?php echo esc_attr( $this->element->col ); ?>' data-row='<?php echo esc_attr( $this->element->row ); ?>' data-sizex='<?php echo esc_attr( $this->element->size_x ); ?>' data-sizey='<?php echo esc_attr( $this->element->size_y ); ?>' class='ewd-upcp-single-product-custom-element'>
    22
    33    <?php echo esc_html( $this->product->get_tag_names() ); ?>
  • ultimate-product-catalogue/tags/5.0.26/ewd-upcp-templates/single-product-custom-element-text.php

    r2638260 r2650578  
    1 <li data-col='<?php echo $this->element->col; ?>' data-row='<?php echo $this->element->row; ?>' data-sizex='<?php echo $this->element->size_x; ?>' data-sizey='<?php echo $this->element->size_y; ?>' class='ewd-upcp-single-product-custom-element'>
     1<li data-col='<?php echo esc_attr( $this->element->col ); ?>' data-row='<?php echo esc_attr( $this->element->row ); ?>' data-sizex='<?php echo esc_attr( $this->element->size_x ); ?>' data-sizey='<?php echo esc_attr( $this->element->size_y ); ?>' class='ewd-upcp-single-product-custom-element'>
    22
    33    <?php echo do_shortcode( $this->element->element_id ); ?>
  • ultimate-product-catalogue/tags/5.0.26/ewd-upcp-templates/single-product-custom-element-title.php

    r2638260 r2650578  
    1 <li data-col='<?php echo $this->element->col; ?>' data-row='<?php echo $this->element->row; ?>' data-sizex='<?php echo $this->element->size_x; ?>' data-sizey='<?php echo $this->element->size_y; ?>' class='ewd-upcp-single-product-custom-element'>
     1<li data-col='<?php echo esc_attr( $this->element->col ); ?>' data-row='<?php echo esc_attr( $this->element->row ); ?>' data-sizex='<?php echo esc_attr( $this->element->size_x ); ?>' data-sizey='<?php echo esc_attr( $this->element->size_y ); ?>' class='ewd-upcp-single-product-custom-element'>
    22
    33    <?php $this->print_title(); ?>
  • ultimate-product-catalogue/tags/5.0.26/ewd-upcp-templates/single-product-description.php

    r2638260 r2650578  
    11<div class='ewd-upcp-single-product-description'>
    22
    3     <?php echo $this->product->get_product_description(); ?>
     3    <?php echo wp_kses_post( $this->product->get_product_description() ); ?>
    44
    55</div>
  • ultimate-product-catalogue/tags/5.0.26/ewd-upcp-templates/single-product-main-image.php

    r2638260 r2650578  
    1 <div class='ewd-upcp-single-product-main-image <?php echo $this->get_main_image_lightbox_class(); ?>' data-ulbsource='<?php echo esc_attr( $this->product->get_main_image_url() ); ?>'>
     1<div class='ewd-upcp-single-product-main-image <?php echo esc_attr( $this->get_main_image_lightbox_class() ); ?>' data-ulbsource='<?php echo esc_attr( $this->product->get_main_image_url() ); ?>'>
    22
    33    <?php echo $this->product->get_image(); ?>
  • ultimate-product-catalogue/tags/5.0.26/ewd-upcp-templates/single-product-tab-faqs.php

    r2638260 r2650578  
    33    <?php $ufaq_product_category = get_term_by( 'name', $this->product->name, 'ufaq-category' ); ?>
    44
    5     <?php echo do_shortcode( "[ultimate-faqs include_category='". ( ! empty( $ufaq_product_category ) ? $ufaq_product_category->slug : '' )  . ',' . $this->get_product_category_slugs() . "']" ); ?>
     5    <?php echo do_shortcode( "[ultimate-faqs include_category='". ( ! empty( $ufaq_product_category ) ? sanitize_text_field( $ufaq_product_category->slug ) : '' ) . ',' . esc_attr( $this->get_product_category_slugs() ) . "']" ); ?>
    66
    77</div>
  • ultimate-product-catalogue/tags/5.0.26/ewd-upcp-templates/single-product-videos.php

    r2638260 r2650578  
    77        </div> */ ?>
    88
    9         <div class='ewd-upcp-single-video' data-video_key='<?php echo ( $key + 1 ); ?>'>
     9        <div class='ewd-upcp-single-video' data-video_key='<?php echo esc_attr( $key + 1 ); ?>'>
    1010
    1111            <iframe width='300' height='225' src='<?php echo esc_attr( $video->embed_url ); ?>' webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
  • ultimate-product-catalogue/tags/5.0.26/ewd-upcp-templates/tabbed-single-product.php

    r2638260 r2650578  
    1 <div id='ewd-upcp-single-product-<?php echo $this->product->id; ?>' class='ewd-upcp-tabbed-product-page ewd-upcp-product-page'>
     1<div id='ewd-upcp-single-product-<?php echo esc_attr( $this->product->id ); ?>' class='ewd-upcp-tabbed-product-page ewd-upcp-product-page'>
    22
    33    <?php $this->print_product_breadcrumbs(); ?>
  • ultimate-product-catalogue/tags/5.0.26/includes/AdminCustomFields.class.php

    r2638260 r2650578  
    1414        // Add the admin menu
    1515        add_action( 'admin_menu', array( $this, 'add_menu_page' ), 12 );
    16 
    17         // Enqueue admin scripts
    18         add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ), 12 );
    1916    }
    2017
     
    221218        do_action( 'ewd_upcp_custom_fields_updated' );
    222219    }
    223 
    224     public function enqueue_scripts() {
    225 
    226         $screen = get_current_screen();
    227 
    228         if ( $screen->id == 'tracking_page_ewd-upcp-custom-fields' ) {
    229 
    230             wp_enqueue_style( 'ewd-upcp-admin-css', EWD_UPCP_PLUGIN_URL . '/assets/css/ewd-upcp-admin.css', array(), EWD_UPCP_VERSION );
    231             wp_enqueue_script( 'ewd-upcp-admin-js', EWD_UPCP_PLUGIN_URL . '/assets/js/ewd-upcp-admin.js', array( 'jquery', 'jquery-ui-sortable' ), EWD_UPCP_VERSION, true );
    232         }
    233     }
    234220}
    235221} // endif;
  • ultimate-product-catalogue/tags/5.0.26/includes/AdminProductPage.class.php

    r2638260 r2650578  
    399399                                <li>
    400400
    401                                     <a class='ewd-upcp-custom-product-page-add-element' data-name='<?php echo $element->name; ?>' data-class='<?php echo $element->class; ?>' data-id='<?php echo $element->id; ?>' data-x_size='<?php echo $element->x_size; ?>' data-y_size='<?php echo $element->y_size; ?>'><?php echo $element->name; ?></a>
     401                                    <a class='ewd-upcp-custom-product-page-add-element' data-name='<?php echo esc_attr( $element->name ); ?>' data-class='<?php echo esc_attr( $element->class ); ?>' data-id='<?php echo esc_attr( $element->id ); ?>' data-x_size='<?php echo esc_attr( $element->x_size ); ?>' data-y_size='<?php echo esc_attr( $element->y_size ); ?>'><?php echo esc_html( $element->name ); ?></a>
    402402
    403403                                </li>
     
    417417                                <?php foreach ( $gridster as $grid_element ) { ?>
    418418
    419                                     <li data-col='<?php echo $grid_element->col; ?>' data-row='<?php echo $grid_element->row; ?>' data-sizex='<?php echo $grid_element->size_x; ?>' data-sizey='<?php echo $grid_element->size_y; ?>'  data-elementclass='<?php echo $grid_element->element_class; ?>' data-elementid='<?php echo $grid_element->element_id; ?>' class='prod-page-div gs-w' style='display: list-item; position:absolute;'>
     419                                    <li data-col='<?php echo esc_attr( $grid_element->col ); ?>' data-row='<?php echo esc_attr( $grid_element->row ); ?>' data-sizex='<?php echo esc_attr( $grid_element->size_x ); ?>' data-sizey='<?php echo esc_attr( $grid_element->size_y); ?>'  data-elementclass='<?php echo esc_attr( $grid_element->element_class ); ?>' data-elementid='<?php echo esc_attr( $grid_element->element_id ); ?>' class='prod-page-div gs-w' style='display: list-item; position:absolute;'>
    420420
    421421                                        <?php echo substr( $grid_element->element_type, 0, strpos( $grid_element->element_type, '<' ) ); ?>
     
    426426
    427427                                            <textarea class='ewd-upcp-pb-textarea'>
    428                                                 <?php echo $grid_element->element_id; ?>
     428                                                <?php echo esc_textarea( $grid_element->element_id ); ?>
    429429                                            </textarea>
    430430
     
    500500                                <li>
    501501
    502                                     <a class='ewd-upcp-custom-product-page-add-element' data-name='<?php echo $element->name; ?>' data-class='<?php echo $element->class; ?>' data-x_size='<?php echo $element->x_size; ?>' data-y_size='<?php echo $element->y_size; ?>'><?php echo $element->name; ?></a>
     502                                    <a class='ewd-upcp-custom-product-page-add-element' data-name='<?php echo esc_attr( $element->name ); ?>' data-class='<?php echo esc_attr( $element->class ); ?>' data-x_size='<?php echo esc_attr( $element->x_size ); ?>' data-y_size='<?php echo esc_attr( $element->y_size ); ?>'><?php echo esc_html( $element->name ); ?></a>
    503503
    504504                                </li>
     
    518518                                <?php foreach ( $gridster as $grid_element ) { ?>
    519519
    520                                     <li data-col='<?php echo $grid_element->col; ?>' data-row='<?php echo $grid_element->row; ?>' data-sizex='<?php echo $grid_element->size_x; ?>' data-sizey='<?php echo $grid_element->size_y; ?>'  data-elementclass='<?php echo $grid_element->element_class; ?>' data-elementid='<?php echo $grid_element->element_id; ?>' class='prod-page-div gs-w' style='display: list-item; position:absolute;'>
     520                                    <li data-col='<?php echo esc_attr( $grid_element->col ); ?>' data-row='<?php echo esc_attr( $grid_element->row ); ?>' data-sizex='<?php echo esc_attr( $grid_element->size_x ); ?>' data-sizey='<?php echo esc( $grid_element->size_y ); ?>'  data-elementclass='<?php echo esc_attr( $grid_element->element_class ); ?>' data-elementid='<?php echo esc_attr( $grid_element->element_id ); ?>' class='prod-page-div gs-w' style='display: list-item; position:absolute;'>
    521521
    522522                                        <?php echo substr( $grid_element->element_type, 0, strpos( $grid_element->element_type, '<' ) ); ?>
     
    527527
    528528                                            <textarea class='ewd-upcp-pb-textarea'>
    529                                                 <?php echo $grid_element->element_id; ?>
     529                                                <?php echo esc_textarea( $grid_element->element_id ); ?>
    530530                                            </textarea>
    531531
     
    537537
    538538                            </ul>
    539                            
     539
    540540                        </div>
    541541
     
    563563
    564564                </div>
    565                
     565
    566566            </form>
    567            
     567
    568568        </div>
    569569
     
    611611
    612612    public function save_gridster_layout() {
     613        global $ewd_upcp_controller;
     614
     615        // Authenticate request
     616        if (
     617            ! check_ajax_referer( 'ewd-upcp-admin-js', 'nonce' )
     618            ||
     619            ! current_user_can( $ewd_upcp_controller->settings->get_setting( 'access-role' ) )
     620        ) {
     621            ewdUpcpHelper::admin_nopriv_ajax();
     622        }
    613623
    614624        $option_name = $_POST['type'] == 'mobile' ? 'UPCP_Product_Page_Serialized_Mobile' : 'UPCP_Product_Page_Serialized';
  • ultimate-product-catalogue/tags/5.0.26/includes/Ajax.class.php

    r2638260 r2650578  
    3232            global $ewd_upcp_controller;
    3333
     34            // Authenticate request
     35            if ( ! check_ajax_referer( 'ewd-upcp-js', 'nonce' ) ) {
     36                ewdUpcpHelper::bad_nonce_ajax();
     37            }
     38
    3439            $product_id = intval( $_POST['product_id'] );
    3540
     
    4348        public function update_catalog() {
    4449            global $ewd_upcp_controller;
    45            
     50
     51            // Authenticate request
     52            if ( ! check_ajax_referer( 'ewd-upcp-js', 'nonce' ) ) {
     53                ewdUpcpHelper::bad_nonce_ajax();
     54            }
     55
    4656            $args = array(
    4757                'sidebar'           => 'no',
     
    112122            global $woocommerce;
    113123
     124            // Authenticate request
     125            if ( ! check_ajax_referer( 'ewd-upcp-js', 'nonce' ) ) {
     126                ewdUpcpHelper::bad_nonce_ajax();
     127            }
     128
    114129            setcookie( 'upcp_cart_products', '', time() - 3600, '/' );
    115130
     
    129144            global $ewd_upcp_controller;
    130145            global $woocommerce;
     146
     147            // Authenticate request
     148            if ( ! check_ajax_referer( 'ewd-upcp-js', 'nonce' ) ) {
     149                ewdUpcpHelper::bad_nonce_ajax();
     150            }
    131151
    132152            if ( ! empty( $ewd_upcp_controller->settings->get_setting( 'woocommerce-checkout' ) ) and ! empty( $ewd_upcp_controller->settings->get_setting( 'woocommerce-sync' ) ) and is_object( $woocommerce ) ) {
  • ultimate-product-catalogue/tags/5.0.26/includes/CustomPostTypes.class.php

    r2638260 r2650578  
    389389        ?>
    390390   
    391         <input type="hidden" name="ewd_upcp_nonce" value="<?php echo $this->nonce; ?>">
     391        <input type="hidden" name="ewd_upcp_nonce" value="<?php echo esc_attr( $this->nonce ); ?>">
    392392
    393393        <div class='ewd-upcp-meta-field'>
     
    612612
    613613                            <?php foreach ( $products as $product ) { ?>
    614                                 <option value='<?php echo $product->ID; ?>'><?php echo esc_html( $product->post_title ); ?></option>
     614                                <option value='<?php echo esc_attr( $product->ID ); ?>'><?php echo esc_html( $product->post_title ); ?></option>
    615615                            <?php } ?>
    616616
     
    628628
    629629                                <?php foreach ( $products as $product ) { ?>
    630                                     <option value='<?php echo $product->ID; ?>' <?php echo ( $related_product == $product->ID ? 'selected' : '' ); ?>><?php echo esc_html( $product->post_title ); ?></option>
     630                                    <option value='<?php echo esc_attr( $product->ID ); ?>' <?php echo ( $related_product == $product->ID ? 'selected' : '' ); ?>><?php echo esc_html( $product->post_title ); ?></option>
    631631                                <?php } ?>
    632632
     
    658658
    659659                        <?php foreach ( $products as $product ) { ?>
    660                             <option value='<?php echo $product->ID; ?>' <?php echo ( $previous_product == $product->ID ? 'selected' : '' ); ?>><?php echo esc_html( $product->post_title ); ?></option>
     660                            <option value='<?php echo esc_attr( $product->ID ); ?>' <?php echo ( $previous_product == $product->ID ? 'selected' : '' ); ?>><?php echo esc_html( $product->post_title ); ?></option>
    661661                        <?php } ?>
    662662
     
    676676
    677677                        <?php foreach ( $products as $product ) { ?>
    678                             <option value='<?php echo $product->ID; ?>' <?php echo ( $next_product == $product->ID ? 'selected' : '' ); ?>><?php echo esc_html( $product->post_title ); ?></option>
     678                            <option value='<?php echo esc_attr( $product->ID ); ?>' <?php echo ( $next_product == $product->ID ? 'selected' : '' ); ?>><?php echo esc_html( $product->post_title ); ?></option>
    679679                        <?php } ?>
    680680
     
    870870                    <?php foreach ( $products as $product ) { ?>
    871871                        <label class='ewd-upcp-admin-input-container'>
    872                             <input type='checkbox' class='ewd-upcp-add-items-product-checkbox' value='<?php echo $product->ID; ?>' />
     872                            <input type='checkbox' class='ewd-upcp-add-items-product-checkbox' value='<?php echo esc_attr( $product->ID ); ?>' />
    873873                            <span class='ewd-upcp-admin-checkbox'></span> <span><?php echo esc_html( $product->post_title ); ?></span>
    874874                        </label>
     
    885885                    <?php foreach ( $categories as $category ) { ?>
    886886                        <label class='ewd-upcp-admin-input-container'>
    887                             <input type='checkbox' class='ewd-upcp-add-items-category-checkbox' value='<?php echo $category->term_id; ?>' />
     887                            <input type='checkbox' class='ewd-upcp-add-items-category-checkbox' value='<?php echo esc_attr( $category->term_id ); ?>' />
    888888                            <span class='ewd-upcp-admin-checkbox'></span> <span><?php echo esc_html( $category->name ); ?></span>
    889889                        </label>
     
    904904            <div class='ewd-upcp-catalog-meta-current-items'>
    905905
    906                 <input type="hidden" name="ewd_upcp_nonce" value="<?php echo $this->nonce; ?>">
     906                <input type="hidden" name="ewd_upcp_nonce" value="<?php echo esc_attr( $this->nonce ); ?>">
    907907
    908908                <table class='ewd-upcp-catalog-meta-items'>
     
    936936                                <td>
    937937
    938                                     <input type='hidden' name='catalog_item_id[]' value='<?php echo $item->id; ?>' />
    939 
    940                                     <input type='hidden' name='catalog_item_type[]' value='<?php echo $item->type; ?>' />
     938                                    <input type='hidden' name='catalog_item_id[]' value='<?php echo esc_attr( $item->id ); ?>' />
     939
     940                                    <input type='hidden' name='catalog_item_type[]' value='<?php echo esc_attr( $item->type ); ?>' />
    941941
    942942                                    <?php echo esc_html( $item_name ) ?>
     
    12571257     */
    12581258    public function update_category_and_tag_order() {
     1259        global $ewd_upcp_controller;
     1260
     1261        // Authenticate request
     1262        if (
     1263            ! check_ajax_referer( 'ewd-upcp-admin-js', 'nonce' )
     1264            ||
     1265            ! current_user_can( $ewd_upcp_controller->settings->get_setting( 'access-role' ) )
     1266        ) {
     1267            ewdUpcpHelper::admin_nopriv_ajax();
     1268        }
    12591269
    12601270        $ids = is_array( $_POST['tag'] ) ? array_map( 'intval', $_POST['tag'] ) : array();
     
    14971507     */
    14981508    public function update_product_order() {
     1509        global $ewd_upcp_controller;
     1510
     1511        // Authenticate request
     1512        if (
     1513            ! check_ajax_referer( 'ewd-upcp-admin-js', 'nonce' )
     1514            ||
     1515            ! current_user_can( $ewd_upcp_controller->settings->get_setting( 'access-role' ) )
     1516        ) {
     1517            ewdUpcpHelper::admin_nopriv_ajax();
     1518        }
    14991519
    15001520        $ids = is_array( $_POST['post'] ) ? array_map( 'intval', $_POST['post'] ) : array();
  • ultimate-product-catalogue/tags/5.0.26/includes/Dashboard.class.php

    r2638260 r2650578  
    1515    public function __construct() {
    1616        add_action( 'admin_menu', array( $this, 'add_dashboard_to_menu' ), 99 );
    17 
    18         add_action( 'admin_enqueue_scripts',  array( $this, 'enqueue_scripts' ) );
    19 
    20         add_action( 'wp_ajax_ewd_upcp_hide_upgrade_box', array($this, 'hide_upgrade_box') );
    21         add_action( 'wp_ajax_ewd_upcp_display_upgrade_box', array($this, 'display_upgrade_box') );
    2217
    2318        if ( ! empty( $_POST['ewd_upcp_reset_settings'] ) ) {
     
    6257    }
    6358
    64     // Enqueues the admin script so that our hacky sub-menu opening function can run
    65     public function enqueue_scripts() {
    66         global $admin_page_hooks;
    67        
    68         $currentScreen = get_current_screen();
    69         if ( $currentScreen->id == 'upcp_product_page_ewd-upcp-settings' ) {
    70             wp_enqueue_style( 'ewd-upcp-admin-css', EWD_UPCP_PLUGIN_URL . '/assets/css/ewd-upcp-admin.css', array(), EWD_UPCP_VERSION );
    71             wp_enqueue_script( 'ewd-upcp-admin-js', EWD_UPCP_PLUGIN_URL . '/assets/js/ewd-upcp-admin.js', array( 'jquery' ), EWD_UPCP_VERSION, true );
    72         }
    73     }
    74 
    7559    public function display_dashboard_screen() {
    7660        global $ewd_upcp_controller;
     
    10084                    $premium_info = apply_filters( 'ewd_dashboard_top', $premium_info, 'UPCP', 'https://www.etoilewebdesign.com/license-payment/?Selected=UPCP&Quantity=1' );
    10185
    102                     echo $premium_info;
     86                    // This will allow us to disaply the form
     87                    $tmp_fun = function( $tags ) {
     88                        $tags = array_merge(
     89                            $tags,
     90                            [
     91                                'input' => [
     92                                    'class'       => true,
     93                                    'name'        => true,
     94                                    'type'        => true,
     95                                    'value'       => true,
     96                                    'placeholder' => true
     97                                ]
     98                            ]
     99                        );
     100                        if(isset($tags['form'])) {
     101                            $tags['form'] = array_merge($tags['form'], ['class' => true]);
     102                        }
     103                        return $tags;
     104                    };
     105                    add_filter( 'wp_kses_allowed_html', $tmp_fun, 10, 1);
     106                    echo wp_kses_post( $premium_info );
     107                    remove_filter( 'wp_kses_allowed_html', $tmp_fun, 10 );
    103108                } ?>
    104        
     109
    105110                <div class="ewd-upcp-dashboard-new-widget-box ewd-widget-box-full" id="ewd-upcp-dashboard-support-widget-box">
    106111                    <div class="ewd-upcp-dashboard-new-widget-box-top"><?php _e('Get Support', 'ultimate-product-catalogue'); ?><span id="ewd-upcp-dash-mobile-support-down-caret">&nbsp;&nbsp;&#9660;</span><span id="ewd-upcp-dash-mobile-support-up-caret">&nbsp;&nbsp;&#9650;</span></div>
     
    151156                                        foreach ( $catalogs as $catalog ) { ?>
    152157                                            <tr>
    153                                                 <td><a href='post.php?post=<?php echo $catalog->ID; ?>&action=edit'><?php echo $catalog->post_title; ?></a></td>
    154                                                 <td>[product-catalogue id='<?php echo $catalog->ID; ?>']</td>
     158                                                <td><a href='post.php?post=<?php echo esc_url( $catalog->ID ); ?>&action=edit'><?php echo esc_html( $catalog->post_title ); ?></a></td>
     159                                                <td>[product-catalogue id='<?php echo sanitize_text_field( $catalog->ID ); ?>']</td>
    155160                                            </tr>
    156161                                        <?php }
     
    228233                           
    229234                            <?php if ( ! get_option("EWD_UPCP_Trial_Happening") ) {
    230                                 $trial_info = sprintf( __( '<a href="%s" target="_blank">Visit our website</a> to learn how to get a free 7-day trial of the premium plugin.'), 'https://www.etoilewebdesign.com/premium-upgrade-instructions/' );     
     235                                $trial_info = sprintf( __( '<a href="%s" target="_blank">Visit our website</a> to learn how to get a free 7-day trial of the premium plugin.'), 'https://www.etoilewebdesign.com/premium-upgrade-instructions/' );
    231236
    232237                                echo apply_filters( 'ewd_trial_button', $trial_info, 'UPCP' );
  • ultimate-product-catalogue/tags/5.0.26/includes/DeactivationSurvey.class.php

    r2638260 r2650578  
    5555        <div class="ewd-upcp-deactivate-survey-modal" id="ewd-upcp-deactivate-survey-ultimate-product-catalogue">
    5656            <div class="ewd-upcp-deactivate-survey-wrap">
    57                 <form class="ewd-upcp-deactivate-survey" method="post" data-installtime="<?php echo $install_time; ?>">
     57                <form class="ewd-upcp-deactivate-survey" method="post" data-installtime="<?php echo esc_attr( $install_time ); ?>">
    5858                    <span class="ewd-upcp-deactivate-survey-title"><span class="dashicons dashicons-testimonial"></span><?php echo ' ' . __( 'Quick Feedback', 'ultimate-product-catalogue' ); ?></span>
    5959                    <span class="ewd-upcp-deactivate-survey-desc"><?php echo __('If you have a moment, please share why you are deactivating Ultimate Product Catalog:', 'ultimate-product-catalogue' ); ?></span>
     
    6161                        <?php foreach ( $options as $id => $option ) : ?>
    6262                            <div class="ewd-upcp-deactivate-survey-option">
    63                                 <label for="ewd-upcp-deactivate-survey-option-ultimate-product-catalogue-<?php echo $id; ?>" class="ewd-upcp-deactivate-survey-option-label">
    64                                     <input id="ewd-upcp-deactivate-survey-option-ultimate-product-catalogue-<?php echo $id; ?>" class="ewd-upcp-deactivate-survey-option-input" type="radio" name="code" value="<?php echo $id; ?>" />
    65                                     <span class="ewd-upcp-deactivate-survey-option-reason"><?php echo $option['title']; ?></span>
     63                                <label for="ewd-upcp-deactivate-survey-option-ultimate-product-catalogue-<?php echo esc_attr( $id ); ?>" class="ewd-upcp-deactivate-survey-option-label">
     64                                    <input id="ewd-upcp-deactivate-survey-option-ultimate-product-catalogue-<?php echo esc_attr( $id ); ?>" class="ewd-upcp-deactivate-survey-option-input" type="radio" name="code" value="<?php echo esc_attr( $id ); ?>" />
     65                                    <span class="ewd-upcp-deactivate-survey-option-reason"><?php echo esc_html( $option['title'] ); ?></span>
    6666                                </label>
    6767                                <?php if ( ! empty( $option['details'] ) ) : ?>
    68                                     <input class="ewd-upcp-deactivate-survey-option-details" type="text" placeholder="<?php echo $option['details']; ?>" />
     68                                    <input class="ewd-upcp-deactivate-survey-option-details" type="text" placeholder="<?php echo esc_attr( $option['details'] ); ?>" />
    6969                                <?php endif; ?>
    7070                            </div>
  • ultimate-product-catalogue/tags/5.0.26/includes/Export.class.php

    r2638260 r2650578  
    2121
    2222        if ( isset( $_POST['ewd_upcp_export'] ) ) { add_action( 'admin_menu', array($this, 'export_products' )); }
    23 
    24         add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_export_scripts' ) );
    2523    }
    2624
     
    171169    }
    172170
    173     public function enqueue_export_scripts() {
    174 
    175         $screen = get_current_screen();
    176 
    177         if ( $screen->id == 'ewd-upcp-tracking_page_ewd-upcp-export' ) {
    178 
    179             wp_enqueue_style( 'ewd-upcp-admin-css', EWD_UPCP_PLUGIN_URL . '/assets/css/ewd-upcp-admin.css', array(), EWD_UPCP_VERSION );
    180             wp_enqueue_script( 'ewd-upcp-admin-js', EWD_UPCP_PLUGIN_URL . '/assets/js/ewd-upcp-admin.js', array( 'jquery' ), EWD_UPCP_VERSION, true );
    181         }
    182     }
    183 
    184171}
    185172
  • ultimate-product-catalogue/tags/5.0.26/includes/Import.class.php

    r2638260 r2650578  
    1919
    2020        if ( isset( $_POST['ewdupcpImport'] ) ) { add_action( 'admin_init', array($this, 'import_products' )); }
    21 
    22         add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_import_scripts' ) );
    2321    }
    2422
     
    376374    }
    377375
    378     public function enqueue_import_scripts() {
    379 
    380         $screen = get_current_screen();
    381 
    382         if ( $screen->id == 'ewd-upcp-tracking_page_ewd-upcp-import' ) {
    383 
    384             wp_enqueue_style( 'ewd-upcp-admin-css', EWD_UPCP_PLUGIN_URL . '/assets/css/ewd-upcp-admin.css', array(), '5.0.0' );
    385             wp_enqueue_script( 'ewd-upcp-admin-js', EWD_UPCP_PLUGIN_URL . '/assets/js/ewd-upcp-admin.js', array( 'jquery' ), '5.0.0', true );
    386         }
    387     }
    388 
    389376    public function display_notice() {
    390377
  • ultimate-product-catalogue/tags/5.0.26/includes/InstallationWalkthrough.class.php

    r2638260 r2650578  
    8080     */
    8181    public function add_category() {
     82        global $ewd_upcp_controller;
     83
     84        // Authenticate request
     85        if (
     86            ! check_ajax_referer( 'ewd-upcp-getting-started', 'nonce' )
     87            ||
     88            ! current_user_can( $ewd_upcp_controller->settings->get_setting( 'access-role' ) )
     89        ) {
     90            ewdUpcpHelper::admin_nopriv_ajax();
     91        }
    8292
    8393        $category_name = isset( $_POST['category_name'] ) ? sanitize_text_field( $_POST['category_name'] ) : '';
    84         $category_description = isset( $_POST['category_description'] ) ? sanitize_textarea_field( $_POST['category_description'] ) : '';
    85 
    86         $category_term_id = wp_insert_term( $category_name, EWD_UPCP_PRODUCT_CATEGORY_TAXONOMY, array('description' => $category_description) );
    87 
    88         echo json_encode ( array( 'category_name' => $category_name, 'category_id' => $category_term_id['term_id'] ) );
    89 
    90         exit();
     94        $category_description = isset( $_POST['category_description'] ) ? sanitize_textarea_field( $_POST['category_description'] ) : '';
     95
     96        $category_term_id = wp_insert_term( $category_name, EWD_UPCP_PRODUCT_CATEGORY_TAXONOMY, array('description' => $category_description) );
     97
     98        echo json_encode ( array( 'category_name' => $category_name, 'category_id' => $category_term_id['term_id'] ) );
     99
     100        exit();
    91101    }
    92102
     
    96106     */
    97107    public function add_catalog() {
     108        global $ewd_upcp_controller;
     109
     110        // Authenticate request
     111        if (
     112            ! check_ajax_referer( 'ewd-upcp-getting-started', 'nonce' )
     113            ||
     114            ! current_user_can( $ewd_upcp_controller->settings->get_setting( 'access-role' ) )
     115        ) {
     116            ewdUpcpHelper::admin_nopriv_ajax();
     117        }
    98118
    99119        $args = array(
    100             'post_title' => isset( $_POST['catalog_name'] ) ? sanitize_text_field( $_POST['catalog_name'] ) : '',
    101             'post_content' => '',
    102             'post_status' => 'publish',
    103             'post_type' => EWD_UPCP_CATALOG_POST_TYPE
    104         );
    105 
    106         $catalog_id = wp_insert_post( $args ); 
    107 
    108         if ( $catalog_id ) {
    109 
    110             $args = array(
    111                 'taxonomy'      => EWD_UPCP_PRODUCT_CATEGORY_TAXONOMY,
    112                 'hide_empty'    => false,
    113             );
    114 
    115             $categories = get_terms( $args );
    116 
    117             $items = array();
    118 
    119             foreach ( $categories as $category ) {
    120 
    121                 $items[] = (object) array(
    122                     'type'  => 'category',
    123                     'id'    => $category->term_id,
    124                 );
    125             }
    126 
    127             update_post_meta( $catalog_id, 'items', $items );
    128         }
    129 
    130         $args = array(
    131             'post_title' => isset( $_POST['catalog_name'] ) ? sanitize_text_field( $_POST['catalog_name'] ) : '',
    132             'post_content' => '<!-- wp:paragraph --><p> [product-catalogue id="' . $catalog_id . '"] </p><!-- /wp:paragraph -->',
    133             'post_status' => 'publish',
    134             'post_type' => 'page'
    135         );
    136 
    137         $post_id = wp_insert_post( $args );
    138 
    139         wp_send_json_success(
    140             array(
    141                 'post_id'   => $post_id,
    142             )
    143         );
    144    
    145         exit();
     120            'post_title' => isset( $_POST['catalog_name'] ) ? sanitize_text_field( $_POST['catalog_name'] ) : '',
     121            'post_content' => '',
     122            'post_status' => 'publish',
     123            'post_type' => EWD_UPCP_CATALOG_POST_TYPE
     124        );
     125
     126        $catalog_id = wp_insert_post( $args );
     127
     128        if ( $catalog_id ) {
     129
     130            $args = array(
     131                'taxonomy'      => EWD_UPCP_PRODUCT_CATEGORY_TAXONOMY,
     132                'hide_empty'    => false,
     133            );
     134
     135            $categories = get_terms( $args );
     136
     137            $items = array();
     138
     139            foreach ( $categories as $category ) {
     140
     141                $items[] = (object) array(
     142                    'type'  => 'category',
     143                    'id'    => $category->term_id,
     144                );
     145            }
     146
     147            update_post_meta( $catalog_id, 'items', $items );
     148        }
     149
     150        $args = array(
     151            'post_title' => isset( $_POST['catalog_name'] ) ? sanitize_text_field( $_POST['catalog_name'] ) : '',
     152            'post_content' => '<!-- wp:paragraph --><p> [product-catalogue id="' . $catalog_id . '"] </p><!-- /wp:paragraph -->',
     153            'post_status' => 'publish',
     154            'post_type' => 'page'
     155        );
     156
     157        $post_id = wp_insert_post( $args );
     158
     159        wp_send_json_success(
     160            array(
     161                'post_id'   => $post_id,
     162            )
     163        );
     164
     165        exit();
    146166    }
    147167
     
    151171     */
    152172    public function set_options() {
     173        global $ewd_upcp_controller;
     174
     175        // Authenticate request
     176        if (
     177            ! check_ajax_referer( 'ewd-upcp-getting-started', 'nonce' )
     178            ||
     179            ! current_user_can( $ewd_upcp_controller->settings->get_setting( 'access-role' ) )
     180        ) {
     181            ewdUpcpHelper::admin_nopriv_ajax();
     182        }
    153183
    154184        $ewd_upcp_options = get_option( 'ewd-upcp-settings' );
     
    160190
    161191        update_option( 'ewd-upcp-settings', $ewd_upcp_options );
    162    
    163         exit();
     192
     193        exit();
    164194    }
    165195
     
    169199     */
    170200    public function add_product() {
     201        global $ewd_upcp_controller;
     202
     203        // Authenticate request
     204        if (
     205            ! check_ajax_referer( 'ewd-upcp-getting-started', 'nonce' )
     206            ||
     207            ! current_user_can( $ewd_upcp_controller->settings->get_setting( 'access-role' ) )
     208        ) {
     209            ewdUpcpHelper::admin_nopriv_ajax();
     210        }
    171211
    172212        $args = array(
     
    220260        wp_enqueue_script( 'ewd-upcp-admin-settings-js', EWD_UPCP_PLUGIN_URL . '/lib/simple-admin-pages/js/admin-settings.js', array( 'jquery' ), EWD_UPCP_VERSION );
    221261        wp_enqueue_script( 'ewd-upcp-admin-spectrum-js', EWD_UPCP_PLUGIN_URL . '/lib/simple-admin-pages/js/spectrum.js', array( 'jquery' ), EWD_UPCP_VERSION );
     262
     263        wp_localize_script(
     264            'ewd-upcp-getting-started',
     265            'ewd_upcp_getting_started',
     266            array(
     267                'nonce' => wp_create_nonce( 'ewd-upcp-getting-started' )
     268            )
     269        );
    222270    }
    223271
     
    332380                                <fieldset>
    333381                                    <legend class="screen-reader-text"><span>Currency Symbol</span></legend>
    334                                     <label for='currency_symbol'></label><input type='text' name='currency_symbol' value='<?php echo $currency_symbol; ?>' /><br />
     382                                    <label for='currency_symbol'></label><input type='text' name='currency_symbol' value='<?php echo esc_attr( $currency_symbol ); ?>' /><br />
    335383                                    <p><?php _e('What currency symbol, if any, should be displayed before or after the price? Leave blank for none.', 'ultimate-product-catalogue'); ?></p>
    336384                                </fieldset>
  • ultimate-product-catalogue/tags/5.0.26/includes/Product.class.php

    r2638260 r2650578  
    506506        $image_url = $this->get_main_image_url();
    507507
    508         return '<img class="ewd-upcp-product-image" src="' . $image_url . '" />';
     508        return '<img class="ewd-upcp-product-image" src="' . esc_url( $image_url ) . '" />';
    509509    }
    510510
  • ultimate-product-catalogue/tags/5.0.26/includes/ReviewAsk.class.php

    r2638260 r2650578  
    7474        wp_enqueue_style( 'ewd-upcp-review-ask-css', EWD_UPCP_PLUGIN_URL . '/assets/css/dashboard-review-ask.css' );
    7575        wp_enqueue_script( 'ewd-upcp-review-ask-js', EWD_UPCP_PLUGIN_URL . '/assets/js/dashboard-review-ask.js', array( 'jquery' ), EWD_UPCP_VERSION, true  );
     76
     77        wp_localize_script(
     78            'ewd-upcp-review-ask-js',
     79            'ewd_upcp_review_ask',
     80            array(
     81                'nonce' => wp_create_nonce( 'ewd-upcp-review-ask-js' )
     82            )
     83        );
    7684    }
    7785
    7886    public function hide_review_ask() {
     87        global $ewd_upcp_controller;
     88
     89        // Authenticate request
     90        if (
     91            ! check_ajax_referer( 'ewd-upcp-review-ask-js', 'nonce' )
     92            ||
     93            ! current_user_can( $ewd_upcp_controller->settings->get_setting( 'access-role' ) )
     94        ) {
     95            ewdUpcpHelper::admin_nopriv_ajax();
     96        }
    7997
    8098        $ask_review_time = sanitize_text_field($_POST['ask_review_time']);
    8199
    82         if ( get_option( 'ewd-upcp-review-ask-time' ) < time() + 3600*24 * $ask_review_time ) {
    83             update_option( 'ewd-upcp-review-ask-time', time() + 3600*24 * $ask_review_time );
    84         }
     100        if ( get_option( 'ewd-upcp-review-ask-time' ) < time() + 3600*24 * $ask_review_time ) {
     101            update_option( 'ewd-upcp-review-ask-time', time() + 3600*24 * $ask_review_time );
     102        }
    85103
    86         die();
     104        die();
    87105    }
    88106
    89107    public function send_feedback() {
     108        global $ewd_upcp_controller;
     109
     110        // Authenticate request
     111        if (
     112            ! check_ajax_referer( 'ewd-upcp-review-ask-js', 'nonce' )
     113            ||
     114            ! current_user_can( $ewd_upcp_controller->settings->get_setting( 'access-role' ) )
     115        ) {
     116            ewdUpcpHelper::admin_nopriv_ajax();
     117        }
     118
    90119        $headers = 'Content-type: text/html;charset=utf-8' . "\r\n"; 
    91         $feedback = sanitize_text_field($_POST['feedback']);
    92         $feedback .= '<br /><br />Email Address: ';
    93         $feedback .= sanitize_text_field($_POST['email_address']);
     120        $feedback = sanitize_text_field($_POST['feedback']);
     121        $feedback .= '<br /><br />Email Address: ';
     122        $feedback .= sanitize_email($_POST['email_address']);
    94123
    95         wp_mail('contact@etoilewebdesign.com', 'UPCP Feedback - Dashboard Form', $feedback, $headers);
     124        wp_mail('contact@etoilewebdesign.com', 'UPCP Feedback - Dashboard Form', $feedback, $headers);
    96125
    97         die();
     126        die();
    98127    }
    99128}
  • ultimate-product-catalogue/tags/5.0.26/includes/Widgets.class.php

    r2638260 r2650578  
    6060    public function widget( $args, $instance ) {
    6161
    62         echo $args['before_widget'];
    63         echo do_shortcode( "[insert-products product_ids='". $instance['product_list'] . "' catalogue_url='". $instance['catalogue_url'] . "' products_wide='". $instance['products_per_row'] . "']" );
    64         echo $args['after_widget'];
     62        echo esc_html( $args['before_widget'] );
     63        echo do_shortcode( "[insert-products product_ids='". sanitize_text_field( $instance['product_list'] ) . "' catalogue_url='". sanitize_text_field( $instance['catalogue_url'] ) . "' products_wide='". sanitize_text_field( $instance['products_per_row'] ) . "']" );
     64        echo esc_html( $args['after_widget'] );
    6565    }
    6666
     
    7979
    8080        <p>
    81             <label for="<?php echo $this->get_field_id( 'product_list' ); ?>"><?php _e( 'Comma-separated product IDs:', 'ultimate-product-catalogue' ); ?></label>
    82             <input class="widefat" id="<?php echo $this->get_field_id( 'product_list' ); ?>" name="<?php echo $this->get_field_name( 'product_list' ); ?>" type="text" value="<?php echo esc_attr( $product_list ); ?>">
    83         </p>
    84         <p>
    85             <label for="<?php echo $this->get_field_id( 'catalogue_url' ); ?>"><?php _e( 'The URL of your catalog:', 'ultimate-product-catalogue' ); ?></label>
    86             <input class="widefat" id="<?php echo $this->get_field_id( 'catalogue_url' ); ?>" name="<?php echo $this->get_field_name( 'catalogue_url' ); ?>" type="text" value="<?php echo esc_attr( $catalogue_url ); ?>">
    87         </p>
    88         <p>
    89             <label for="<?php echo $this->get_field_id( 'products_per_row' ); ?>"><?php _e( 'The number of products per row:', 'ultimate-product-catalogue' ); ?></label>
    90             <input class="widefat" id="<?php echo $this->get_field_id( 'products_per_row' ); ?>" name="<?php echo $this->get_field_name( 'products_per_row' ); ?>" type="text" value="<?php echo esc_attr( $products_per_row ); ?>">
     81            <label for="<?php echo esc_attr( $this->get_field_id( 'product_list' ) ); ?>"><?php _e( 'Comma-separated product IDs:', 'ultimate-product-catalogue' ); ?></label>
     82            <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'product_list' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'product_list' ) ); ?>" type="text" value="<?php echo esc_attr( $product_list ); ?>">
     83        </p>
     84        <p>
     85            <label for="<?php echo esc_attr( $this->get_field_id( 'catalogue_url' ) ); ?>"><?php _e( 'The URL of your catalog:', 'ultimate-product-catalogue' ); ?></label>
     86            <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'catalogue_url' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'catalogue_url' ) ); ?>" type="text" value="<?php echo esc_attr( $catalogue_url ); ?>">
     87        </p>
     88        <p>
     89            <label for="<?php echo esc_attr( $this->get_field_id( 'products_per_row' ) ); ?>"><?php _e( 'The number of products per row:', 'ultimate-product-catalogue' ); ?></label>
     90            <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'products_per_row' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'products_per_row' ) ); ?>" type="text" value="<?php echo esc_attr( $products_per_row ); ?>">
    9191        </p>
    9292
     
    133133    public function widget( $args, $instance ) {
    134134
    135         echo $args['before_widget'];
    136         echo do_shortcode( "[insert-products catalogue_id='". $instance['catalogue_id'] . "' product_count='". $instance['product_count'] . "' catalogue_url='". $instance['catalogue_url'] . "']" );
    137         echo $args['after_widget'];
     135        echo esc_html( $args['before_widget'] );
     136        echo do_shortcode( "[insert-products catalogue_id='". sanitize_text_field( $instance['catalogue_id'] ) . "' product_count='". sanitize_text_field( $instance['product_count'] ) . "' catalogue_url='". sanitize_text_field( $instance['catalogue_url'] ) . "']" );
     137        echo esc_html( $args['after_widget'] );
    138138    }
    139139
     
    152152
    153153        <p>
    154             <label for="<?php echo $this->get_field_id( 'catalogue_id' ); ?>"><?php _e( 'Catalog ID:', 'ultimate-product-catalogue' ); ?></label>
    155             <input class="widefat" id="<?php echo $this->get_field_id( 'catalogue_id' ); ?>" name="<?php echo $this->get_field_name( 'catalogue_id' ); ?>" type="text" value="<?php echo esc_attr( $catalogue_id ); ?>">
    156         </p>
    157         <p>
    158             <label for="<?php echo $this->get_field_id( 'product_count' ); ?>"><?php _e( 'Number of products to display:', 'ultimate-product-catalogue' ); ?></label>
    159             <input class="widefat" id="<?php echo $this->get_field_id( 'product_count' ); ?>" name="<?php echo $this->get_field_name( 'product_count' ); ?>" type="text" value="<?php echo esc_attr( $product_count ); ?>">
    160         </p>
    161         <p>
    162             <label for="<?php echo $this->get_field_id( 'catalogue_url' ); ?>"><?php _e( 'The URL of your catalog:', 'ultimate-product-catalogue' ); ?></label>
    163             <input class="widefat" id="<?php echo $this->get_field_id( 'catalogue_url' ); ?>" name="<?php echo $this->get_field_name( 'catalogue_url' ); ?>" type="text" value="<?php echo esc_attr( $catalogue_url ); ?>">
     154            <label for="<?php echo esc_attr( $this->get_field_id( 'catalogue_id' ) ); ?>"><?php _e( 'Catalog ID:', 'ultimate-product-catalogue' ); ?></label>
     155            <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'catalogue_id' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'catalogue_id' ) ); ?>" type="text" value="<?php echo esc_attr( $catalogue_id ); ?>">
     156        </p>
     157        <p>
     158            <label for="<?php echo esc_attr( $this->get_field_id( 'product_count' ) ); ?>"><?php _e( 'Number of products to display:', 'ultimate-product-catalogue' ); ?></label>
     159            <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'product_count' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'product_count' ) ); ?>" type="text" value="<?php echo esc_attr( $product_count ); ?>">
     160        </p>
     161        <p>
     162            <label for="<?php echo esc_attr( $this->get_field_id( 'catalogue_url' ) ); ?>"><?php _e( 'The URL of your catalog:', 'ultimate-product-catalogue' ); ?></label>
     163            <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'catalogue_url' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'catalogue_url' ) ); ?>" type="text" value="<?php echo esc_attr( $catalogue_url ); ?>">
    164164        </p>
    165165
     
    206206    public function widget( $args, $instance ) {
    207207
    208         echo $args['before_widget'];
    209         echo do_shortcode( "[insert-products catalogue_id='". $instance['catalogue_id'] . "' catalogue_search='recent' product_count='". $instance['product_count'] . "' catalogue_url='". $instance['catalogue_url'] . "']" );
    210         echo $args['after_widget'];
     208        echo esc_html( $args['before_widget'] );
     209        echo do_shortcode( "[insert-products catalogue_id='". sanitize_text_field( $instance['catalogue_id'] ) . "' catalogue_search='recent' product_count='". sanitize_text_field( $instance['product_count'] ) . "' catalogue_url='". sanitize_text_field( $instance['catalogue_url'] ) . "']" );
     210        echo esc_html( $args['after_widget'] );
    211211    }
    212212
     
    225225
    226226        <p>
    227             <label for="<?php echo $this->get_field_id( 'catalogue_id' ); ?>"><?php _e( 'Catalog ID:', 'ultimate-product-catalogue' ); ?></label>
    228             <input class="widefat" id="<?php echo $this->get_field_id( 'catalogue_id' ); ?>" name="<?php echo $this->get_field_name( 'catalogue_id' ); ?>" type="text" value="<?php echo esc_attr( $catalogue_id ); ?>">
    229         </p>
    230         <p>
    231             <label for="<?php echo $this->get_field_id( 'product_count' ); ?>"><?php _e( 'Number of products to display:', 'ultimate-product-catalogue' ); ?></label>
    232             <input class="widefat" id="<?php echo $this->get_field_id( 'product_count' ); ?>" name="<?php echo $this->get_field_name( 'product_count' ); ?>" type="text" value="<?php echo esc_attr( $product_count ); ?>">
    233         </p>
    234         <p>
    235             <label for="<?php echo $this->get_field_id( 'catalogue_url' ); ?>"><?php _e( 'The URL of your catalog:', 'ultimate-product-catalogue' ); ?></label>
    236             <input class="widefat" id="<?php echo $this->get_field_id( 'catalogue_url' ); ?>" name="<?php echo $this->get_field_name( 'catalogue_url' ); ?>" type="text" value="<?php echo esc_attr( $catalogue_url ); ?>">
     227            <label for="<?php echo esc_attr( $this->get_field_id( 'catalogue_id' ) ); ?>"><?php _e( 'Catalog ID:', 'ultimate-product-catalogue' ); ?></label>
     228            <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'catalogue_id' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'catalogue_id' ) ); ?>" type="text" value="<?php echo esc_attr( $catalogue_id ); ?>">
     229        </p>
     230        <p>
     231            <label for="<?php echo esc_attr( $this->get_field_id( 'product_count' ) ); ?>"><?php _e( 'Number of products to display:', 'ultimate-product-catalogue' ); ?></label>
     232            <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'product_count' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'product_count' ) ); ?>" type="text" value="<?php echo esc_attr( $product_count ); ?>">
     233        </p>
     234        <p>
     235            <label for="<?php echo esc_attr( $this->get_field_id( 'catalogue_url' ) ); ?>"><?php _e( 'The URL of your catalog:', 'ultimate-product-catalogue' ); ?></label>
     236            <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'catalogue_url' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'catalogue_url' ) ); ?>" type="text" value="<?php echo esc_attr( $catalogue_url ); ?>">
    237237        </p>
    238238
     
    279279    public function widget( $args, $instance ) {
    280280
    281         echo $args['before_widget'];
    282         echo do_shortcode( "[insert-products catalogue_id='". $instance['catalogue_id'] . "' catalogue_search='popular' product_count='". $instance['product_count'] . "' catalogue_url='". $instance['catalogue_url'] . "']" );
    283         echo $args['after_widget'];
     281        echo esc_html( $args['before_widget'] );
     282        echo do_shortcode( "[insert-products catalogue_id='". sanitize_text_field( $instance['catalogue_id'] ) . "' catalogue_search='popular' product_count='". sanitize_text_field( $instance['product_count'] ) . "' catalogue_url='". sanitize_text_field( $instance['catalogue_url'] ) . "']" );
     283        echo esc_html( $args['after_widget'] );
    284284    }
    285285
     
    298298
    299299        <p>
    300             <label for="<?php echo $this->get_field_id( 'catalogue_id' ); ?>"><?php _e( 'Catalog ID:', 'ultimate-product-catalogue' ); ?></label>
    301             <input class="widefat" id="<?php echo $this->get_field_id( 'catalogue_id' ); ?>" name="<?php echo $this->get_field_name( 'catalogue_id' ); ?>" type="text" value="<?php echo esc_attr( $catalogue_id ); ?>">
    302         </p>
    303         <p>
    304             <label for="<?php echo $this->get_field_id( 'product_count' ); ?>"><?php _e( 'Number of products to display:', 'ultimate-product-catalogue' ); ?></label>
    305             <input class="widefat" id="<?php echo $this->get_field_id( 'product_count' ); ?>" name="<?php echo $this->get_field_name( 'product_count' ); ?>" type="text" value="<?php echo esc_attr( $product_count ); ?>">
    306         </p>
    307         <p>
    308             <label for="<?php echo $this->get_field_id( 'catalogue_url' ); ?>"><?php _e( 'The URL of your catalog:', 'ultimate-product-catalogue' ); ?></label>
    309             <input class="widefat" id="<?php echo $this->get_field_id( 'catalogue_url' ); ?>" name="<?php echo $this->get_field_name( 'catalogue_url' ); ?>" type="text" value="<?php echo esc_attr( $catalogue_url ); ?>">
     300            <label for="<?php echo esc_attr( $this->get_field_id( 'catalogue_id' ) ); ?>"><?php _e( 'Catalog ID:', 'ultimate-product-catalogue' ); ?></label>
     301            <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'catalogue_id' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'catalogue_id' ) ); ?>" type="text" value="<?php echo esc_attr( $catalogue_id ); ?>">
     302        </p>
     303        <p>
     304            <label for="<?php echo esc_attr( $this->get_field_id( 'product_count' ) ); ?>"><?php _e( 'Number of products to display:', 'ultimate-product-catalogue' ); ?></label>
     305            <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'product_count' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'product_count' ) ); ?>" type="text" value="<?php echo esc_attr( $product_count ); ?>">
     306        </p>
     307        <p>
     308            <label for="<?php echo esc_attr( $this->get_field_id( 'catalogue_url' ) ); ?>"><?php _e( 'The URL of your catalog:', 'ultimate-product-catalogue' ); ?></label>
     309            <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'catalogue_url' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'catalogue_url' ) ); ?>" type="text" value="<?php echo esc_attr( $catalogue_url ); ?>">
    310310        </p>
    311311
     
    352352    public function widget( $args, $instance ) {
    353353
    354         echo $args['before_widget'];
     354        echo esc_html( $args['before_widget'] );
    355355        echo "<div class='ewd-upcp-product-search-widget-div'>";
    356         echo "<form method='post' action='" . add_query_arg( 'overview_mode', 'None', $instance['catalogue_url'] ) . "'>";
    357         echo "<div class='ewd-upcp-widget-search-label'>" . $instance['search_label'] . "</div>";
    358         echo "<div class='ewd-upcp-widget-search-input'><input type='text' name='prod_name' placeholder='" . $instance['search_placeholder'] . "'/></div>";
    359         echo "<input type='submit' class='ewd-upcp-widget-submit' name='upcp_widget_search_submit' value='" . $instance['search_label'] . "' />";
     356        echo "<form method='post' action='" . esc_attr( add_query_arg( 'overview_mode', 'None', $instance['catalogue_url'] ) ) . "'>";
     357        echo "<div class='ewd-upcp-widget-search-label'>" . sanitize_text_field( $instance['search_label'] ) . "</div>";
     358        echo "<div class='ewd-upcp-widget-search-input'><input type='text' name='prod_name' placeholder='" . esc_attr( $instance['search_placeholder'] ) . "'/></div>";
     359        echo "<input type='submit' class='ewd-upcp-widget-submit' name='upcp_widget_search_submit' value='" . esc_attr( $instance['search_label'] ) . "' />";
    360360        echo "</form>";
    361361        echo "</div>";
    362         echo $args['after_widget'];
     362        echo esc_html( $args['after_widget'] );
    363363    }
    364364
     
    377377
    378378        <p>
    379             <label for="<?php echo $this->get_field_id( 'search_label' ); ?>"><?php _e( 'Catalog ID:', 'ultimate-product-catalogue' ); ?></label>
    380             <input class="widefat" id="<?php echo $this->get_field_id( 'search_label' ); ?>" name="<?php echo $this->get_field_name( 'search_label' ); ?>" type="text" value="<?php echo esc_attr( $search_label ); ?>">
    381         </p>
    382         <p>
    383             <label for="<?php echo $this->get_field_id( 'search_placeholder' ); ?>"><?php _e( 'Number of products to display:', 'ultimate-product-catalogue' ); ?></label>
    384             <input class="widefat" id="<?php echo $this->get_field_id( 'search_placeholder' ); ?>" name="<?php echo $this->get_field_name( 'search_placeholder' ); ?>" type="text" value="<?php echo esc_attr( $search_placeholder ); ?>">
    385         </p>
    386         <p>
    387             <label for="<?php echo $this->get_field_id( 'catalogue_url' ); ?>"><?php _e( 'The URL of your catalog:', 'ultimate-product-catalogue' ); ?></label>
    388             <input class="widefat" id="<?php echo $this->get_field_id( 'catalogue_url' ); ?>" name="<?php echo $this->get_field_name( 'catalogue_url' ); ?>" type="text" value="<?php echo esc_attr( $catalogue_url ); ?>">
     379            <label for="<?php echo esc_attr( $this->get_field_id( 'search_label' ) ); ?>"><?php _e( 'Catalog ID:', 'ultimate-product-catalogue' ); ?></label>
     380            <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'search_label' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'search_label' ) ); ?>" type="text" value="<?php echo esc_attr( $search_label ); ?>">
     381        </p>
     382        <p>
     383            <label for="<?php echo esc_attr( $this->get_field_id( 'search_placeholder' ) ); ?>"><?php _e( 'Number of products to display:', 'ultimate-product-catalogue' ); ?></label>
     384            <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'search_placeholder' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'search_placeholder' ) ); ?>" type="text" value="<?php echo esc_attr( $search_placeholder ); ?>">
     385        </p>
     386        <p>
     387            <label for="<?php echo esc_attr( $this->get_field_id( 'catalogue_url' ) ); ?>"><?php _e( 'The URL of your catalog:', 'ultimate-product-catalogue' ); ?></label>
     388            <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'catalogue_url' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'catalogue_url' ) ); ?>" type="text" value="<?php echo esc_attr( $catalogue_url ); ?>">
    389389        </p>
    390390
  • ultimate-product-catalogue/tags/5.0.26/includes/template-functions.php

    r2638260 r2650578  
    180180
    181181    if ( count( $classes ) ) {
    182         return ' class="' . join( ' ', $classes ) . '"';
     182        return ' class="' . esc_attr( join( ' ', $classes ) ) . '"';
    183183    }
    184184}
  • ultimate-product-catalogue/tags/5.0.26/readme.txt

    r2638260 r2650578  
    55Requires at least: 4.0.0
    66Tested up to: 5.8
     7Stable tag: 5.0.26
    78License: GPLv3
    89License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    332333
    333334== Changelog ==
     335
     336= 5.0.26 (2021-12-29) =
     337- Updating nonce and authorization checks for AJAX calls.
     338- Updating sanitizing and escaping.
    334339
    335340= 5.0.25 (2021-12-01) =
  • ultimate-product-catalogue/tags/5.0.26/ultimate-product-catalogue.php

    r2638260 r2650578  
    88Terms and Conditions: https://www.etoilewebdesign.com/plugin-terms-and-conditions/
    99Text Domain: ultimate-product-catalogue
    10 Version: 5.0.25
     10Version: 5.0.26
    1111*/
    1212
     
    4848        define( 'EWD_UPCP_PLUGIN_FNAME', plugin_basename( __FILE__ ) );
    4949        define( 'EWD_UPCP_TEMPLATE_DIR', 'ewd-upcp-templates' );
    50         define( 'EWD_UPCP_VERSION', '5.0.23' );
     50        define( 'EWD_UPCP_VERSION', '5.0.26' );
    5151
    5252        define( 'EWD_UPCP_PRODUCT_POST_TYPE', 'upcp_product' );
     
    7272        require_once( EWD_UPCP_PLUGIN_DIR . '/includes/Dashboard.class.php' );
    7373        require_once( EWD_UPCP_PLUGIN_DIR . '/includes/DeactivationSurvey.class.php' );
     74        require_once( EWD_UPCP_PLUGIN_DIR . '/includes/Helper.class.php' );
    7475        require_once( EWD_UPCP_PLUGIN_DIR . '/includes/Export.class.php' );
    7576        require_once( EWD_UPCP_PLUGIN_DIR . '/includes/Import.class.php' );
     
    143144
    144145        add_action( 'admin_notices',                    array( $this, 'display_header_area' ) );
     146        add_action( 'admin_notices',                    array( $this, 'maybe_display_helper_notice' ) );
    145147
    146148        add_action( 'admin_enqueue_scripts',            array( $this, 'enqueue_admin_assets' ), 10, 1 );
     
    150152
    151153        add_filter( 'plugin_action_links',              array( $this, 'plugin_action_links' ), 10, 2);
     154
     155        add_action( 'wp_ajax_ewd_upcp_hide_helper_notice', array( $this, 'hide_helper_notice' ) );
    152156    }
    153157
     
    259263        global $post;
    260264
     265        wp_enqueue_script( 'ewd-upcp-helper-notice', EWD_UPCP_PLUGIN_URL . '/assets/js/ewd-upcp-helper-install-notice.js', array( 'jquery' ), EWD_UPCP_VERSION, true );
     266        wp_localize_script(
     267            'ewd-upcp-helper-notice',
     268            'ewd_upcp_helper_notice',
     269            array( 'nonce' => wp_create_nonce( 'ewd-upcp-helper-notice' ) )
     270        );
     271
     272        wp_enqueue_style( 'ewd-upcp-helper-notice', EWD_UPCP_PLUGIN_URL . '/assets/css/ewd-upcp-helper-install-notice.css', array(), EWD_UPCP_VERSION );
     273
    261274        $post_type = is_object( $post ) ?  $post->post_type : '';
    262275
    263276        $screen = get_current_screen();
    264277
    265         // Return if not one of the UASP post types, we're not on a post-type page, or we're not on the settings or widget pages
    266         if ( $hook != 'upcp_product_page_ewd-upcp-settings' and $hook != 'upcp_product_page_ewd-upcp-import' and $hook != 'upcp_product_page_ewd-upcp-export' and ( empty( $screen->post_type ) or $screen->post_type != 'upcp_product' ) and ( empty( $screen->post_type ) or $screen->post_type != 'upcp_catalog' ) and $screen->id != 'upcp_product_page_ewd-upcp-dashboard' and $screen->id != 'upcp_product_page_ewd-upcp-custom-fields' ) { return; }
    267 
    268         wp_enqueue_media();
     278        // Return if not one of the UASP post types, we're not on a post-type page, or we're not on the settings or widget pages
     279        $candidates = array(
     280            'upcp_product_page_ewd-upcp-dashboard',
     281
     282            'edit-upcp_product',
     283            'upcp_product',
     284
     285            'edit-upcp_catalog',
     286            'upcp_catalog',
     287
     288            'edit-upcp-product-category',
     289            'edit-upcp-product-tag',
     290            'upcp_product_page_ewd-upcp-export',
     291            'upcp_product_page_ewd-upcp-import',
     292            'upcp_product_page_ewd-upcp-custom-fields',
     293            'upcp_product_page_ewd-upcp-product-page',
     294            'upcp_product_page_ewd-upcp-settings'
     295        );
     296
     297        if ( ! in_array( $hook, $candidates )
     298            && ( empty( $screen->post_type ) or ! in_array ( $screen->post_type, $candidates ) )
     299            and ! in_array( $screen->id, $candidates )
     300        ) {
     301            return;
     302        }
     303
     304        wp_enqueue_media();
    269305
    270306        wp_enqueue_style( 'ewd-upcp-admin-css', EWD_UPCP_PLUGIN_URL . '/assets/css/ewd-upcp-admin.css', array(), EWD_UPCP_VERSION );
     
    279315
    280316        $args = array(
     317            'nonce' => wp_create_nonce( 'ewd-upcp-admin-js' ),
    281318            'product_add' => ( $this->permissions->check_permission( 'premium' ) or sizeof( $products ) < 100 ),
    282319        );
     
    301338        wp_register_script( 'ewd-upcp-gridster', EWD_UPCP_PLUGIN_URL . '/assets/js/jquery.gridster.js', array( 'jquery' ), EWD_UPCP_VERSION, true );
    302339        wp_register_script( 'ewd-upcp-js', EWD_UPCP_PLUGIN_URL . '/assets/js/ewd-upcp.js', array( 'jquery', 'jquery-ui-slider' ), EWD_UPCP_VERSION, true );
     340
     341        wp_localize_script(
     342            'ewd-upcp-js',
     343            'ewd_upcp_js',
     344            array(
     345                'nonce' => wp_create_nonce( 'ewd-upcp-js' )
     346            )
     347        );
    303348    }
    304349
     
    475520    }
    476521
     522    public function maybe_display_helper_notice() {
     523        global $ewd_upcp_controller;
     524
     525        if ( empty( $ewd_upcp_controller->permissions->check_permission( 'premium' ) ) ) { return; }
     526
     527        if ( is_plugin_active( 'ewd-premium-helper/ewd-premium-helper.php' ) ) { return; }
     528
     529        if ( get_transient( 'ewd-helper-notice-dismissed' ) ) { return; }
     530       
     531        ?>
     532
     533        <div class='notice notice-error is-dismissible ewd-upcp-helper-install-notice'>
     534           
     535            <div class='ewd-upcp-helper-install-notice-img'>
     536                <img src='<?php echo EWD_UPCP_PLUGIN_URL . '/lib/simple-admin-pages/img/options-asset-exclamation.png' ; ?>' />
     537            </div>
     538
     539            <div class='ewd-upcp-helper-install-notice-txt'>
     540                <?php _e( 'You\'re using the Ultimate Product Catalog premium version, but the premium helper plugin is not active.', 'ultimate-product-catalogue' ); ?>
     541                <br />
     542                <?php echo sprintf( __( 'Please re-activate the helper plugin, or <a target=\'_blank\' href=\'%s\'>download and install it</a> if the plugin is no longer installed to ensure continued access to the premium features of the plugin.', 'ultimate-product-catalogue' ), 'https://www.etoilewebdesign.com/2021/12/11/requiring-premium-helper-plugin/' ); ?>
     543            </div>
     544
     545            <div class='ewd-upcp-clear'></div>
     546
     547        </div>
     548
     549        <?php
     550    }
     551
     552    public function hide_helper_notice() {
     553        global $ewd_upcp_controller;
     554
     555        // Authenticate request
     556        if (
     557            ! check_ajax_referer( 'ewd-upcp-helper-notice', 'nonce' )
     558            ||
     559            ! current_user_can( $ewd_upcp_controller->settings->get_setting( 'access-role' ) )
     560        ) {
     561            ewdUpcpHelper::admin_nopriv_ajax();
     562        }
     563
     564        set_transient( 'ewd-helper-notice-dismissed', true, 3600*24*7 );
     565
     566        die();
     567    }
     568
    477569}
    478570} // endif;
  • ultimate-product-catalogue/tags/5.0.26/views/View.class.php

    r2638260 r2650578  
    158158        global $ewd_upcp_controller;
    159159
    160         echo '<style>';
    161             if ( $ewd_upcp_controller->settings->get_setting( 'styling-action-button-background-color' ) != '' ) { echo '.ewd-upcp-product-action-button { border-color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-action-button-background-color' ) . ' !important; color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-action-button-background-color' ) . ' !important; } .ewd-upcp-product-action-button:hover { background: ' . $ewd_upcp_controller->settings->get_setting( 'styling-action-button-background-color' ) . ' !important; }'; }
    162             if ( $ewd_upcp_controller->settings->get_setting( 'styling-action-button-text-color' ) != '' ) { echo '.ewd-upcp-product-action-button:hover { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-action-button-text-color' ) . ' !important; }'; }
    163             if ( $ewd_upcp_controller->settings->get_setting( 'styling-compare-button-background-color' ) != '' ) { echo '.ewd-upcp-product-comparison-button { background: ' . $ewd_upcp_controller->settings->get_setting( 'styling-compare-button-background-color' ) . ' !important; }'; }
    164             if ( $ewd_upcp_controller->settings->get_setting( 'styling-compare-button-text-color' ) != '' ) { echo '.ewd-upcp-product-comparison-button { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-compare-button-text-color' ) . ' !important; }'; }
    165             if ( $ewd_upcp_controller->settings->get_setting( 'styling-compare-button-clicked-background-color' ) != '' ) { echo '.ewd-upcp-product-comparison-button.ewd-upcp-comparison-clicked { background: ' . $ewd_upcp_controller->settings->get_setting( 'styling-compare-button-clicked-background-color' ) . ' !important; }'; }
    166             if ( $ewd_upcp_controller->settings->get_setting( 'styling-compare-button-clicked-text-color' ) != '' ) { echo '.ewd-upcp-product-comparison-button.ewd-upcp-comparison-clicked { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-compare-button-clicked-text-color' ) . ' !important; }'; }
    167             if ( $ewd_upcp_controller->settings->get_setting( 'styling-compare-button-font-size' ) != '' ) { echo '.ewd-upcp-product-comparison-button span { font-size: ' . $ewd_upcp_controller->settings->get_setting( 'styling-compare-button-font-size' ) . ' !important; }'; }
    168             if ( $ewd_upcp_controller->settings->get_setting( 'styling-sale-button-background-color' ) != '' ) { echo '.ewd-upcp-sale-price { background: ' . $ewd_upcp_controller->settings->get_setting( 'styling-sale-button-background-color' ) . ' !important; }'; }
    169             if ( $ewd_upcp_controller->settings->get_setting( 'styling-sale-button-text-color' ) != '' ) { echo '.ewd-upcp-sale-price { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-sale-button-text-color' ) . ' !important; }'; }
    170             if ( $ewd_upcp_controller->settings->get_setting( 'styling-sale-button-font-size' ) != '' ) { echo '.ewd-upcp-sale-price span { font-size: ' . $ewd_upcp_controller->settings->get_setting( 'styling-compare-button-font-size' ) . ' !important; }'; }
    171             if ( $ewd_upcp_controller->settings->get_setting( 'styling-product-comparison-title-font-color' ) != '' ) { echo '.ewd-upcp-product-comparison-product a { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-product-comparison-title-font-color' ) . ' !important; }'; }
    172             if ( $ewd_upcp_controller->settings->get_setting( 'styling-product-comparison-title-font-size' ) != '' ) { echo '.ewd-upcp-product-comparison-product a { font-size: ' . $ewd_upcp_controller->settings->get_setting( 'styling-product-comparison-title-font-size' ) . ' !important; }'; }
    173             if ( $ewd_upcp_controller->settings->get_setting( 'styling-product-comparison-price-font-size' ) != '' ) { echo '.ewd-upcp-product-comparison-price { font-size: ' . $ewd_upcp_controller->settings->get_setting( 'styling-product-comparison-price-font-size' ) . ' !important; }'; }
    174             if ( $ewd_upcp_controller->settings->get_setting( 'styling-product-comparison-price-font-color' ) != '' ) { echo '.ewd-upcp-product-comparison-price { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-product-comparison-price-font-color' ) . ' !important; }'; }
    175             if ( $ewd_upcp_controller->settings->get_setting( 'styling-product-comparison-price-background-color' ) != '' ) { echo '.ewd-upcp-product-comparison-price { background: ' . $ewd_upcp_controller->settings->get_setting( 'styling-product-comparison-price-background-color' ) . ' !important; }'; }
    176 
    177             if ( $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-image-border-color' ) != '' ) { echo '.ewd-upcp-catalog-product-thumbnail-image-div { border: 5px solid ' . $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-image-border-color' ) . ' !important; }'; }
    178             if ( $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-box-min-height' ) != '' ) { echo '.ewd-upcp-catalog-product-thumbnail { min-height: ' . $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-box-min-height' ) . 'px !important; }'; }
    179             if ( $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-box-max-height' ) != '' ) { echo '.ewd-upcp-catalog-product-thumbnail { max-height: ' . $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-box-max-height' ) . 'px !important; }'; }
    180             if ( $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-box-padding' ) != '' ) { echo '.ewd-upcp-catalog-main-block .ewd-upcp-catalog-product-thumbnail { padding: ' . $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-box-padding' ) . 'px !important; }'; }
    181             if ( $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-border-color' ) != '' ) { echo '.ewd-upcp-catalog-main-block .ewd-upcp-catalog-product-thumbnail, .ewd-upcp-catalog-main-block .ewd-upcp-catalog-product-thumbnail .ewd-upcp-product-action-button { border-color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-border-color' ) . ' !important; }'; }
    182             if ( $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-title-font' ) != '' ) { echo '.ewd-upcp-catalog-product-thumbnail-body-div a { font-family: ' . $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-title-font' ) . ' !important; }'; }
    183             if ( $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-title-font-size' ) != '' ) { echo '.ewd-upcp-catalog-product-thumbnail-body-div a { font-size: ' . $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-title-font-size' ) . ' !important; }'; }
    184             if ( $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-title-font-color' ) != '' ) { echo '.ewd-upcp-catalog-product-thumbnail-body-div a { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-title-font-color' ) . ' !important; }'; }
    185             if ( $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-price-font' ) != '' ) { echo '.ewd-upcp-catalog-product-thumbnail .ewd-upcp-catalog-product-price { font-family: ' . $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-price-font' ) . ' !important; }'; }
    186             if ( $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-price-font-size' ) != '' ) { echo '.ewd-upcp-catalog-product-thumbnail .ewd-upcp-catalog-product-price { font-size: ' . $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-price-font-size' ) . ' !important; }'; }
    187             if ( $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-price-font-color' ) != '' ) { echo '.ewd-upcp-catalog-product-thumbnail .ewd-upcp-catalog-product-price { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-price-font-color' ) . ' !important; }'; }
    188             if ( $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-background-color' ) != '' ) { echo '.ewd-upcp-catalog-product-thumbnail { background: ' . $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-background-color' ) . ' !important; }'; }
    189 
    190             if ( $ewd_upcp_controller->settings->get_setting( 'styling-list-view-image-border-color' ) != '' ) { echo '.ewd-upcp-catalog-product-list-image-div { border: 5px solid ' . $ewd_upcp_controller->settings->get_setting( 'styling-list-view-image-border-color' ) . ' !important; }'; }
    191             if ( $ewd_upcp_controller->settings->get_setting( 'styling-list-view-box-border-color' ) != '' ) { echo '.ewd-upcp-catalog-product-list-content { border: 5px solid ' . $ewd_upcp_controller->settings->get_setting( 'styling-list-view-box-border-color' ) . ' !important; }'; }
    192             if ( $ewd_upcp_controller->settings->get_setting( 'styling-list-view-box-padding' ) != '' ) { echo '.ewd-upcp-catalog-product-list-content { padding: ' . $ewd_upcp_controller->settings->get_setting( 'styling-list-view-box-padding' ) . 'px !important; }'; }
    193             if ( $ewd_upcp_controller->settings->get_setting( 'styling-list-view-box-margin-top' ) != '' ) { echo '.ewd-upcp-catalog-product-list-content { margin-top: ' . $ewd_upcp_controller->settings->get_setting( 'styling-list-view-box-margin-top' ) . 'px !important; }'; }
    194             if ( $ewd_upcp_controller->settings->get_setting( 'styling-list-view-title-font' ) != '' ) { echo '.ewd-upcp-catalog-product-list a.ewd-upcp-product-title { font-family: ' . $ewd_upcp_controller->settings->get_setting( 'styling-list-view-title-font' ) . ' !important; }'; }
    195             if ( $ewd_upcp_controller->settings->get_setting( 'styling-list-view-title-font-size' ) != '' ) { echo '.ewd-upcp-catalog-product-list a.ewd-upcp-product-title { font-size: ' . $ewd_upcp_controller->settings->get_setting( 'styling-list-view-title-font-size' ) . ' !important; }'; }
    196             if ( $ewd_upcp_controller->settings->get_setting( 'styling-list-view-title-font-color' ) != '' ) { echo '.ewd-upcp-catalog-product-list a.ewd-upcp-product-title { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-list-view-title-font-color' ) . ' !important; }'; }
    197             if ( $ewd_upcp_controller->settings->get_setting( 'styling-list-view-price-font' ) != '' ) { echo '.ewd-upcp-catalog-product-list .ewd-upcp-catalog-product-price { font-family: ' . $ewd_upcp_controller->settings->get_setting( 'styling-list-view-price-font' ) . ' !important; }'; }
    198             if ( $ewd_upcp_controller->settings->get_setting( 'styling-list-view-price-font-size' ) != '' ) { echo '.ewd-upcp-catalog-product-list .ewd-upcp-catalog-product-price { font-size: ' . $ewd_upcp_controller->settings->get_setting( 'styling-list-view-price-font-size' ) . ' !important; }'; }
    199             if ( $ewd_upcp_controller->settings->get_setting( 'styling-list-view-price-font-color' ) != '' ) { echo '.ewd-upcp-catalog-product-list .ewd-upcp-catalog-product-price { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-list-view-price-font-color' ) . ' !important; }'; }
    200 
    201             if ( $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-image-border-color' ) != '' ) { echo '.ewd-upcp-catalog-product-detail-image-div img { border: 5px solid ' . $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-image-border-color' ) . ' !important; }'; }
    202             if ( $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-box-padding' ) != '' ) { echo '.ewd-upcp-catalog-main-block .ewd-upcp-catalog-product-detail { padding: ' . $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-box-padding' ) . 'px !important; }'; }
    203             if ( $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-box-margin' ) != '' ) { echo '.ewd-upcp-catalog-product-detail { margin-top: ' . $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-box-margin' ) . 'px !important; }'; }
    204             if ( $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-box-background-color' ) != '' ) { echo '.ewd-upcp-catalog-product-detail { background: ' . $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-box-background-color' ) . ' !important; }'; }
    205             if ( $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-border-color' ) != '' ) { echo '.ewd-upcp-catalog-main-block .ewd-upcp-catalog-product-detail, .ewd-upcp-catalog-main-block .ewd-upcp-catalog-product-detail-mid-div, .ewd-upcp-catalog-main-block .ewd-upcp-catalog-product-detail .ewd-upcp-product-action-button { border-color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-border-color' ) . ' !important; }'; }
    206             if ( $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-title-font' ) != '' ) { echo '.ewd-upcp-catalog-product-detail-mid-div a.ewd-upcp-product-title { font-family: ' . $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-title-font' ) . ' !important; }'; }
    207             if ( $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-title-font-size' ) != '' ) { echo '.ewd-upcp-catalog-product-detail-mid-div a.ewd-upcp-product-title { font-size: ' . $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-title-font-size' ) . ' !important; }'; }
    208             if ( $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-title-font-color' ) != '' ) { echo '.ewd-upcp-catalog-product-detail-mid-div a.ewd-upcp-product-title { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-title-font-color' ) . ' !important; }'; }
    209             if ( $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-price-font' ) != '' ) { echo '.ewd-upcp-catalog-product-detail-end-div .ewd-upcp-catalog-product-price { font-family: ' . $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-price-font' ) . ' !important; }'; }
    210             if ( $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-price-font-size' ) != '' ) { echo '.ewd-upcp-catalog-product-detail-end-div .ewd-upcp-catalog-product-price { font-size: ' . $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-price-font-size' ) . ' !important; }'; }
    211             if ( $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-price-font-color' ) != '' ) { echo '.ewd-upcp-catalog-product-detail-end-div .ewd-upcp-catalog-product-price { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-price-font-color' ) . ' !important; }'; }
    212 
    213             if ( $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-title-hover' ) == 'underline' ) { echo '.ewd-upcp-catalog-sidebar-sort > span:hover, .ewd-upcp-catalog-sidebar-search > span:hover, .ewd-upcp-catalog-sidebar-price-filter > span:hover, .ewd-upcp-catalog-sidebar-title:hover { text-decoration: underline !important; }'; }
    214             if ( $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-header-font' ) != '' ) { echo '.ewd-upcp-catalog-sidebar-sort > span, .ewd-upcp-catalog-sidebar-search > span, .ewd-upcp-catalog-sidebar-price-filter > span, .ewd-upcp-catalog-sidebar-title { font-family: ' . $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-header-font' ) . ' !important; }'; }
    215             if ( $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-header-font-size' ) != '' ) { echo '.ewd-upcp-catalog-sidebar-sort > span, .ewd-upcp-catalog-sidebar-search > span, .ewd-upcp-catalog-sidebar-price-filter > span, .ewd-upcp-catalog-sidebar-title { font-size: ' . $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-header-font-size' ) . ' !important; }'; }
    216             if ( $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-header-font-color' ) != '' ) { echo '.ewd-upcp-catalog-sidebar-sort > span, .ewd-upcp-catalog-sidebar-search > span, .ewd-upcp-catalog-sidebar-price-filter > span, .ewd-upcp-catalog-sidebar-title { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-header-font-color' ) . ' !important; }'; }
    217             if ( $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-header-font-weight' ) != '' ) { echo '.ewd-upcp-catalog-sidebar-sort > span, .ewd-upcp-catalog-sidebar-search > span, .ewd-upcp-catalog-sidebar-price-filter > span, .ewd-upcp-catalog-sidebar-title { font-weight: ' . $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-header-font-weight' ) . ' !important; }'; }
    218             if ( $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-checkbox-font' ) != '' ) { echo '.ewd-upcp-catalog-sidebar-content label { font-family: ' . $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-checkbox-font' ) . ' !important; }'; }
    219             if ( $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-checkbox-font-size' ) != '' ) { echo '.ewd-upcp-catalog-sidebar-content label { font-size: ' . $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-checkbox-font-size' ) . ' !important; }'; }
    220             if ( $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-checkbox-font-color' ) != '' ) { echo '.ewd-upcp-catalog-sidebar-content label { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-checkbox-font-color' ) . ' !important; }'; }
    221             if ( $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-checkbox-font-weight' ) != '' ) { echo '.ewd-upcp-catalog-sidebar-content label { font-weight: ' . $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-checkbox-font-weight' ) . ' !important; }'; }
    222 
    223             if ( $ewd_upcp_controller->settings->get_setting( 'styling-breadcrumbs-font' ) != '' ) { echo '.ewd-upcp-single-product-breadcrumb-link a { font-family: ' . $ewd_upcp_controller->settings->get_setting( 'styling-breadcrumbs-font' ) . ' !important; }'; }
    224             if ( $ewd_upcp_controller->settings->get_setting( 'styling-breadcrumbs-font-size' ) != '' ) { echo '.ewd-upcp-single-product-breadcrumb-link a { font-size: ' . $ewd_upcp_controller->settings->get_setting( 'styling-breadcrumbs-font-size' ) . ' !important; }'; }
    225             if ( $ewd_upcp_controller->settings->get_setting( 'styling-breadcrumbs-font-color' ) != '' ) { echo '.ewd-upcp-single-product-breadcrumb-link a { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-breadcrumbs-font-color' ) . ' !important; }'; }
    226             if ( $ewd_upcp_controller->settings->get_setting( 'styling-breadcrumbs-font-hover-color' ) != '' ) { echo '.ewd-upcp-single-product-breadcrumb-link a:hover { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-breadcrumbs-font-hover-color' ) . ' !important; }'; }
    227 
    228             if ( $ewd_upcp_controller->settings->get_setting( 'styling-pagination-background-color' ) != '' ) { echo '.ewd-upcp-pagination .pagination-links a { background: ' . $ewd_upcp_controller->settings->get_setting( 'styling-pagination-background-color' ) . ' !important; }'; }
    229             if ( $ewd_upcp_controller->settings->get_setting( 'styling-pagination-text-color' ) != '' ) { echo '.ewd-upcp-pagination .pagination-links a { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-pagination-text-color' ) . ' !important; }'; }
    230             if ( $ewd_upcp_controller->settings->get_setting( 'styling-pagination-background-color-hover' ) != '' ) { echo '.ewd-upcp-pagination .pagination-links a:hover { background: ' . $ewd_upcp_controller->settings->get_setting( 'styling-pagination-background-color-hover' ) . ' !important; }'; }
    231             if ( $ewd_upcp_controller->settings->get_setting( 'styling-pagination-text-color-hover' ) != '' ) { echo '.ewd-upcp-pagination .pagination-links a:hover { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-pagination-text-color-hover' ) . ' !important; }'; }
    232 
    233         echo  '</style>';
     160        $css = '';
     161        if ( $ewd_upcp_controller->settings->get_setting( 'styling-action-button-background-color' ) != '' ) { $css .= '.ewd-upcp-product-action-button { border-color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-action-button-background-color' ) . ' !important; color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-action-button-background-color' ) . ' !important; } .ewd-upcp-product-action-button:hover { background: ' . $ewd_upcp_controller->settings->get_setting( 'styling-action-button-background-color' ) . ' !important; }'; }
     162        if ( $ewd_upcp_controller->settings->get_setting( 'styling-action-button-text-color' ) != '' ) { $css .=  '.ewd-upcp-product-action-button:hover { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-action-button-text-color' ) . ' !important; }'; }
     163        if ( $ewd_upcp_controller->settings->get_setting( 'styling-compare-button-background-color' ) != '' ) { $css .=  '.ewd-upcp-product-comparison-button { background: ' . $ewd_upcp_controller->settings->get_setting( 'styling-compare-button-background-color' ) . ' !important; }'; }
     164        if ( $ewd_upcp_controller->settings->get_setting( 'styling-compare-button-text-color' ) != '' ) { $css .=  '.ewd-upcp-product-comparison-button { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-compare-button-text-color' ) . ' !important; }'; }
     165        if ( $ewd_upcp_controller->settings->get_setting( 'styling-compare-button-clicked-background-color' ) != '' ) { $css .=  '.ewd-upcp-product-comparison-button.ewd-upcp-comparison-clicked { background: ' . $ewd_upcp_controller->settings->get_setting( 'styling-compare-button-clicked-background-color' ) . ' !important; }'; }
     166        if ( $ewd_upcp_controller->settings->get_setting( 'styling-compare-button-clicked-text-color' ) != '' ) { $css .=  '.ewd-upcp-product-comparison-button.ewd-upcp-comparison-clicked { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-compare-button-clicked-text-color' ) . ' !important; }'; }
     167        if ( $ewd_upcp_controller->settings->get_setting( 'styling-compare-button-font-size' ) != '' ) { $css .=  '.ewd-upcp-product-comparison-button span { font-size: ' . $ewd_upcp_controller->settings->get_setting( 'styling-compare-button-font-size' ) . ' !important; }'; }
     168        if ( $ewd_upcp_controller->settings->get_setting( 'styling-sale-button-background-color' ) != '' ) { $css .=  '.ewd-upcp-sale-price { background: ' . $ewd_upcp_controller->settings->get_setting( 'styling-sale-button-background-color' ) . ' !important; }'; }
     169        if ( $ewd_upcp_controller->settings->get_setting( 'styling-sale-button-text-color' ) != '' ) { $css .=  '.ewd-upcp-sale-price { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-sale-button-text-color' ) . ' !important; }'; }
     170        if ( $ewd_upcp_controller->settings->get_setting( 'styling-sale-button-font-size' ) != '' ) { $css .=  '.ewd-upcp-sale-price span { font-size: ' . $ewd_upcp_controller->settings->get_setting( 'styling-compare-button-font-size' ) . ' !important; }'; }
     171        if ( $ewd_upcp_controller->settings->get_setting( 'styling-product-comparison-title-font-color' ) != '' ) { $css .=  '.ewd-upcp-product-comparison-product a { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-product-comparison-title-font-color' ) . ' !important; }'; }
     172        if ( $ewd_upcp_controller->settings->get_setting( 'styling-product-comparison-title-font-size' ) != '' ) { $css .=  '.ewd-upcp-product-comparison-product a { font-size: ' . $ewd_upcp_controller->settings->get_setting( 'styling-product-comparison-title-font-size' ) . ' !important; }'; }
     173        if ( $ewd_upcp_controller->settings->get_setting( 'styling-product-comparison-price-font-size' ) != '' ) { $css .=  '.ewd-upcp-product-comparison-price { font-size: ' . $ewd_upcp_controller->settings->get_setting( 'styling-product-comparison-price-font-size' ) . ' !important; }'; }
     174        if ( $ewd_upcp_controller->settings->get_setting( 'styling-product-comparison-price-font-color' ) != '' ) { $css .=  '.ewd-upcp-product-comparison-price { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-product-comparison-price-font-color' ) . ' !important; }'; }
     175        if ( $ewd_upcp_controller->settings->get_setting( 'styling-product-comparison-price-background-color' ) != '' ) { $css .=  '.ewd-upcp-product-comparison-price { background: ' . $ewd_upcp_controller->settings->get_setting( 'styling-product-comparison-price-background-color' ) . ' !important; }'; }
     176
     177        if ( $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-image-border-color' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-thumbnail-image-div { border: 5px solid ' . $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-image-border-color' ) . ' !important; }'; }
     178        if ( $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-box-min-height' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-thumbnail { min-height: ' . $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-box-min-height' ) . 'px !important; }'; }
     179        if ( $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-box-max-height' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-thumbnail { max-height: ' . $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-box-max-height' ) . 'px !important; }'; }
     180        if ( $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-box-padding' ) != '' ) { $css .=  '.ewd-upcp-catalog-main-block .ewd-upcp-catalog-product-thumbnail { padding: ' . $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-box-padding' ) . 'px !important; }'; }
     181        if ( $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-border-color' ) != '' ) { $css .=  '.ewd-upcp-catalog-main-block .ewd-upcp-catalog-product-thumbnail, .ewd-upcp-catalog-main-block .ewd-upcp-catalog-product-thumbnail .ewd-upcp-product-action-button { border-color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-border-color' ) . ' !important; }'; }
     182        if ( $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-title-font' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-thumbnail-body-div a { font-family: ' . $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-title-font' ) . ' !important; }'; }
     183        if ( $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-title-font-size' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-thumbnail-body-div a { font-size: ' . $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-title-font-size' ) . ' !important; }'; }
     184        if ( $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-title-font-color' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-thumbnail-body-div a { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-title-font-color' ) . ' !important; }'; }
     185        if ( $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-price-font' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-thumbnail .ewd-upcp-catalog-product-price { font-family: ' . $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-price-font' ) . ' !important; }'; }
     186        if ( $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-price-font-size' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-thumbnail .ewd-upcp-catalog-product-price { font-size: ' . $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-price-font-size' ) . ' !important; }'; }
     187        if ( $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-price-font-color' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-thumbnail .ewd-upcp-catalog-product-price { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-price-font-color' ) . ' !important; }'; }
     188        if ( $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-background-color' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-thumbnail { background: ' . $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-background-color' ) . ' !important; }'; }
     189
     190        if ( $ewd_upcp_controller->settings->get_setting( 'styling-list-view-image-border-color' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-list-image-div { border: 5px solid ' . $ewd_upcp_controller->settings->get_setting( 'styling-list-view-image-border-color' ) . ' !important; }'; }
     191        if ( $ewd_upcp_controller->settings->get_setting( 'styling-list-view-box-border-color' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-list-content { border: 5px solid ' . $ewd_upcp_controller->settings->get_setting( 'styling-list-view-box-border-color' ) . ' !important; }'; }
     192        if ( $ewd_upcp_controller->settings->get_setting( 'styling-list-view-box-padding' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-list-content { padding: ' . $ewd_upcp_controller->settings->get_setting( 'styling-list-view-box-padding' ) . 'px !important; }'; }
     193        if ( $ewd_upcp_controller->settings->get_setting( 'styling-list-view-box-margin-top' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-list-content { margin-top: ' . $ewd_upcp_controller->settings->get_setting( 'styling-list-view-box-margin-top' ) . 'px !important; }'; }
     194        if ( $ewd_upcp_controller->settings->get_setting( 'styling-list-view-title-font' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-list a.ewd-upcp-product-title { font-family: ' . $ewd_upcp_controller->settings->get_setting( 'styling-list-view-title-font' ) . ' !important; }'; }
     195        if ( $ewd_upcp_controller->settings->get_setting( 'styling-list-view-title-font-size' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-list a.ewd-upcp-product-title { font-size: ' . $ewd_upcp_controller->settings->get_setting( 'styling-list-view-title-font-size' ) . ' !important; }'; }
     196        if ( $ewd_upcp_controller->settings->get_setting( 'styling-list-view-title-font-color' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-list a.ewd-upcp-product-title { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-list-view-title-font-color' ) . ' !important; }'; }
     197        if ( $ewd_upcp_controller->settings->get_setting( 'styling-list-view-price-font' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-list .ewd-upcp-catalog-product-price { font-family: ' . $ewd_upcp_controller->settings->get_setting( 'styling-list-view-price-font' ) . ' !important; }'; }
     198        if ( $ewd_upcp_controller->settings->get_setting( 'styling-list-view-price-font-size' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-list .ewd-upcp-catalog-product-price { font-size: ' . $ewd_upcp_controller->settings->get_setting( 'styling-list-view-price-font-size' ) . ' !important; }'; }
     199        if ( $ewd_upcp_controller->settings->get_setting( 'styling-list-view-price-font-color' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-list .ewd-upcp-catalog-product-price { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-list-view-price-font-color' ) . ' !important; }'; }
     200
     201        if ( $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-image-border-color' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-detail-image-div img { border: 5px solid ' . $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-image-border-color' ) . ' !important; }'; }
     202        if ( $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-box-padding' ) != '' ) { $css .=  '.ewd-upcp-catalog-main-block .ewd-upcp-catalog-product-detail { padding: ' . $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-box-padding' ) . 'px !important; }'; }
     203        if ( $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-box-margin' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-detail { margin-top: ' . $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-box-margin' ) . 'px !important; }'; }
     204        if ( $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-box-background-color' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-detail { background: ' . $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-box-background-color' ) . ' !important; }'; }
     205        if ( $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-border-color' ) != '' ) { $css .=  '.ewd-upcp-catalog-main-block .ewd-upcp-catalog-product-detail, .ewd-upcp-catalog-main-block .ewd-upcp-catalog-product-detail-mid-div, .ewd-upcp-catalog-main-block .ewd-upcp-catalog-product-detail .ewd-upcp-product-action-button { border-color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-border-color' ) . ' !important; }'; }
     206        if ( $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-title-font' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-detail-mid-div a.ewd-upcp-product-title { font-family: ' . $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-title-font' ) . ' !important; }'; }
     207        if ( $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-title-font-size' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-detail-mid-div a.ewd-upcp-product-title { font-size: ' . $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-title-font-size' ) . ' !important; }'; }
     208        if ( $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-title-font-color' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-detail-mid-div a.ewd-upcp-product-title { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-title-font-color' ) . ' !important; }'; }
     209        if ( $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-price-font' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-detail-end-div .ewd-upcp-catalog-product-price { font-family: ' . $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-price-font' ) . ' !important; }'; }
     210        if ( $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-price-font-size' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-detail-end-div .ewd-upcp-catalog-product-price { font-size: ' . $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-price-font-size' ) . ' !important; }'; }
     211        if ( $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-price-font-color' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-detail-end-div .ewd-upcp-catalog-product-price { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-price-font-color' ) . ' !important; }'; }
     212
     213        if ( $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-title-hover' ) == 'underline' ) { $css .=  '.ewd-upcp-catalog-sidebar-sort > span:hover, .ewd-upcp-catalog-sidebar-search > span:hover, .ewd-upcp-catalog-sidebar-price-filter > span:hover, .ewd-upcp-catalog-sidebar-title:hover { text-decoration: underline !important; }'; }
     214        if ( $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-header-font' ) != '' ) { $css .=  '.ewd-upcp-catalog-sidebar-sort > span, .ewd-upcp-catalog-sidebar-search > span, .ewd-upcp-catalog-sidebar-price-filter > span, .ewd-upcp-catalog-sidebar-title { font-family: ' . $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-header-font' ) . ' !important; }'; }
     215        if ( $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-header-font-size' ) != '' ) { $css .=  '.ewd-upcp-catalog-sidebar-sort > span, .ewd-upcp-catalog-sidebar-search > span, .ewd-upcp-catalog-sidebar-price-filter > span, .ewd-upcp-catalog-sidebar-title { font-size: ' . $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-header-font-size' ) . ' !important; }'; }
     216        if ( $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-header-font-color' ) != '' ) { $css .=  '.ewd-upcp-catalog-sidebar-sort > span, .ewd-upcp-catalog-sidebar-search > span, .ewd-upcp-catalog-sidebar-price-filter > span, .ewd-upcp-catalog-sidebar-title { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-header-font-color' ) . ' !important; }'; }
     217        if ( $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-header-font-weight' ) != '' ) { $css .=  '.ewd-upcp-catalog-sidebar-sort > span, .ewd-upcp-catalog-sidebar-search > span, .ewd-upcp-catalog-sidebar-price-filter > span, .ewd-upcp-catalog-sidebar-title { font-weight: ' . $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-header-font-weight' ) . ' !important; }'; }
     218        if ( $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-checkbox-font' ) != '' ) { $css .=  '.ewd-upcp-catalog-sidebar-content label { font-family: ' . $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-checkbox-font' ) . ' !important; }'; }
     219        if ( $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-checkbox-font-size' ) != '' ) { $css .=  '.ewd-upcp-catalog-sidebar-content label { font-size: ' . $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-checkbox-font-size' ) . ' !important; }'; }
     220        if ( $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-checkbox-font-color' ) != '' ) { $css .=  '.ewd-upcp-catalog-sidebar-content label { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-checkbox-font-color' ) . ' !important; }'; }
     221        if ( $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-checkbox-font-weight' ) != '' ) { $css .=  '.ewd-upcp-catalog-sidebar-content label { font-weight: ' . $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-checkbox-font-weight' ) . ' !important; }'; }
     222
     223        if ( $ewd_upcp_controller->settings->get_setting( 'styling-breadcrumbs-font' ) != '' ) { $css .=  '.ewd-upcp-single-product-breadcrumb-link a { font-family: ' . $ewd_upcp_controller->settings->get_setting( 'styling-breadcrumbs-font' ) . ' !important; }'; }
     224        if ( $ewd_upcp_controller->settings->get_setting( 'styling-breadcrumbs-font-size' ) != '' ) { $css .=  '.ewd-upcp-single-product-breadcrumb-link a { font-size: ' . $ewd_upcp_controller->settings->get_setting( 'styling-breadcrumbs-font-size' ) . ' !important; }'; }
     225        if ( $ewd_upcp_controller->settings->get_setting( 'styling-breadcrumbs-font-color' ) != '' ) { $css .=  '.ewd-upcp-single-product-breadcrumb-link a { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-breadcrumbs-font-color' ) . ' !important; }'; }
     226        if ( $ewd_upcp_controller->settings->get_setting( 'styling-breadcrumbs-font-hover-color' ) != '' ) { $css .=  '.ewd-upcp-single-product-breadcrumb-link a:hover { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-breadcrumbs-font-hover-color' ) . ' !important; }'; }
     227
     228        if ( $ewd_upcp_controller->settings->get_setting( 'styling-pagination-background-color' ) != '' ) { $css .=  '.ewd-upcp-pagination .pagination-links a { background: ' . $ewd_upcp_controller->settings->get_setting( 'styling-pagination-background-color' ) . ' !important; }'; }
     229        if ( $ewd_upcp_controller->settings->get_setting( 'styling-pagination-text-color' ) != '' ) { $css .=  '.ewd-upcp-pagination .pagination-links a { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-pagination-text-color' ) . ' !important; }'; }
     230        if ( $ewd_upcp_controller->settings->get_setting( 'styling-pagination-background-color-hover' ) != '' ) { $css .=  '.ewd-upcp-pagination .pagination-links a:hover { background: ' . $ewd_upcp_controller->settings->get_setting( 'styling-pagination-background-color-hover' ) . ' !important; }'; }
     231        if ( $ewd_upcp_controller->settings->get_setting( 'styling-pagination-text-color-hover' ) != '' ) { $css .=  '.ewd-upcp-pagination .pagination-links a:hover { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-pagination-text-color-hover' ) . ' !important; }'; }
     232
     233        if( ! empty( $css ) ) {
     234            echo '<style>';
     235                echo wp_strip_all_tags( $css );
     236            echo '</style>';
     237        }
    234238    }
    235239
  • ultimate-product-catalogue/trunk/assets/js/dashboard-review-ask.js

    r2638260 r2650578  
    33
    44  jQuery(document).on( 'click', '.ewd-upcp-main-dashboard-review-ask .notice-dismiss', function( event ) {
    5     var data = 'ask_review_time=7&action=ewd_upcp_hide_review_ask';
    6     jQuery.post( ajaxurl, data, function() {} );
    7   });
     5        var params = {};
     6
     7        params.nonce  = ewd_upcp_review_ask.nonce;
     8        params.action = 'ewd_upcp_hide_review_ask';
     9        params.ask_review_time = 7;
     10
     11        var data = jQuery.param( params );
     12jQuery.post( ajaxurl, data, function() {} );
     13    });
    814
    915    jQuery( '.ewd-upcp-review-ask-yes' ).on( 'click', function() {
     
    1723        jQuery( '.ewd-upcp-review-ask-yes' ).addClass( 'ewd-upcp-hidden' );
    1824
    19         var data = 'ask_review_time=7&action=ewd_upcp_hide_review_ask';
    20         jQuery.post( ajaxurl, data, function() {} );
     25        var params = {};
     26
     27        params.nonce  = ewd_upcp_review_ask.nonce;
     28        params.action = 'ewd_upcp_hide_review_ask';
     29        params.ask_review_time = 7;
     30
     31        var data = jQuery.param( params );
     32        jQuery.post( ajaxurl, data, function() {} );
    2133    });
    2234
     
    2840        jQuery( '.ewd-upcp-review-ask-actions' ).addClass( 'ewd-upcp-hidden' );
    2941
    30         var data = 'ask_review_time=1000&action=ewd_upcp_hide_review_ask';
    31         jQuery.post( ajaxurl, data, function() {} );
     42        var params = {};
     43
     44        params.nonce  = ewd_upcp_review_ask.nonce;
     45        params.action = 'ewd_upcp_hide_review_ask';
     46        params.ask_review_time = 1000;
     47
     48        var data = jQuery.param( params );
     49        jQuery.post( ajaxurl, data, function() {} );
    3250    });
    3351
    3452    jQuery( '.ewd-upcp-review-ask-no-thanks' ).on( 'click', function() {
    35         var data = 'ask_review_time=1000&action=ewd_upcp_hide_review_ask';
    36         jQuery.post( ajaxurl, data, function() {} );
     53        var params = {};
    3754
    38         jQuery( '.ewd-upcp-main-dashboard-review-ask' ).css( 'display', 'none' );
     55        params.nonce  = ewd_upcp_review_ask.nonce;
     56        params.action = 'ewd_upcp_hide_review_ask';
     57        params.ask_review_time = 1000;
     58
     59        var data = jQuery.param( params );
     60        jQuery.post( ajaxurl, data, function() {} );
     61
     62        jQuery( '.ewd-upcp-main-dashboard-review-ask' ).css( 'display', 'none' );
    3963    });
    4064
     
    4367        jQuery( '.ewd-upcp-review-ask-thank-you-text' ).removeClass( 'ewd-upcp-hidden' );
    4468
    45         var data = 'ask_review_time=1000&action=ewd_upcp_hide_review_ask';
    46         jQuery.post( ajaxurl, data, function() {} );
     69        var params = {};
     70
     71        params.nonce  = ewd_upcp_review_ask.nonce;
     72        params.action = 'ewd_upcp_hide_review_ask';
     73        params.ask_review_time = 1000;
     74
     75        var data = jQuery.param( params );
     76        jQuery.post( ajaxurl, data, function() {} );
    4777    });
    4878
     
    5080        var feedback = jQuery( '.ewd-upcp-review-ask-feedback-explanation textarea' ).val();
    5181        var email_address = jQuery( '.ewd-upcp-review-ask-feedback-explanation input[name="feedback_email_address"]' ).val();
    52         var data = 'feedback=' + feedback + '&email_address=' + email_address + '&action=ewd_upcp_send_feedback';
    53         jQuery.post( ajaxurl, data, function() {} );
    5482
    55         var data = 'ask_review_time=1000&action=ewd_upcp_hide_review_ask';
    56         jQuery.post( ajaxurl, data, function() {} );
     83        var params = {};
    5784
    58         jQuery( '.ewd-upcp-review-ask-feedback-form' ).addClass( 'ewd-upcp-hidden' );
    59         jQuery( '.ewd-upcp-review-ask-review-text' ).addClass( 'ewd-upcp-hidden' );
    60         jQuery( '.ewd-upcp-review-ask-thank-you-text' ).removeClass( 'ewd-upcp-hidden' );
     85        params.nonce  = ewd_upcp_review_ask.nonce;
     86        params.action = 'ewd_upcp_send_feedback';
     87        params.feedback = feedback;
     88        params.email_address = email_address;
     89
     90        var data = jQuery.param( params );
     91        jQuery.post( ajaxurl, data, function() {} );
     92
     93        var params = {};
     94
     95        params.nonce  = ewd_upcp_review_ask.nonce;
     96        params.action = 'ewd_upcp_hide_review_ask';
     97        params.ask_review_time = 1000;
     98
     99        var data = jQuery.param( params );
     100        jQuery.post( ajaxurl, data, function() {} );
     101
     102        jQuery( '.ewd-upcp-review-ask-feedback-form' ).addClass( 'ewd-upcp-hidden' );
     103        jQuery( '.ewd-upcp-review-ask-review-text' ).addClass( 'ewd-upcp-hidden' );
     104        jQuery( '.ewd-upcp-review-ask-thank-you-text' ).removeClass( 'ewd-upcp-hidden' );
    61105    });
    62106});
  • ultimate-product-catalogue/trunk/assets/js/ewd-upcp-admin.js

    r2638260 r2650578  
    222222            update: function() {
    223223
    224                 var data = jQuery( 'table.wp-list-table tbody' ).sortable('serialize') + '&action=ewd_upcp_update_category_order';
     224                var params = {
     225                    nonce: ewd_upcp_php_admin_data.nonce,
     226                    action: 'ewd_upcp_update_category_order'
     227                };
     228
     229                var query_string = jQuery( 'table.wp-list-table tbody' ).sortable('serialize');
     230                var data = jQuery.param( params ) + '&' + query_string;
    225231                jQuery.post( ajaxurl, data, function( response ) {});
    226232            }
     
    234240            update: function() {
    235241
    236                 var data = jQuery( 'table.wp-list-table tbody' ).sortable('serialize') + '&action=ewd_upcp_update_tag_order';
     242                var params = {
     243                    nonce: ewd_upcp_php_admin_data.nonce,
     244                    action: 'ewd_upcp_update_tag_order'
     245                };
     246
     247                var query_string = jQuery( 'table.wp-list-table tbody' ).sortable('serialize');
     248                var data = jQuery.param( params ) + '&' + query_string;
    237249                jQuery.post( ajaxurl, data, function( response ) {});
    238250            }
     
    253265            update: function() {
    254266
    255                 var data = jQuery( 'table.wp-list-table tbody' ).sortable('serialize') + '&action=ewd_upcp_update_product_order';
     267                var params = {
     268                    nonce: ewd_upcp_php_admin_data.nonce,
     269                    action: 'ewd_upcp_update_product_order'
     270                };
     271
     272                var query_string = jQuery( 'table.wp-list-table tbody' ).sortable('serialize');
     273                var data = jQuery.param( params ) + '&' + query_string;
    256274                jQuery.post( ajaxurl, data, function( response ) {});
    257275            }
     
    620638        event.preventDefault();
    621639
    622         var serialized = gridster_mobile.serialize();
    623        
    624         var data = 'serialized_product_page=' + JSON.stringify( serialized ) + '&action=ewd_upcp_save_serialized_product_page&type=mobile';
     640        var params = {};
     641
     642        params.nonce  = ewd_upcp_php_admin_data.nonce;
     643        params.type   = 'mobile';
     644        params.action = 'ewd_upcp_save_serialized_product_page';
     645        params.serialized_product_page = JSON.stringify( gridster_mobile.serialize() );
     646
     647        var data = jQuery.param( params );
    625648        jQuery.post( ajaxurl, data, function( response ) {
    626                            
     649
    627650            jQuery( '.gridster-mobile-save' ).after( '<div class="ewd-upcp-gridster-response">Layout Saved!</div>' );
    628651
     
    677700        event.preventDefault();
    678701
    679         var serialized = gridster.serialize();
    680        
    681         var data = 'serialized_product_page=' + JSON.stringify( serialized ) + '&action=ewd_upcp_save_serialized_product_page&type=large';
     702        var params = {};
     703
     704        params.nonce  = ewd_upcp_php_admin_data.nonce;
     705        params.type   = 'large';
     706        params.action = 'ewd_upcp_save_serialized_product_page';
     707        params.serialized_product_page = JSON.stringify( gridster.serialize() );
     708
     709        var data = jQuery.param( params );
    682710        jQuery.post( ajaxurl, data, function( response ) {
    683                            
     711
    684712            jQuery( '.gridster-large-save' ).after( '<div class="ewd-upcp-gridster-response">Layout Saved!</div>' );
    685713
  • ultimate-product-catalogue/trunk/assets/js/ewd-upcp-welcome-screen.js

    r2638260 r2650578  
    2525        jQuery('.ewd-upcp-welcome-screen-add-category-description textarea').val('');
    2626
    27         var data = 'category_name=' + category_name + '&category_description=' + category_description + '&action=ewd_upcp_welcome_add_category';
     27        var params = {};
     28
     29        params.nonce  = ewd_upcp_getting_started.nonce;
     30        params.action = 'ewd_upcp_welcome_add_category';
     31        params.category_name = category_name;
     32        params.category_description = category_description;
     33
     34        var data = jQuery.param( params );
    2835        jQuery.post(ajaxurl, data, function(response) {
    2936            var HTML = '<tr class="upcp-welcome-screen-category">';
     
    5057        jQuery('.ewd-upcp-welcome-screen-add-catalog-page-name input').val('');
    5158
    52         var data = 'catalog_name=' + catalog_name + '&categories=' + JSON.stringify(categories) + '&action=ewd_upcp_welcome_add_catalog';
     59        var params = {};
     60
     61        params.nonce  = ewd_upcp_getting_started.nonce;
     62        params.action = 'ewd_upcp_welcome_add_catalog';
     63        params.catalog_name = catalog_name;
     64        params.categories   = JSON.stringify(categories);
     65        params.categories   = JSON.stringify(categories);
     66
     67        var data = jQuery.param( params );
    5368        jQuery.post(ajaxurl, data, function(response) {});
    5469
     
    6277        var product_search = jQuery.map( jQuery( 'input[name="product_search\\[\\]"]:checked' ), function( n, i ) { return n.value; } ).join( ',' );
    6378
    64         var data = 'currency_symbol=' + currency_symbol + '&color_scheme=' + color_scheme + '&product_links=' + product_links + '&product_search=' + product_search + '&action=ewd_upcp_welcome_set_options';
     79        var params = {};
     80
     81        params.nonce  = ewd_upcp_getting_started.nonce;
     82        params.action = 'ewd_upcp_welcome_set_options';
     83        params.currency_symbol = currency_symbol;
     84        params.color_scheme    = color_scheme;
     85        params.product_links   = product_links;
     86        params.product_search  = product_search;
     87
     88        var data = jQuery.param( params );
    6589        jQuery.post(ajaxurl, data, function(response) {
    6690            jQuery('.ewd-upcp-welcome-screen-save-options-button').after('<div class="ewd-upcp-save-message"><div class="ewd-upcp-save-message-inside">Options have been saved.</div></div>');
     
    85109        jQuery('.ewd-upcp-welcome-screen-add-product-price input').val('');
    86110
    87         var data = 'product_name=' + product_name + '&product_image=' + product_image + '&product_description=' + product_description + '&product_category=' + product_category + '&product_price=' + product_price + '&action=ewd_upcp_welcome_add_product';
     111        var params = {};
     112
     113        params.nonce  = ewd_upcp_getting_started.nonce;
     114        params.action = 'ewd_upcp_welcome_add_product';
     115        params.product_price = product_price;
     116        params.product_name  = product_name;
     117        params.product_image = product_image;
     118        params.product_description = product_description;
     119        params.product_category    = product_category;
     120
     121        var data = jQuery.param( params );
    88122        jQuery.post(ajaxurl, data, function(response) {
    89123            var HTML = '<tr class="upcp-welcome-screen-product">';
  • ultimate-product-catalogue/trunk/assets/js/ewd-upcp.js

    r2638260 r2650578  
    525525        jQuery( '.ewd-upcp-cart-item-count' ).html( +jQuery( '.ewd-upcp-cart-item-count' ).html() + 1 );
    526526
    527         var data = 'product_id=' + jQuery( this ).data( 'product_id' ) + '&action=ewd_upcp_add_to_cart';
     527        var params = {
     528            nonce: ewd_upcp_js.nonce,
     529            product_id: jQuery( this ).data( 'product_id' ),
     530            action: 'ewd_upcp_add_to_cart'
     531        };
     532
     533        var data = jQuery.param( params );
    528534        jQuery.post( ajaxurl, data, function( response ) {} );
    529535    });
     
    535541        jQuery( '.ewd-upcp-cart-item-count' ).html( '0' );
    536542
    537         var data = '&action=ewd_upcp_clear_cart';
    538         jQuery.post( ajaxurl, data, function( response ) {} );
     543        var params = {
     544            nonce: ewd_upcp_js.nonce,
     545            action: 'ewd_upcp_clear_cart'
     546        };
     547
     548        var data = jQuery.param( params );
     549        jQuery.post( ajaxurl, data, function( response ) {} );
    539550    });
    540551}
     
    867878    window.history.replaceState( null, null, url );
    868879
    869     var data = 'id=' + id + '&excluded_views=' + excluded_views + '&orderby=' + orderby + '&order=' + order + '&ajax_url=' + ajax_url + '&current_page=' + current_page + '&products_per_page=' + products_per_page + '&default_search_text=' + default_search_text + '&product_name=' + product_name + '&max_price=' + max_price + '&min_price=' + min_price + '&category=' + categories + '&subcategory=' + subcategories + '&tags=' + tags + '&custom_fields=' + encodeURIComponent( custom_fields ) + '&request_count=' + request_count + '&action=ewd_upcp_update_catalog';
     880    var params = {};
     881
     882    params.nonce = ewd_upcp_js.nonce;
     883    params.id = id;
     884    params.excluded_views = excluded_views;
     885    params.orderby = orderby;
     886    params.order = order;
     887    params.ajax_url = ajax_url;
     888    params.current_page = current_page;
     889    params.products_per_page = products_per_page;
     890    params.default_search_text = default_search_text;
     891    params.product_name = product_name;
     892    params.max_price = max_price;
     893    params.min_price = min_price;
     894    params.category = categories;
     895    params.subcategory = subcategories;
     896    params.tags = tags;
     897    params.custom_fields = custom_fields.join(',');
     898    params.request_count = request_count;
     899    params.action = 'ewd_upcp_update_catalog';
     900
     901    var data = jQuery.param( params );
    870902
    871903    return data;
  • ultimate-product-catalogue/trunk/ewd-upcp-templates/catalog-header-bar.php

    r2638260 r2650578  
    33    <?php foreach ( $this->get_catalog_views() as $catalog_view ) { ?>
    44
    5         <div class='ewd-upcp-toggle-icon ewd-upcp-toggle-icon-<?php echo $catalog_view; ?> ewd-upcp-toggle-icon-<?php echo $this->get_option( 'color-scheme' ); ?>'  data-view='<?php echo $catalog_view; ?>'></div>
     5        <div class='ewd-upcp-toggle-icon ewd-upcp-toggle-icon-<?php echo esc_attr( $catalog_view ); ?> ewd-upcp-toggle-icon-<?php echo esc_attr( $this->get_option( 'color-scheme' ) ); ?>' data-view='<?php echo esc_attr( $catalog_view ); ?>'></div>
    66
    77    <?php } ?>
  • ultimate-product-catalogue/trunk/ewd-upcp-templates/catalog-pagination.php

    r2638260 r2650578  
    1 <div class='ewd-upcp-pagination' data-max_pages='<?php echo $this->max_pages; ?>'>
     1<div class='ewd-upcp-pagination' data-max_pages='<?php echo esc_attr( $this->max_pages ); ?>'>
    22
    33    <span class='displaying-num'>
    44
    5         <span class='product-count'><?php echo $this->product_count; ?></span>
     5        <span class='product-count'><?php echo esc_html( $this->product_count ); ?></span>
    66
    77        <?php echo esc_html( $this->get_label( 'label-products-pagination' ) ); ?>
     
    1818            <?php echo esc_html( $this->get_label( 'label-page' ) ); ?>
    1919
    20             <span class='current-page'><?php echo $this->current_page; ?></span>
     20            <span class='current-page'><?php echo esc_html( $this->current_page ); ?></span>
    2121
    2222            <?php echo esc_html( $this->get_label( 'label-pagination-of' ) ); ?>
    2323
    24             <span class='total-pages'><?php echo $this->max_pages; ?></span>
     24            <span class='total-pages'><?php echo esc_html( $this->max_pages ); ?></span>
    2525
    2626        </span>
  • ultimate-product-catalogue/trunk/ewd-upcp-templates/catalog-product-content.php

    r2638260 r2650578  
    22
    33    <div class='ewd-upcp-catalog-product-description'>
    4         <?php echo $this->product->description; ?>
     4        <?php echo esc_html( $this->product->description ); ?>
    55    </div>
    66
  • ultimate-product-catalogue/trunk/ewd-upcp-templates/catalog-product-rating.php

    r2638260 r2650578  
    33<?php if ( empty( $average_rating ) ) { return; } ?>
    44
    5 <span class='ewd-upcp-urp-review-score' title='<?php _e( 'Average Rating: ', 'ultimate-product-catalogue' ); ?> <?php echo $average_rating; ?>'>
     5<span class='ewd-upcp-urp-review-score' title='<?php _e( 'Average Rating: ', 'ultimate-product-catalogue' ); ?> <?php echo esc_attr( $average_rating ); ?>'>
    66
    77    <?php for ( $i = 1; $i <= 5; $i++ ) { ?>
  • ultimate-product-catalogue/trunk/ewd-upcp-templates/catalog-shortcode-attributes.php

    r2638260 r2650578  
    1 <input type='hidden' name='catalog-id' value='<?php echo $this->catalog->ID; ?>' />
    2 <input type='hidden' name='catalog-excluded-views' value='<?php echo implode( ',', $this->excluded_views ); ?>' />
    3 <input type='hidden' name='catalog-current-page' value='<?php echo $this->current_page; ?>' />
    4 <input type='hidden' name='catalog-max-page' value='<?php echo $this->max_pages; ?>' />
    5 <input type='hidden' name='catalog-product-per-page' value='<?php echo $this->products_per_page; ?>' />
     1<input type='hidden' name='catalog-id' value='<?php echo esc_attr( $this->catalog->ID ); ?>' />
     2<input type='hidden' name='catalog-excluded-views' value='<?php echo esc_attr( implode( ',', $this->excluded_views ) ); ?>' />
     3<input type='hidden' name='catalog-current-page' value='<?php echo esc_attr( $this->current_page ); ?>' />
     4<input type='hidden' name='catalog-max-page' value='<?php echo esc_attr( $this->max_pages ); ?>' />
     5<input type='hidden' name='catalog-product-per-page' value='<?php echo esc_attr( $this->products_per_page ); ?>' />
    66<input type='hidden' name='catalog-default-search-text' value='<?php _e( 'Search...', 'ultimate-product-catalogue' ); ?>' />
    7 <input type='hidden' name='catalog-base-url' value='<?php echo $this->ajax_url; ?>' />
     7<input type='hidden' name='catalog-base-url' value='<?php echo esc_attr( $this->ajax_url ); ?>' />
  • ultimate-product-catalogue/trunk/ewd-upcp-templates/catalog-sidebar-custom-field-checkbox.php

    r2638260 r2650578  
    1 <div class='ewd-upcp-catalog-sidebar-custom-field-div' data-custom_field_id='<?php echo $this->custom_field->id; ?>'>
     1<div class='ewd-upcp-catalog-sidebar-custom-field-div' data-custom_field_id='<?php echo esc_attr( $this->custom_field->id ); ?>'>
    22
    33    <div class='ewd-upcp-catalog-sidebar-title <?php echo ( $this->get_option( 'styling-sidebar-title-collapse' ) ? 'ewd-upcp-catalog-sidebar-collapsible' : '' ); ?> <?php echo ( $this->get_option( 'styling-sidebar-start-collapsed' ) ? 'ewd-upcp-sidebar-content-hidden' : '' ); ?>'>
     
    77    <?php foreach ( $this->sidebar_custom_fields[ $this->custom_field->id ] as $field_value => $field_count ) { ?>
    88
    9         <div class='ewd-upcp-catalog-sidebar-custom-field <?php echo ( $this->is_custom_field_value_selected( $field_value ) ? 'ewd-upcp-taxonomy-selected' : '' ); ?>' data-custom_field_id='<?php echo $this->custom_field->id; ?>' data-value='<?php echo $field_value; ?>'>
     9        <div class='ewd-upcp-catalog-sidebar-custom-field <?php echo ( $this->is_custom_field_value_selected( $field_value ) ? 'ewd-upcp-taxonomy-selected' : '' ); ?>' data-custom_field_id='<?php echo esc_attr( $this->custom_field->id ); ?>' data-value='<?php echo esc_attr( $field_value ); ?>'>
    1010
    11             <input type='checkbox' name='<?php echo esc_attr( $this->custom_field->id ); ?>' id='<?php echo esc_attr( $this->custom_field->id ); ?>-<?php echo $field_value; ?>' value='<?php echo $field_value; ?>' <?php echo ( $this->is_custom_field_value_selected( $field_value ) ? 'checked' : '' ); ?> >
     11            <input type='checkbox' name='<?php echo esc_attr( $this->custom_field->id ); ?>' id='<?php echo esc_attr( $this->custom_field->id ); ?>-<?php echo esc_attr( $field_value ); ?>' value='<?php echo esc_attr( $field_value ); ?>' <?php echo ( $this->is_custom_field_value_selected( $field_value ) ? 'checked' : '' ); ?> >
    1212
    13             <label class='ewd-upcp-catalog-sidebar-custom-field-value-label' for='<?php echo esc_attr( $this->custom_field->id ); ?>-<?php echo $field_value; ?>'>
     13            <label class='ewd-upcp-catalog-sidebar-custom-field-value-label' for='<?php echo esc_attr( $this->custom_field->id ); ?>-<?php echo esc_attr( $field_value ); ?>'>
    1414
    15                 <span><?php echo $field_value; ?> <span class='ewd-upcp-catalog-sidebar-custom-field-count'> (<?php echo $field_count; ?>)</span></span>
     15                <span><?php echo esc_html( $field_value ); ?> <span class='ewd-upcp-catalog-sidebar-custom-field-count'> (<?php echo esc_html( $field_count ); ?>)</span></span>
    1616   
    1717            </label>
  • ultimate-product-catalogue/trunk/ewd-upcp-templates/catalog-sidebar-custom-field-dropdown.php

    r2638260 r2650578  
    1 <div class='ewd-upcp-catalog-sidebar-custom-field-div' data-custom_field_id='<?php echo $this->custom_field->id; ?>'>
     1<div class='ewd-upcp-catalog-sidebar-custom-field-div' data-custom_field_id='<?php echo esc_attr( $this->custom_field->id ); ?>'>
    22
    33    <div class='ewd-upcp-catalog-sidebar-title <?php echo ( $this->get_option( 'styling-sidebar-title-collapse' ) ? 'ewd-upcp-catalog-sidebar-collapsible' : '' ); ?> <?php echo ( $this->get_option( 'styling-sidebar-start-collapsed' ) ? 'ewd-upcp-sidebar-content-hidden' : '' ); ?>'>
     
    1515            <option value='<?php echo esc_attr( $field_value ); ?>' <?php echo ( $this->is_custom_field_value_selected( $field_value ) ? 'selected' : '' ); ?>>
    1616                   
    17                 <?php echo $field_value; ?> <span class='ewd-upcp-catalog-sidebar-custom-field-count'> (<?php echo $field_count; ?>)</span>
     17                <?php echo esc_html( $field_value ); ?> <span class='ewd-upcp-catalog-sidebar-custom-field-count'> (<?php echo esc_html( $field_count ); ?>)</span>
    1818
    1919            </option>
  • ultimate-product-catalogue/trunk/ewd-upcp-templates/catalog-sidebar-custom-field-radio.php

    r2638260 r2650578  
    1 <div class='ewd-upcp-catalog-sidebar-custom-field-div' data-custom_field_id='<?php echo $this->custom_field->id; ?>'>
     1<div class='ewd-upcp-catalog-sidebar-custom-field-div' data-custom_field_id='<?php echo esc_attr( $this->custom_field->id ); ?>'>
    22
    33    <div class='ewd-upcp-catalog-sidebar-title <?php echo ( $this->get_option( 'styling-sidebar-title-collapse' ) ? 'ewd-upcp-catalog-sidebar-collapsible' : '' ); ?> <?php echo ( $this->get_option( 'styling-sidebar-start-collapsed' ) ? 'ewd-upcp-sidebar-content-hidden' : '' ); ?>'>
     
    77    <?php foreach ( $this->sidebar_custom_fields[ $this->custom_field->id ] as $field_value => $field_count ) { ?>
    88
    9         <div class='ewd-upcp-catalog-sidebar-custom-field <?php echo ( $this->is_custom_field_value_selected( $field_value ) ? 'ewd-upcp-taxonomy-selected' : '' ); ?>' data-custom_field_id='<?php echo $this->custom_field->id; ?>' data-value='<?php echo $field_value; ?>'>
     9        <div class='ewd-upcp-catalog-sidebar-custom-field <?php echo ( $this->is_custom_field_value_selected( $field_value ) ? 'ewd-upcp-taxonomy-selected' : '' ); ?>' data-custom_field_id='<?php echo esc_attr( $this->custom_field->id ); ?>' data-value='<?php echo esc_attr( $field_value ); ?>'>
    1010
    11             <input type='radio' name='<?php echo esc_attr( $this->custom_field->id ); ?>' value='<?php echo $field_value; ?>' <?php echo ( $this->is_custom_field_value_selected( $field_value ) ? 'checked' : '' ); ?> >
     11            <input type='radio' name='<?php echo esc_attr( $this->custom_field->id ); ?>' value='<?php echo esc_attr( $field_value ); ?>' <?php echo ( $this->is_custom_field_value_selected( $field_value ) ? 'checked' : '' ); ?> >
    1212
    1313            <label class='ewd-upcp-catalog-sidebar-custom-field-value-label'>
    1414
    15                 <span><?php echo $field_value; ?> <span class='ewd-upcp-catalog-sidebar-custom-field-count'> (<?php echo $field_count; ?>)</span></span>
     15                <span><?php echo esc_html( $field_value ); ?> <span class='ewd-upcp-catalog-sidebar-custom-field-count'> (<?php echo esc_html( $field_count ); ?>)</span></span>
    1616   
    1717            </label>
  • ultimate-product-catalogue/trunk/ewd-upcp-templates/catalog-sidebar-custom-field-slider.php

    r2638260 r2650578  
    1 <div class='ewd-upcp-catalog-sidebar-custom-field-div' data-custom_field_id='<?php echo $this->custom_field->id; ?>'>
     1<div class='ewd-upcp-catalog-sidebar-custom-field-div' data-custom_field_id='<?php echo esc_attr( $this->custom_field->id ); ?>'>
    22
    33    <div class='ewd-upcp-catalog-sidebar-title <?php echo ( $this->get_option( 'styling-sidebar-title-collapse' ) ? 'ewd-upcp-catalog-sidebar-collapsible' : '' ); ?> <?php echo ( $this->get_option( 'styling-sidebar-start-collapsed' ) ? 'ewd-upcp-sidebar-content-hidden' : '' ); ?>'>
     
    55    </div>
    66
    7     <div class='ewd-upcp-catalog-sidebar-custom-field-slider' data-custom_field_id='<?php echo $this->custom_field->id; ?>'></div>
     7    <div class='ewd-upcp-catalog-sidebar-custom-field-slider' data-custom_field_id='<?php echo esc_attr( $this->custom_field->id ); ?>'></div>
    88
    99    <div class='ewd-upcp-catalog-sidebar-custom-field-slider-text-inputs'>
  • ultimate-product-catalogue/trunk/ewd-upcp-templates/catalog-sidebar-price-filter.php

    r2638260 r2650578  
    1313            <?php $this->maybe_print_currency_symbol( 'before' ); ?>
    1414
    15             <input type='text' value='<?php echo $this->sidebar_min_price; ?>' name='ewd-upcp-price-slider-min' <?php echo ( $this->get_option( 'disable-slider-filter-text-inputs' ) ? 'disabled' : '' ); ?> data-min_price='<?php echo $this->sidebar_min_price; ?>' />
     15            <input type='text' value='<?php echo esc_attr( $this->sidebar_min_price ); ?>' name='ewd-upcp-price-slider-min' <?php echo ( $this->get_option( 'disable-slider-filter-text-inputs' ) ? 'disabled' : '' ); ?> data-min_price='<?php echo esc_attr( $this->sidebar_min_price ); ?>' />
    1616
    1717            <?php $this->maybe_print_currency_symbol( 'after' ); ?>
     
    2525            <?php $this->maybe_print_currency_symbol( 'before' ); ?>
    2626
    27             <input type='text' value='<?php echo $this->sidebar_max_price; ?>' name='ewd-upcp-price-slider-max' <?php echo ( $this->get_option( 'disable-slider-filter-text-inputs' ) ? 'disabled' : '' ); ?> data-max_price='<?php echo $this->sidebar_max_price; ?>' />
     27            <input type='text' value='<?php echo esc_attr( $this->sidebar_max_price ); ?>' name='ewd-upcp-price-slider-max' <?php echo ( $this->get_option( 'disable-slider-filter-text-inputs' ) ? 'disabled' : '' ); ?> data-max_price='<?php echo esc_attr( $this->sidebar_max_price ); ?>' />
    2828
    2929            <?php $this->maybe_print_currency_symbol( 'after' ); ?>
  • ultimate-product-catalogue/trunk/ewd-upcp-templates/catalog-sidebar-taxonomy-checkbox.php

    r2638260 r2650578  
    1 <div class='ewd-upcp-catalog-sidebar-<?php echo $this->taxonomy_type; ?> <?php echo ( $this->is_taxonomy_selected() ? 'ewd-upcp-taxonomy-selected' : '' ); ?>' data-taxonomy_id='<?php echo $this->taxonomy_term->term_id; ?>'>
     1<div class='ewd-upcp-catalog-sidebar-<?php echo esc_attr( $this->taxonomy_type ); ?> <?php echo ( $this->is_taxonomy_selected() ? 'ewd-upcp-taxonomy-selected' : '' ); ?>' data-taxonomy_id='<?php echo esc_attr( $this->taxonomy_term->term_id ); ?>'>
    22
    33    <?php $this->maybe_print_taxonomy_image(); ?>
    44
    5     <input type='checkbox' name='<?php echo $this->taxonomy_type; ?>' id='<?php echo $this->taxonomy_type; ?>-<?php echo $this->taxonomy_term->term_id; ?>' value='<?php echo $this->taxonomy_term->term_id; ?>' <?php echo ( $this->is_taxonomy_selected() ? 'checked' : '' ); ?> >
     5    <input type='checkbox' name='<?php echo esc_attr( $this->taxonomy_type ); ?>' id='<?php echo esc_attr( $this->taxonomy_type ); ?>-<?php echo esc_attr( $this->taxonomy_term->term_id ); ?>' value='<?php echo esc_attr( $this->taxonomy_term->term_id ); ?>' <?php echo ( $this->is_taxonomy_selected() ? 'checked' : '' ); ?> >
    66
    7     <label class='ewd-upcp-catalog-sidebar-taxonomy-label' for='<?php echo $this->taxonomy_type; ?>-<?php echo $this->taxonomy_term->term_id; ?>'>
     7    <label class='ewd-upcp-catalog-sidebar-taxonomy-label' for='<?php echo esc_attr( $this->taxonomy_type ); ?>-<?php echo esc_attr( $this->taxonomy_term->term_id ); ?>'>
    88
    9         <span><?php echo $this->taxonomy_term->name; ?> <span class='ewd-upcp-catalog-sidebar-taxonomy-count'> (<?php echo $this->taxonomy_term->catalog_count; ?>)</span></span>
     9        <span><?php echo esc_html( $this->taxonomy_term->name ); ?> <span class='ewd-upcp-catalog-sidebar-taxonomy-count'> (<?php echo esc_html( $this->taxonomy_term->catalog_count ); ?>)</span></span>
    1010   
    1111    </label>
  • ultimate-product-catalogue/trunk/ewd-upcp-templates/catalog-sidebar-taxonomy-dropdown.php

    r2638260 r2650578  
    1 <option value='<?php echo $this->taxonomy_term->term_id; ?>' <?php echo ( $this->is_taxonomy_selected() ? 'selected' : '' ); ?> >
     1<option value='<?php echo esc_attr( $this->taxonomy_term->term_id ); ?>' <?php echo ( $this->is_taxonomy_selected() ? 'selected' : '' ); ?> >
    22
    3     <?php echo $this->taxonomy_term->name; ?> <span class='ewd-upcp-catalog-sidebar-taxonomy-count'> (<?php echo $this->taxonomy_term->catalog_count; ?>)</span>
     3    <?php echo esc_html( $this->taxonomy_term->name ); ?> <span class='ewd-upcp-catalog-sidebar-taxonomy-count'> (<?php echo esc_html( $this->taxonomy_term->catalog_count ); ?>)</span>
    44
    55</option>
  • ultimate-product-catalogue/trunk/ewd-upcp-templates/catalog-sidebar-taxonomy-radio.php

    r2638260 r2650578  
    1 <div class='ewd-upcp-catalog-sidebar-<?php echo $this->taxonomy_type; ?> <?php echo ( $this->is_taxonomy_selected() ? 'ewd-upcp-taxonomy-selected' : '' ); ?>' data-taxonomy_id='<?php echo $this->taxonomy_term->term_id; ?>'>
     1<div class='ewd-upcp-catalog-sidebar-<?php echo esc_attr( $this->taxonomy_type ); ?> <?php echo ( $this->is_taxonomy_selected() ? 'ewd-upcp-taxonomy-selected' : '' ); ?>' data-taxonomy_id='<?php echo esc_attr( $this->taxonomy_term->term_id ); ?>'>
    22
    33    <?php $this->maybe_print_taxonomy_image(); ?>
    44
    5     <input type='radio' name='<?php echo $this->taxonomy_type; ?>' id='<?php echo $this->taxonomy_type; ?>-<?php echo $this->taxonomy_term->term_id; ?>' value='<?php echo $this->taxonomy_term->term_id; ?>' <?php echo ( $this->is_taxonomy_selected() ? 'checked' : '' ); ?> >
     5    <input type='radio' name='<?php echo esc_attr( $this->taxonomy_type ); ?>' id='<?php echo esc_attr( $this->taxonomy_type ); ?>-<?php echo esc_attr( $this->taxonomy_term->term_id ); ?>' value='<?php echo esc_attr( $this->taxonomy_term->term_id ); ?>' <?php echo ( $this->is_taxonomy_selected() ? 'checked' : '' ); ?> >
    66
    7     <label class='ewd-upcp-catalog-sidebar-taxonomy-label' for='<?php echo $this->taxonomy_type; ?>-<?php echo $this->taxonomy_term->term_id; ?>'>
     7    <label class='ewd-upcp-catalog-sidebar-taxonomy-label' for='<?php echo esc_attr( $this->taxonomy_type ); ?>-<?php echo esc_attr( $this->taxonomy_term->term_id ); ?>'>
    88
    9         <?php echo $this->taxonomy_term->name; ?> <span class='ewd-upcp-catalog-sidebar-taxonomy-count'> (<?php echo $this->taxonomy_term->catalog_count; ?>)</span>
     9        <?php echo esc_html( $this->taxonomy_term->name ); ?> <span class='ewd-upcp-catalog-sidebar-taxonomy-count'> (<?php echo esc_html( $this->taxonomy_term->catalog_count ); ?>)</span>
    1010   
    1111    </label>
  • ultimate-product-catalogue/trunk/ewd-upcp-templates/custom-large-single-product.php

    r2638260 r2650578  
    1 <div id='ewd-upcp-single-product-<?php echo $this->product->id; ?>' class='ewd-upcp-custom-product-page ewd-upcp-product-page'>
     1<div id='ewd-upcp-single-product-<?php echo esc_attr( $this->product->id ); ?>' class='ewd-upcp-custom-product-page ewd-upcp-product-page'>
    22
    33    <?php $this->print_product_breadcrumbs(); ?>
  • ultimate-product-catalogue/trunk/ewd-upcp-templates/custom-mobile-single-product.php

    r2638260 r2650578  
    1 <div id='ewd-upcp-single-product-<?php echo $this->product->id; ?>' class='ewd-upcp-custom-mobile-product-page ewd-upcp-product-page ewd-upcp-hidden'>
     1<div id='ewd-upcp-single-product-<?php echo esc_attr( $this->product->id ); ?>' class='ewd-upcp-custom-mobile-product-page ewd-upcp-product-page ewd-upcp-hidden'>
    22
    33    <?php foreach ( $this->get_custom_product_page_elements() as $page_element ) { ?>
  • ultimate-product-catalogue/trunk/ewd-upcp-templates/custom-single-product.php

    r2638260 r2650578  
    1 <div id='ewd-upcp-single-product-<?php echo $this->product->id; ?>' class='ewd-upcp-custom-product-page ewd-upcp-product-page'>
     1<div id='ewd-upcp-single-product-<?php echo esc_attr( $this->product->id ); ?>' class='ewd-upcp-custom-product-page ewd-upcp-product-page'>
    22
    33    <?php $this->print_product_breadcrumbs(); ?>
  • ultimate-product-catalogue/trunk/ewd-upcp-templates/default-single-product.php

    r2638260 r2650578  
    1 <div id='ewd-upcp-single-product-<?php echo $this->product->id; ?>' class='ewd-upcp-standard-product-page ewd-upcp-product-page'>
     1<div id='ewd-upcp-single-product-<?php echo esc_attr( $this->product->id ); ?>' class='ewd-upcp-standard-product-page ewd-upcp-product-page'>
    22
    33    <?php $this->print_product_breadcrumbs(); ?>
  • ultimate-product-catalogue/trunk/ewd-upcp-templates/shop-style-single-product.php

    r2638260 r2650578  
    1 <div id='ewd-upcp-single-product-<?php echo $this->product->id; ?>' class='ewd-upcp-tabbed-product-page ewd-upcp-product-page ewd-upcp-shop-style-product-page'>
     1<div id='ewd-upcp-single-product-<?php echo esc_attr( $this->product->id ); ?>' class='ewd-upcp-tabbed-product-page ewd-upcp-product-page ewd-upcp-shop-style-product-page'>
    22
    33    <?php $this->print_product_breadcrumbs(); ?>
  • ultimate-product-catalogue/trunk/ewd-upcp-templates/single-product-additional-images.php

    r2638260 r2650578  
    33    <?php foreach ( $this->product->get_all_images() as $count => $image ) { ?>
    44       
    5         <a class='ewd-upcp-thumbnail-anchor <?php echo ( ! empty( $image->video_key ) ? 'ewd-upcp-video-thumbnail' : '' ); ?> <?php echo $this->get_additional_images_lightbox_class(); ?>' href='<?php echo esc_attr( $image->url ); ?>' data-ulbsource='<?php echo esc_attr( $image->url ); ?>' data-ulbtitle='<?php echo esc_attr( $image->description ); ?>' data-ulbdescription='<?php echo esc_attr( $image->description ); ?>' data-video_key='<?php echo ( ! empty( $image->video_key ) ? $image->video_key : '' ); ?>'>
    6             <img src='<?php echo esc_attr( $image->url ); ?>' class='ewd-upcp-single-product-thumbnail'>
     5        <a class='ewd-upcp-thumbnail-anchor <?php echo ( ! empty( $image->video_key ) ? 'ewd-upcp-video-thumbnail' : '' ); ?> <?php echo esc_attr( $this->get_additional_images_lightbox_class() ); ?>' href='<?php echo esc_url( $image->url ); ?>' data-ulbsource='<?php echo esc_attr( $image->url ); ?>' data-ulbtitle='<?php echo esc_attr( $image->description ); ?>' data-ulbdescription='<?php echo esc_attr( $image->description ); ?>' data-video_key='<?php echo ( ! empty( $image->video_key ) ? esc_attr( $image->video_key ) : '' ); ?>'>
     6            <img src='<?php echo esc_url( $image->url ); ?>' class='ewd-upcp-single-product-thumbnail'>
    77        </a>
    88
    9     <?php } ?>     
     9    <?php } ?>
    1010
    1111</div>
  • ultimate-product-catalogue/trunk/ewd-upcp-templates/single-product-custom-element-additional-images.php

    r2638260 r2650578  
    1 <li data-col='<?php echo $this->element->col; ?>' data-row='<?php echo $this->element->row; ?>' data-sizex='<?php echo $this->element->size_x; ?>' data-sizey='<?php echo $this->element->size_y; ?>' class='ewd-upcp-single-product-custom-element'>
     1<li data-col='<?php echo esc_attr( $this->element->col ); ?>' data-row='<?php echo esc_attr( $this->element->row ); ?>' data-sizex='<?php echo esc_attr( $this->element->size_x ); ?>' data-sizey='<?php echo esc_attr( $this->element->size_y ); ?>' class='ewd-upcp-single-product-custom-element'>
    22
    33    <?php $this->print_additional_images(); ?>
  • ultimate-product-catalogue/trunk/ewd-upcp-templates/single-product-custom-element-back-to-catalog.php

    r2638260 r2650578  
    1 <li data-col='<?php echo $this->element->col; ?>' data-row='<?php echo $this->element->row; ?>' data-sizex='<?php echo $this->element->size_x; ?>' data-sizey='<?php echo $this->element->size_y; ?>' class='ewd-upcp-single-product-custom-element'>
     1<li data-col='<?php echo esc_attr( $this->element->col ); ?>' data-row='<?php echo esc_attr( $this->element->row ); ?>' data-sizex='<?php echo esc_attr( $this->element->size_x ); ?>' data-sizey='<?php echo esc_attr( $this->element->size_y ); ?>' class='ewd-upcp-single-product-custom-element'>
    22
    33    <a class='ewd-upcp-catalogue-link' href='<?php echo esc_attr( $this->catalog_url ); ?>'>
  • ultimate-product-catalogue/trunk/ewd-upcp-templates/single-product-custom-element-blank.php

    r2638260 r2650578  
    1 <li data-col='<?php echo $this->element->col; ?>' data-row='<?php echo $this->element->row; ?>' data-sizex='<?php echo $this->element->size_x; ?>' data-sizey='<?php echo $this->element->size_y; ?>' class='ewd-upcp-single-product-custom-element'>
     1<li data-col='<?php echo esc_attr( $this->element->col ); ?>' data-row='<?php echo esc_attr( $this->element->row ); ?>' data-sizex='<?php echo esc_attr( $this->element->size_x ); ?>' data-sizey='<?php echo esc_attr( $this->element->size_y ); ?>' class='ewd-upcp-single-product-custom-element'>
    22
    33</li>
  • ultimate-product-catalogue/trunk/ewd-upcp-templates/single-product-custom-element-categories-label.php

    r2638260 r2650578  
    1 <li data-col='<?php echo $this->element->col; ?>' data-row='<?php echo $this->element->row; ?>' data-sizex='<?php echo $this->element->size_x; ?>' data-sizey='<?php echo $this->element->size_y; ?>' class='ewd-upcp-single-product-custom-element'>
     1<li data-col='<?php echo esc_attr( $this->element->col ); ?>' data-row='<?php echo esc_attr( $this->element->row ); ?>' data-sizex='<?php echo esc_attr( $this->element->size_x ); ?>' data-sizey='<?php echo esc_attr( $this->element->size_y ); ?>' class='ewd-upcp-single-product-custom-element'>
    22
    33    <?php echo esc_html( $this->get_categories_label() ); ?>
  • ultimate-product-catalogue/trunk/ewd-upcp-templates/single-product-custom-element-categories.php

    r2638260 r2650578  
    1 <li data-col='<?php echo $this->element->col; ?>' data-row='<?php echo $this->element->row; ?>' data-sizex='<?php echo $this->element->size_x; ?>' data-sizey='<?php echo $this->element->size_y; ?>' class='ewd-upcp-single-product-custom-element'>
     1<li data-col='<?php echo esc_attr( $this->element->col ); ?>' data-row='<?php echo esc_attr( $this->element->row ); ?>' data-sizex='<?php echo esc_attr( $this->element->size_x ); ?>' data-sizey='<?php echo esc_attr( $this->element->size_y ); ?>' class='ewd-upcp-single-product-custom-element'>
    22
    33    <?php echo esc_html( $this->product->get_category_names() ); ?>
  • ultimate-product-catalogue/trunk/ewd-upcp-templates/single-product-custom-element-custom-field.php

    r2638260 r2650578  
    1 <li data-col='<?php echo $this->element->col; ?>' data-row='<?php echo $this->element->row; ?>' data-sizex='<?php echo $this->element->size_x; ?>' data-sizey='<?php echo $this->element->size_y; ?>' class='ewd-upcp-single-product-custom-element'>
     1<li data-col='<?php echo esc_attr( $this->element->col ); ?>' data-row='<?php echo esc_attr( $this->element->row ); ?>' data-sizex='<?php echo esc_attr( $this->element->size_x ); ?>' data-sizey='<?php echo esc_attr( $this->element->size_y ); ?>' class='ewd-upcp-single-product-custom-element'>
    22
    3     <?php echo $this->product->custom_fields[ $this->element->element_id ]; ?>
     3    <?php echo esc_html( $this->product->custom_fields[ $this->element->element_id ] ); ?>
    44
    55</li>
  • ultimate-product-catalogue/trunk/ewd-upcp-templates/single-product-custom-element-description.php

    r2638260 r2650578  
    1 <li data-col='<?php echo $this->element->col; ?>' data-row='<?php echo $this->element->row; ?>' data-sizex='<?php echo $this->element->size_x; ?>' data-sizey='<?php echo $this->element->size_y; ?>' class='ewd-upcp-single-product-custom-element'>
     1<li data-col='<?php echo esc_attr( $this->element->col ); ?>' data-row='<?php echo esc_attr( $this->element->row ); ?>' data-sizex='<?php echo esc_attr( $this->element->size_x ); ?>' data-sizey='<?php echo esc_attr( $this->element->size_y ); ?>' class='ewd-upcp-single-product-custom-element'>
    22
    33    <?php $this->print_product_description(); ?>
  • ultimate-product-catalogue/trunk/ewd-upcp-templates/single-product-custom-element-link.php

    r2638260 r2650578  
    1 <li data-col='<?php echo $this->element->col; ?>' data-row='<?php echo $this->element->row; ?>' data-sizex='<?php echo $this->element->size_x; ?>' data-sizey='<?php echo $this->element->size_y; ?>' class='ewd-upcp-single-product-custom-element'>
     1<li data-col='<?php echo esc_attr( $this->element->col ); ?>' data-row='<?php echo esc_attr( $this->element->row ); ?>' data-sizex='<?php echo esc_attr( $this->element->size_x ); ?>' data-sizey='<?php echo esc_attr( $this->element->size_y ); ?>' class='ewd-upcp-single-product-custom-element'>
    22
    33    <a class='no-underline' href='<?php echo esc_attr( $this->details_link ); ?>'>
  • ultimate-product-catalogue/trunk/ewd-upcp-templates/single-product-custom-element-main-image.php

    r2638260 r2650578  
    1 <li data-col='<?php echo $this->element->col; ?>' data-row='<?php echo $this->element->row; ?>' data-sizex='<?php echo $this->element->size_x; ?>' data-sizey='<?php echo $this->element->size_y; ?>' class='ewd-upcp-single-product-custom-element'>
     1<li data-col='<?php echo esc_attr( $this->element->col ); ?>' data-row='<?php echo esc_attr( $this->element->row ); ?>' data-sizex='<?php echo esc_attr( $this->element->size_x ); ?>' data-sizey='<?php echo esc_attr( $this->element->size_y ); ?>' class='ewd-upcp-single-product-custom-element'>
    22
    33    <?php $this->print_main_image(); ?>
  • ultimate-product-catalogue/trunk/ewd-upcp-templates/single-product-custom-element-next-previous.php

    r2638260 r2650578  
    1 <li data-col='<?php echo $this->element->col; ?>' data-row='<?php echo $this->element->row; ?>' data-sizex='<?php echo $this->element->size_x; ?>' data-sizey='<?php echo $this->element->size_y; ?>' class='ewd-upcp-single-product-custom-element'>
     1<li data-col='<?php echo esc_attr( $this->element->col ); ?>' data-row='<?php echo esc_attr( $this->element->row ); ?>' data-sizex='<?php echo esc_attr( $this->element->size_x ); ?>' data-sizey='<?php echo esc_attr( $this->element->size_y ); ?>' class='ewd-upcp-single-product-custom-element'>
    22
    33    <?php $this->maybe_print_next_previous_products(); ?>
  • ultimate-product-catalogue/trunk/ewd-upcp-templates/single-product-custom-element-price-label.php

    r2638260 r2650578  
    1 <li data-col='<?php echo $this->element->col; ?>' data-row='<?php echo $this->element->row; ?>' data-sizex='<?php echo $this->element->size_x; ?>' data-sizey='<?php echo $this->element->size_y; ?>' class='ewd-upcp-single-product-custom-element'>
     1<li data-col='<?php echo esc_attr( $this->element->col ); ?>' data-row='<?php echo esc_attr( $this->element->row ); ?>' data-sizex='<?php echo esc_attr( $this->element->size_x ); ?>' data-sizey='<?php echo esc_attr( $this->element->size_y ); ?>' class='ewd-upcp-single-product-custom-element'>
    22
    33    <?php _e( 'Price', 'ultimate-product-catalogue' ); ?>:
  • ultimate-product-catalogue/trunk/ewd-upcp-templates/single-product-custom-element-price.php

    r2638260 r2650578  
    1 <li data-col='<?php echo $this->element->col; ?>' data-row='<?php echo $this->element->row; ?>' data-sizex='<?php echo $this->element->size_x; ?>' data-sizey='<?php echo $this->element->size_y; ?>' class='ewd-upcp-single-product-custom-element'>
     1<li data-col='<?php echo esc_attr( $this->element->col ); ?>' data-row='<?php echo esc_attr( $this->element->row ); ?>' data-sizex='<?php echo esc_attr( $this->element->size_x ); ?>' data-sizey='<?php echo esc_attr( $this->element->size_y ); ?>' class='ewd-upcp-single-product-custom-element'>
    22
    33    <?php $this->maybe_print_next_previous_products(); ?>
  • ultimate-product-catalogue/trunk/ewd-upcp-templates/single-product-custom-element-related-products.php

    r2638260 r2650578  
    1 <li data-col='<?php echo $this->element->col; ?>' data-row='<?php echo $this->element->row; ?>' data-sizex='<?php echo $this->element->size_x; ?>' data-sizey='<?php echo $this->element->size_y; ?>' class='ewd-upcp-single-product-custom-element'>
     1<li data-col='<?php echo esc_attr( $this->element->col ); ?>' data-row='<?php echo esc_attr( $this->element->row ); ?>' data-sizex='<?php echo esc_attr( $this->element->size_x ); ?>' data-sizey='<?php echo esc_attr( $this->element->size_y ); ?>' class='ewd-upcp-single-product-custom-element'>
    22
    33    <?php $this->maybe_print_related_products(); ?>
  • ultimate-product-catalogue/trunk/ewd-upcp-templates/single-product-custom-element-subcategories-label.php

    r2638260 r2650578  
    1 <li data-col='<?php echo $this->element->col; ?>' data-row='<?php echo $this->element->row; ?>' data-sizex='<?php echo $this->element->size_x; ?>' data-sizey='<?php echo $this->element->size_y; ?>' class='ewd-upcp-single-product-custom-element'>
     1<li data-col='<?php echo esc_attr( $this->element->col ); ?>' data-row='<?php echo esc_attr( $this->element->row ); ?>' data-sizex='<?php echo esc_attr( $this->element->size_x ); ?>' data-sizey='<?php echo esc_attr( $this->element->size_y ); ?>' class='ewd-upcp-single-product-custom-element'>
    22
    33    <?php echo esc_html( $this->get_subcategories_label() ); ?>
  • ultimate-product-catalogue/trunk/ewd-upcp-templates/single-product-custom-element-subcategories.php

    r2638260 r2650578  
    1 <li data-col='<?php echo $this->element->col; ?>' data-row='<?php echo $this->element->row; ?>' data-sizex='<?php echo $this->element->size_x; ?>' data-sizey='<?php echo $this->element->size_y; ?>' class='ewd-upcp-single-product-custom-element'>
     1<li data-col='<?php echo esc_attr( $this->element->col ); ?>' data-row='<?php echo esc_attr( $this->element->row ); ?>' data-sizex='<?php echo esc_attr( $this->element->size_x ); ?>' data-sizey='<?php echo esc_attr( $this->element->size_y ); ?>' class='ewd-upcp-single-product-custom-element'>
    22
    33    <?php echo esc_html( $this->product->get_subcategory_names() ); ?>
  • ultimate-product-catalogue/trunk/ewd-upcp-templates/single-product-custom-element-tags-label.php

    r2638260 r2650578  
    1 <li data-col='<?php echo $this->element->col; ?>' data-row='<?php echo $this->element->row; ?>' data-sizex='<?php echo $this->element->size_x; ?>' data-sizey='<?php echo $this->element->size_y; ?>' class='ewd-upcp-single-product-custom-element'>
     1<li data-col='<?php echo esc_attr( $this->element->col ); ?>' data-row='<?php echo esc_attr( $this->element->row ); ?>' data-sizex='<?php echo esc_attr( $this->element->size_x ); ?>' data-sizey='<?php echo esc_attr( $this->element->size_y ); ?>' class='ewd-upcp-single-product-custom-element'>
    22
    33    <?php echo esc_html( $this->get_tags_label() ); ?>
  • ultimate-product-catalogue/trunk/ewd-upcp-templates/single-product-custom-element-tags.php

    r2638260 r2650578  
    1 <li data-col='<?php echo $this->element->col; ?>' data-row='<?php echo $this->element->row; ?>' data-sizex='<?php echo $this->element->size_x; ?>' data-sizey='<?php echo $this->element->size_y; ?>' class='ewd-upcp-single-product-custom-element'>
     1<li data-col='<?php echo esc_attr( $this->element->col ); ?>' data-row='<?php echo esc_attr( $this->element->row ); ?>' data-sizex='<?php echo esc_attr( $this->element->size_x ); ?>' data-sizey='<?php echo esc_attr( $this->element->size_y ); ?>' class='ewd-upcp-single-product-custom-element'>
    22
    33    <?php echo esc_html( $this->product->get_tag_names() ); ?>
  • ultimate-product-catalogue/trunk/ewd-upcp-templates/single-product-custom-element-text.php

    r2638260 r2650578  
    1 <li data-col='<?php echo $this->element->col; ?>' data-row='<?php echo $this->element->row; ?>' data-sizex='<?php echo $this->element->size_x; ?>' data-sizey='<?php echo $this->element->size_y; ?>' class='ewd-upcp-single-product-custom-element'>
     1<li data-col='<?php echo esc_attr( $this->element->col ); ?>' data-row='<?php echo esc_attr( $this->element->row ); ?>' data-sizex='<?php echo esc_attr( $this->element->size_x ); ?>' data-sizey='<?php echo esc_attr( $this->element->size_y ); ?>' class='ewd-upcp-single-product-custom-element'>
    22
    33    <?php echo do_shortcode( $this->element->element_id ); ?>
  • ultimate-product-catalogue/trunk/ewd-upcp-templates/single-product-custom-element-title.php

    r2638260 r2650578  
    1 <li data-col='<?php echo $this->element->col; ?>' data-row='<?php echo $this->element->row; ?>' data-sizex='<?php echo $this->element->size_x; ?>' data-sizey='<?php echo $this->element->size_y; ?>' class='ewd-upcp-single-product-custom-element'>
     1<li data-col='<?php echo esc_attr( $this->element->col ); ?>' data-row='<?php echo esc_attr( $this->element->row ); ?>' data-sizex='<?php echo esc_attr( $this->element->size_x ); ?>' data-sizey='<?php echo esc_attr( $this->element->size_y ); ?>' class='ewd-upcp-single-product-custom-element'>
    22
    33    <?php $this->print_title(); ?>
  • ultimate-product-catalogue/trunk/ewd-upcp-templates/single-product-description.php

    r2638260 r2650578  
    11<div class='ewd-upcp-single-product-description'>
    22
    3     <?php echo $this->product->get_product_description(); ?>
     3    <?php echo wp_kses_post( $this->product->get_product_description() ); ?>
    44
    55</div>
  • ultimate-product-catalogue/trunk/ewd-upcp-templates/single-product-main-image.php

    r2638260 r2650578  
    1 <div class='ewd-upcp-single-product-main-image <?php echo $this->get_main_image_lightbox_class(); ?>' data-ulbsource='<?php echo esc_attr( $this->product->get_main_image_url() ); ?>'>
     1<div class='ewd-upcp-single-product-main-image <?php echo esc_attr( $this->get_main_image_lightbox_class() ); ?>' data-ulbsource='<?php echo esc_attr( $this->product->get_main_image_url() ); ?>'>
    22
    33    <?php echo $this->product->get_image(); ?>
  • ultimate-product-catalogue/trunk/ewd-upcp-templates/single-product-tab-faqs.php

    r2638260 r2650578  
    33    <?php $ufaq_product_category = get_term_by( 'name', $this->product->name, 'ufaq-category' ); ?>
    44
    5     <?php echo do_shortcode( "[ultimate-faqs include_category='". ( ! empty( $ufaq_product_category ) ? $ufaq_product_category->slug : '' )  . ',' . $this->get_product_category_slugs() . "']" ); ?>
     5    <?php echo do_shortcode( "[ultimate-faqs include_category='". ( ! empty( $ufaq_product_category ) ? sanitize_text_field( $ufaq_product_category->slug ) : '' ) . ',' . esc_attr( $this->get_product_category_slugs() ) . "']" ); ?>
    66
    77</div>
  • ultimate-product-catalogue/trunk/ewd-upcp-templates/single-product-videos.php

    r2638260 r2650578  
    77        </div> */ ?>
    88
    9         <div class='ewd-upcp-single-video' data-video_key='<?php echo ( $key + 1 ); ?>'>
     9        <div class='ewd-upcp-single-video' data-video_key='<?php echo esc_attr( $key + 1 ); ?>'>
    1010
    1111            <iframe width='300' height='225' src='<?php echo esc_attr( $video->embed_url ); ?>' webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
  • ultimate-product-catalogue/trunk/ewd-upcp-templates/tabbed-single-product.php

    r2638260 r2650578  
    1 <div id='ewd-upcp-single-product-<?php echo $this->product->id; ?>' class='ewd-upcp-tabbed-product-page ewd-upcp-product-page'>
     1<div id='ewd-upcp-single-product-<?php echo esc_attr( $this->product->id ); ?>' class='ewd-upcp-tabbed-product-page ewd-upcp-product-page'>
    22
    33    <?php $this->print_product_breadcrumbs(); ?>
  • ultimate-product-catalogue/trunk/includes/AdminCustomFields.class.php

    r2638260 r2650578  
    1414        // Add the admin menu
    1515        add_action( 'admin_menu', array( $this, 'add_menu_page' ), 12 );
    16 
    17         // Enqueue admin scripts
    18         add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ), 12 );
    1916    }
    2017
     
    221218        do_action( 'ewd_upcp_custom_fields_updated' );
    222219    }
    223 
    224     public function enqueue_scripts() {
    225 
    226         $screen = get_current_screen();
    227 
    228         if ( $screen->id == 'tracking_page_ewd-upcp-custom-fields' ) {
    229 
    230             wp_enqueue_style( 'ewd-upcp-admin-css', EWD_UPCP_PLUGIN_URL . '/assets/css/ewd-upcp-admin.css', array(), EWD_UPCP_VERSION );
    231             wp_enqueue_script( 'ewd-upcp-admin-js', EWD_UPCP_PLUGIN_URL . '/assets/js/ewd-upcp-admin.js', array( 'jquery', 'jquery-ui-sortable' ), EWD_UPCP_VERSION, true );
    232         }
    233     }
    234220}
    235221} // endif;
  • ultimate-product-catalogue/trunk/includes/AdminProductPage.class.php

    r2638260 r2650578  
    399399                                <li>
    400400
    401                                     <a class='ewd-upcp-custom-product-page-add-element' data-name='<?php echo $element->name; ?>' data-class='<?php echo $element->class; ?>' data-id='<?php echo $element->id; ?>' data-x_size='<?php echo $element->x_size; ?>' data-y_size='<?php echo $element->y_size; ?>'><?php echo $element->name; ?></a>
     401                                    <a class='ewd-upcp-custom-product-page-add-element' data-name='<?php echo esc_attr( $element->name ); ?>' data-class='<?php echo esc_attr( $element->class ); ?>' data-id='<?php echo esc_attr( $element->id ); ?>' data-x_size='<?php echo esc_attr( $element->x_size ); ?>' data-y_size='<?php echo esc_attr( $element->y_size ); ?>'><?php echo esc_html( $element->name ); ?></a>
    402402
    403403                                </li>
     
    417417                                <?php foreach ( $gridster as $grid_element ) { ?>
    418418
    419                                     <li data-col='<?php echo $grid_element->col; ?>' data-row='<?php echo $grid_element->row; ?>' data-sizex='<?php echo $grid_element->size_x; ?>' data-sizey='<?php echo $grid_element->size_y; ?>'  data-elementclass='<?php echo $grid_element->element_class; ?>' data-elementid='<?php echo $grid_element->element_id; ?>' class='prod-page-div gs-w' style='display: list-item; position:absolute;'>
     419                                    <li data-col='<?php echo esc_attr( $grid_element->col ); ?>' data-row='<?php echo esc_attr( $grid_element->row ); ?>' data-sizex='<?php echo esc_attr( $grid_element->size_x ); ?>' data-sizey='<?php echo esc_attr( $grid_element->size_y); ?>'  data-elementclass='<?php echo esc_attr( $grid_element->element_class ); ?>' data-elementid='<?php echo esc_attr( $grid_element->element_id ); ?>' class='prod-page-div gs-w' style='display: list-item; position:absolute;'>
    420420
    421421                                        <?php echo substr( $grid_element->element_type, 0, strpos( $grid_element->element_type, '<' ) ); ?>
     
    426426
    427427                                            <textarea class='ewd-upcp-pb-textarea'>
    428                                                 <?php echo $grid_element->element_id; ?>
     428                                                <?php echo esc_textarea( $grid_element->element_id ); ?>
    429429                                            </textarea>
    430430
     
    500500                                <li>
    501501
    502                                     <a class='ewd-upcp-custom-product-page-add-element' data-name='<?php echo $element->name; ?>' data-class='<?php echo $element->class; ?>' data-x_size='<?php echo $element->x_size; ?>' data-y_size='<?php echo $element->y_size; ?>'><?php echo $element->name; ?></a>
     502                                    <a class='ewd-upcp-custom-product-page-add-element' data-name='<?php echo esc_attr( $element->name ); ?>' data-class='<?php echo esc_attr( $element->class ); ?>' data-x_size='<?php echo esc_attr( $element->x_size ); ?>' data-y_size='<?php echo esc_attr( $element->y_size ); ?>'><?php echo esc_html( $element->name ); ?></a>
    503503
    504504                                </li>
     
    518518                                <?php foreach ( $gridster as $grid_element ) { ?>
    519519
    520                                     <li data-col='<?php echo $grid_element->col; ?>' data-row='<?php echo $grid_element->row; ?>' data-sizex='<?php echo $grid_element->size_x; ?>' data-sizey='<?php echo $grid_element->size_y; ?>'  data-elementclass='<?php echo $grid_element->element_class; ?>' data-elementid='<?php echo $grid_element->element_id; ?>' class='prod-page-div gs-w' style='display: list-item; position:absolute;'>
     520                                    <li data-col='<?php echo esc_attr( $grid_element->col ); ?>' data-row='<?php echo esc_attr( $grid_element->row ); ?>' data-sizex='<?php echo esc_attr( $grid_element->size_x ); ?>' data-sizey='<?php echo esc( $grid_element->size_y ); ?>'  data-elementclass='<?php echo esc_attr( $grid_element->element_class ); ?>' data-elementid='<?php echo esc_attr( $grid_element->element_id ); ?>' class='prod-page-div gs-w' style='display: list-item; position:absolute;'>
    521521
    522522                                        <?php echo substr( $grid_element->element_type, 0, strpos( $grid_element->element_type, '<' ) ); ?>
     
    527527
    528528                                            <textarea class='ewd-upcp-pb-textarea'>
    529                                                 <?php echo $grid_element->element_id; ?>
     529                                                <?php echo esc_textarea( $grid_element->element_id ); ?>
    530530                                            </textarea>
    531531
     
    537537
    538538                            </ul>
    539                            
     539
    540540                        </div>
    541541
     
    563563
    564564                </div>
    565                
     565
    566566            </form>
    567            
     567
    568568        </div>
    569569
     
    611611
    612612    public function save_gridster_layout() {
     613        global $ewd_upcp_controller;
     614
     615        // Authenticate request
     616        if (
     617            ! check_ajax_referer( 'ewd-upcp-admin-js', 'nonce' )
     618            ||
     619            ! current_user_can( $ewd_upcp_controller->settings->get_setting( 'access-role' ) )
     620        ) {
     621            ewdUpcpHelper::admin_nopriv_ajax();
     622        }
    613623
    614624        $option_name = $_POST['type'] == 'mobile' ? 'UPCP_Product_Page_Serialized_Mobile' : 'UPCP_Product_Page_Serialized';
  • ultimate-product-catalogue/trunk/includes/Ajax.class.php

    r2638260 r2650578  
    3232            global $ewd_upcp_controller;
    3333
     34            // Authenticate request
     35            if ( ! check_ajax_referer( 'ewd-upcp-js', 'nonce' ) ) {
     36                ewdUpcpHelper::bad_nonce_ajax();
     37            }
     38
    3439            $product_id = intval( $_POST['product_id'] );
    3540
     
    4348        public function update_catalog() {
    4449            global $ewd_upcp_controller;
    45            
     50
     51            // Authenticate request
     52            if ( ! check_ajax_referer( 'ewd-upcp-js', 'nonce' ) ) {
     53                ewdUpcpHelper::bad_nonce_ajax();
     54            }
     55
    4656            $args = array(
    4757                'sidebar'           => 'no',
     
    112122            global $woocommerce;
    113123
     124            // Authenticate request
     125            if ( ! check_ajax_referer( 'ewd-upcp-js', 'nonce' ) ) {
     126                ewdUpcpHelper::bad_nonce_ajax();
     127            }
     128
    114129            setcookie( 'upcp_cart_products', '', time() - 3600, '/' );
    115130
     
    129144            global $ewd_upcp_controller;
    130145            global $woocommerce;
     146
     147            // Authenticate request
     148            if ( ! check_ajax_referer( 'ewd-upcp-js', 'nonce' ) ) {
     149                ewdUpcpHelper::bad_nonce_ajax();
     150            }
    131151
    132152            if ( ! empty( $ewd_upcp_controller->settings->get_setting( 'woocommerce-checkout' ) ) and ! empty( $ewd_upcp_controller->settings->get_setting( 'woocommerce-sync' ) ) and is_object( $woocommerce ) ) {
  • ultimate-product-catalogue/trunk/includes/CustomPostTypes.class.php

    r2638260 r2650578  
    389389        ?>
    390390   
    391         <input type="hidden" name="ewd_upcp_nonce" value="<?php echo $this->nonce; ?>">
     391        <input type="hidden" name="ewd_upcp_nonce" value="<?php echo esc_attr( $this->nonce ); ?>">
    392392
    393393        <div class='ewd-upcp-meta-field'>
     
    612612
    613613                            <?php foreach ( $products as $product ) { ?>
    614                                 <option value='<?php echo $product->ID; ?>'><?php echo esc_html( $product->post_title ); ?></option>
     614                                <option value='<?php echo esc_attr( $product->ID ); ?>'><?php echo esc_html( $product->post_title ); ?></option>
    615615                            <?php } ?>
    616616
     
    628628
    629629                                <?php foreach ( $products as $product ) { ?>
    630                                     <option value='<?php echo $product->ID; ?>' <?php echo ( $related_product == $product->ID ? 'selected' : '' ); ?>><?php echo esc_html( $product->post_title ); ?></option>
     630                                    <option value='<?php echo esc_attr( $product->ID ); ?>' <?php echo ( $related_product == $product->ID ? 'selected' : '' ); ?>><?php echo esc_html( $product->post_title ); ?></option>
    631631                                <?php } ?>
    632632
     
    658658
    659659                        <?php foreach ( $products as $product ) { ?>
    660                             <option value='<?php echo $product->ID; ?>' <?php echo ( $previous_product == $product->ID ? 'selected' : '' ); ?>><?php echo esc_html( $product->post_title ); ?></option>
     660                            <option value='<?php echo esc_attr( $product->ID ); ?>' <?php echo ( $previous_product == $product->ID ? 'selected' : '' ); ?>><?php echo esc_html( $product->post_title ); ?></option>
    661661                        <?php } ?>
    662662
     
    676676
    677677                        <?php foreach ( $products as $product ) { ?>
    678                             <option value='<?php echo $product->ID; ?>' <?php echo ( $next_product == $product->ID ? 'selected' : '' ); ?>><?php echo esc_html( $product->post_title ); ?></option>
     678                            <option value='<?php echo esc_attr( $product->ID ); ?>' <?php echo ( $next_product == $product->ID ? 'selected' : '' ); ?>><?php echo esc_html( $product->post_title ); ?></option>
    679679                        <?php } ?>
    680680
     
    870870                    <?php foreach ( $products as $product ) { ?>
    871871                        <label class='ewd-upcp-admin-input-container'>
    872                             <input type='checkbox' class='ewd-upcp-add-items-product-checkbox' value='<?php echo $product->ID; ?>' />
     872                            <input type='checkbox' class='ewd-upcp-add-items-product-checkbox' value='<?php echo esc_attr( $product->ID ); ?>' />
    873873                            <span class='ewd-upcp-admin-checkbox'></span> <span><?php echo esc_html( $product->post_title ); ?></span>
    874874                        </label>
     
    885885                    <?php foreach ( $categories as $category ) { ?>
    886886                        <label class='ewd-upcp-admin-input-container'>
    887                             <input type='checkbox' class='ewd-upcp-add-items-category-checkbox' value='<?php echo $category->term_id; ?>' />
     887                            <input type='checkbox' class='ewd-upcp-add-items-category-checkbox' value='<?php echo esc_attr( $category->term_id ); ?>' />
    888888                            <span class='ewd-upcp-admin-checkbox'></span> <span><?php echo esc_html( $category->name ); ?></span>
    889889                        </label>
     
    904904            <div class='ewd-upcp-catalog-meta-current-items'>
    905905
    906                 <input type="hidden" name="ewd_upcp_nonce" value="<?php echo $this->nonce; ?>">
     906                <input type="hidden" name="ewd_upcp_nonce" value="<?php echo esc_attr( $this->nonce ); ?>">
    907907
    908908                <table class='ewd-upcp-catalog-meta-items'>
     
    936936                                <td>
    937937
    938                                     <input type='hidden' name='catalog_item_id[]' value='<?php echo $item->id; ?>' />
    939 
    940                                     <input type='hidden' name='catalog_item_type[]' value='<?php echo $item->type; ?>' />
     938                                    <input type='hidden' name='catalog_item_id[]' value='<?php echo esc_attr( $item->id ); ?>' />
     939
     940                                    <input type='hidden' name='catalog_item_type[]' value='<?php echo esc_attr( $item->type ); ?>' />
    941941
    942942                                    <?php echo esc_html( $item_name ) ?>
     
    12571257     */
    12581258    public function update_category_and_tag_order() {
     1259        global $ewd_upcp_controller;
     1260
     1261        // Authenticate request
     1262        if (
     1263            ! check_ajax_referer( 'ewd-upcp-admin-js', 'nonce' )
     1264            ||
     1265            ! current_user_can( $ewd_upcp_controller->settings->get_setting( 'access-role' ) )
     1266        ) {
     1267            ewdUpcpHelper::admin_nopriv_ajax();
     1268        }
    12591269
    12601270        $ids = is_array( $_POST['tag'] ) ? array_map( 'intval', $_POST['tag'] ) : array();
     
    14971507     */
    14981508    public function update_product_order() {
     1509        global $ewd_upcp_controller;
     1510
     1511        // Authenticate request
     1512        if (
     1513            ! check_ajax_referer( 'ewd-upcp-admin-js', 'nonce' )
     1514            ||
     1515            ! current_user_can( $ewd_upcp_controller->settings->get_setting( 'access-role' ) )
     1516        ) {
     1517            ewdUpcpHelper::admin_nopriv_ajax();
     1518        }
    14991519
    15001520        $ids = is_array( $_POST['post'] ) ? array_map( 'intval', $_POST['post'] ) : array();
  • ultimate-product-catalogue/trunk/includes/Dashboard.class.php

    r2638260 r2650578  
    1515    public function __construct() {
    1616        add_action( 'admin_menu', array( $this, 'add_dashboard_to_menu' ), 99 );
    17 
    18         add_action( 'admin_enqueue_scripts',  array( $this, 'enqueue_scripts' ) );
    19 
    20         add_action( 'wp_ajax_ewd_upcp_hide_upgrade_box', array($this, 'hide_upgrade_box') );
    21         add_action( 'wp_ajax_ewd_upcp_display_upgrade_box', array($this, 'display_upgrade_box') );
    2217
    2318        if ( ! empty( $_POST['ewd_upcp_reset_settings'] ) ) {
     
    6257    }
    6358
    64     // Enqueues the admin script so that our hacky sub-menu opening function can run
    65     public function enqueue_scripts() {
    66         global $admin_page_hooks;
    67        
    68         $currentScreen = get_current_screen();
    69         if ( $currentScreen->id == 'upcp_product_page_ewd-upcp-settings' ) {
    70             wp_enqueue_style( 'ewd-upcp-admin-css', EWD_UPCP_PLUGIN_URL . '/assets/css/ewd-upcp-admin.css', array(), EWD_UPCP_VERSION );
    71             wp_enqueue_script( 'ewd-upcp-admin-js', EWD_UPCP_PLUGIN_URL . '/assets/js/ewd-upcp-admin.js', array( 'jquery' ), EWD_UPCP_VERSION, true );
    72         }
    73     }
    74 
    7559    public function display_dashboard_screen() {
    7660        global $ewd_upcp_controller;
     
    10084                    $premium_info = apply_filters( 'ewd_dashboard_top', $premium_info, 'UPCP', 'https://www.etoilewebdesign.com/license-payment/?Selected=UPCP&Quantity=1' );
    10185
    102                     echo $premium_info;
     86                    // This will allow us to disaply the form
     87                    $tmp_fun = function( $tags ) {
     88                        $tags = array_merge(
     89                            $tags,
     90                            [
     91                                'input' => [
     92                                    'class'       => true,
     93                                    'name'        => true,
     94                                    'type'        => true,
     95                                    'value'       => true,
     96                                    'placeholder' => true
     97                                ]
     98                            ]
     99                        );
     100                        if(isset($tags['form'])) {
     101                            $tags['form'] = array_merge($tags['form'], ['class' => true]);
     102                        }
     103                        return $tags;
     104                    };
     105                    add_filter( 'wp_kses_allowed_html', $tmp_fun, 10, 1);
     106                    echo wp_kses_post( $premium_info );
     107                    remove_filter( 'wp_kses_allowed_html', $tmp_fun, 10 );
    103108                } ?>
    104        
     109
    105110                <div class="ewd-upcp-dashboard-new-widget-box ewd-widget-box-full" id="ewd-upcp-dashboard-support-widget-box">
    106111                    <div class="ewd-upcp-dashboard-new-widget-box-top"><?php _e('Get Support', 'ultimate-product-catalogue'); ?><span id="ewd-upcp-dash-mobile-support-down-caret">&nbsp;&nbsp;&#9660;</span><span id="ewd-upcp-dash-mobile-support-up-caret">&nbsp;&nbsp;&#9650;</span></div>
     
    151156                                        foreach ( $catalogs as $catalog ) { ?>
    152157                                            <tr>
    153                                                 <td><a href='post.php?post=<?php echo $catalog->ID; ?>&action=edit'><?php echo $catalog->post_title; ?></a></td>
    154                                                 <td>[product-catalogue id='<?php echo $catalog->ID; ?>']</td>
     158                                                <td><a href='post.php?post=<?php echo esc_url( $catalog->ID ); ?>&action=edit'><?php echo esc_html( $catalog->post_title ); ?></a></td>
     159                                                <td>[product-catalogue id='<?php echo sanitize_text_field( $catalog->ID ); ?>']</td>
    155160                                            </tr>
    156161                                        <?php }
     
    228233                           
    229234                            <?php if ( ! get_option("EWD_UPCP_Trial_Happening") ) {
    230                                 $trial_info = sprintf( __( '<a href="%s" target="_blank">Visit our website</a> to learn how to get a free 7-day trial of the premium plugin.'), 'https://www.etoilewebdesign.com/premium-upgrade-instructions/' );     
     235                                $trial_info = sprintf( __( '<a href="%s" target="_blank">Visit our website</a> to learn how to get a free 7-day trial of the premium plugin.'), 'https://www.etoilewebdesign.com/premium-upgrade-instructions/' );
    231236
    232237                                echo apply_filters( 'ewd_trial_button', $trial_info, 'UPCP' );
  • ultimate-product-catalogue/trunk/includes/DeactivationSurvey.class.php

    r2638260 r2650578  
    5555        <div class="ewd-upcp-deactivate-survey-modal" id="ewd-upcp-deactivate-survey-ultimate-product-catalogue">
    5656            <div class="ewd-upcp-deactivate-survey-wrap">
    57                 <form class="ewd-upcp-deactivate-survey" method="post" data-installtime="<?php echo $install_time; ?>">
     57                <form class="ewd-upcp-deactivate-survey" method="post" data-installtime="<?php echo esc_attr( $install_time ); ?>">
    5858                    <span class="ewd-upcp-deactivate-survey-title"><span class="dashicons dashicons-testimonial"></span><?php echo ' ' . __( 'Quick Feedback', 'ultimate-product-catalogue' ); ?></span>
    5959                    <span class="ewd-upcp-deactivate-survey-desc"><?php echo __('If you have a moment, please share why you are deactivating Ultimate Product Catalog:', 'ultimate-product-catalogue' ); ?></span>
     
    6161                        <?php foreach ( $options as $id => $option ) : ?>
    6262                            <div class="ewd-upcp-deactivate-survey-option">
    63                                 <label for="ewd-upcp-deactivate-survey-option-ultimate-product-catalogue-<?php echo $id; ?>" class="ewd-upcp-deactivate-survey-option-label">
    64                                     <input id="ewd-upcp-deactivate-survey-option-ultimate-product-catalogue-<?php echo $id; ?>" class="ewd-upcp-deactivate-survey-option-input" type="radio" name="code" value="<?php echo $id; ?>" />
    65                                     <span class="ewd-upcp-deactivate-survey-option-reason"><?php echo $option['title']; ?></span>
     63                                <label for="ewd-upcp-deactivate-survey-option-ultimate-product-catalogue-<?php echo esc_attr( $id ); ?>" class="ewd-upcp-deactivate-survey-option-label">
     64                                    <input id="ewd-upcp-deactivate-survey-option-ultimate-product-catalogue-<?php echo esc_attr( $id ); ?>" class="ewd-upcp-deactivate-survey-option-input" type="radio" name="code" value="<?php echo esc_attr( $id ); ?>" />
     65                                    <span class="ewd-upcp-deactivate-survey-option-reason"><?php echo esc_html( $option['title'] ); ?></span>
    6666                                </label>
    6767                                <?php if ( ! empty( $option['details'] ) ) : ?>
    68                                     <input class="ewd-upcp-deactivate-survey-option-details" type="text" placeholder="<?php echo $option['details']; ?>" />
     68                                    <input class="ewd-upcp-deactivate-survey-option-details" type="text" placeholder="<?php echo esc_attr( $option['details'] ); ?>" />
    6969                                <?php endif; ?>
    7070                            </div>
  • ultimate-product-catalogue/trunk/includes/Export.class.php

    r2638260 r2650578  
    2121
    2222        if ( isset( $_POST['ewd_upcp_export'] ) ) { add_action( 'admin_menu', array($this, 'export_products' )); }
    23 
    24         add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_export_scripts' ) );
    2523    }
    2624
     
    171169    }
    172170
    173     public function enqueue_export_scripts() {
    174 
    175         $screen = get_current_screen();
    176 
    177         if ( $screen->id == 'ewd-upcp-tracking_page_ewd-upcp-export' ) {
    178 
    179             wp_enqueue_style( 'ewd-upcp-admin-css', EWD_UPCP_PLUGIN_URL . '/assets/css/ewd-upcp-admin.css', array(), EWD_UPCP_VERSION );
    180             wp_enqueue_script( 'ewd-upcp-admin-js', EWD_UPCP_PLUGIN_URL . '/assets/js/ewd-upcp-admin.js', array( 'jquery' ), EWD_UPCP_VERSION, true );
    181         }
    182     }
    183 
    184171}
    185172
  • ultimate-product-catalogue/trunk/includes/Import.class.php

    r2638260 r2650578  
    1919
    2020        if ( isset( $_POST['ewdupcpImport'] ) ) { add_action( 'admin_init', array($this, 'import_products' )); }
    21 
    22         add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_import_scripts' ) );
    2321    }
    2422
     
    376374    }
    377375
    378     public function enqueue_import_scripts() {
    379 
    380         $screen = get_current_screen();
    381 
    382         if ( $screen->id == 'ewd-upcp-tracking_page_ewd-upcp-import' ) {
    383 
    384             wp_enqueue_style( 'ewd-upcp-admin-css', EWD_UPCP_PLUGIN_URL . '/assets/css/ewd-upcp-admin.css', array(), '5.0.0' );
    385             wp_enqueue_script( 'ewd-upcp-admin-js', EWD_UPCP_PLUGIN_URL . '/assets/js/ewd-upcp-admin.js', array( 'jquery' ), '5.0.0', true );
    386         }
    387     }
    388 
    389376    public function display_notice() {
    390377
  • ultimate-product-catalogue/trunk/includes/InstallationWalkthrough.class.php

    r2638260 r2650578  
    8080     */
    8181    public function add_category() {
     82        global $ewd_upcp_controller;
     83
     84        // Authenticate request
     85        if (
     86            ! check_ajax_referer( 'ewd-upcp-getting-started', 'nonce' )
     87            ||
     88            ! current_user_can( $ewd_upcp_controller->settings->get_setting( 'access-role' ) )
     89        ) {
     90            ewdUpcpHelper::admin_nopriv_ajax();
     91        }
    8292
    8393        $category_name = isset( $_POST['category_name'] ) ? sanitize_text_field( $_POST['category_name'] ) : '';
    84         $category_description = isset( $_POST['category_description'] ) ? sanitize_textarea_field( $_POST['category_description'] ) : '';
    85 
    86         $category_term_id = wp_insert_term( $category_name, EWD_UPCP_PRODUCT_CATEGORY_TAXONOMY, array('description' => $category_description) );
    87 
    88         echo json_encode ( array( 'category_name' => $category_name, 'category_id' => $category_term_id['term_id'] ) );
    89 
    90         exit();
     94        $category_description = isset( $_POST['category_description'] ) ? sanitize_textarea_field( $_POST['category_description'] ) : '';
     95
     96        $category_term_id = wp_insert_term( $category_name, EWD_UPCP_PRODUCT_CATEGORY_TAXONOMY, array('description' => $category_description) );
     97
     98        echo json_encode ( array( 'category_name' => $category_name, 'category_id' => $category_term_id['term_id'] ) );
     99
     100        exit();
    91101    }
    92102
     
    96106     */
    97107    public function add_catalog() {
     108        global $ewd_upcp_controller;
     109
     110        // Authenticate request
     111        if (
     112            ! check_ajax_referer( 'ewd-upcp-getting-started', 'nonce' )
     113            ||
     114            ! current_user_can( $ewd_upcp_controller->settings->get_setting( 'access-role' ) )
     115        ) {
     116            ewdUpcpHelper::admin_nopriv_ajax();
     117        }
    98118
    99119        $args = array(
    100             'post_title' => isset( $_POST['catalog_name'] ) ? sanitize_text_field( $_POST['catalog_name'] ) : '',
    101             'post_content' => '',
    102             'post_status' => 'publish',
    103             'post_type' => EWD_UPCP_CATALOG_POST_TYPE
    104         );
    105 
    106         $catalog_id = wp_insert_post( $args ); 
    107 
    108         if ( $catalog_id ) {
    109 
    110             $args = array(
    111                 'taxonomy'      => EWD_UPCP_PRODUCT_CATEGORY_TAXONOMY,
    112                 'hide_empty'    => false,
    113             );
    114 
    115             $categories = get_terms( $args );
    116 
    117             $items = array();
    118 
    119             foreach ( $categories as $category ) {
    120 
    121                 $items[] = (object) array(
    122                     'type'  => 'category',
    123                     'id'    => $category->term_id,
    124                 );
    125             }
    126 
    127             update_post_meta( $catalog_id, 'items', $items );
    128         }
    129 
    130         $args = array(
    131             'post_title' => isset( $_POST['catalog_name'] ) ? sanitize_text_field( $_POST['catalog_name'] ) : '',
    132             'post_content' => '<!-- wp:paragraph --><p> [product-catalogue id="' . $catalog_id . '"] </p><!-- /wp:paragraph -->',
    133             'post_status' => 'publish',
    134             'post_type' => 'page'
    135         );
    136 
    137         $post_id = wp_insert_post( $args );
    138 
    139         wp_send_json_success(
    140             array(
    141                 'post_id'   => $post_id,
    142             )
    143         );
    144    
    145         exit();
     120            'post_title' => isset( $_POST['catalog_name'] ) ? sanitize_text_field( $_POST['catalog_name'] ) : '',
     121            'post_content' => '',
     122            'post_status' => 'publish',
     123            'post_type' => EWD_UPCP_CATALOG_POST_TYPE
     124        );
     125
     126        $catalog_id = wp_insert_post( $args );
     127
     128        if ( $catalog_id ) {
     129
     130            $args = array(
     131                'taxonomy'      => EWD_UPCP_PRODUCT_CATEGORY_TAXONOMY,
     132                'hide_empty'    => false,
     133            );
     134
     135            $categories = get_terms( $args );
     136
     137            $items = array();
     138
     139            foreach ( $categories as $category ) {
     140
     141                $items[] = (object) array(
     142                    'type'  => 'category',
     143                    'id'    => $category->term_id,
     144                );
     145            }
     146
     147            update_post_meta( $catalog_id, 'items', $items );
     148        }
     149
     150        $args = array(
     151            'post_title' => isset( $_POST['catalog_name'] ) ? sanitize_text_field( $_POST['catalog_name'] ) : '',
     152            'post_content' => '<!-- wp:paragraph --><p> [product-catalogue id="' . $catalog_id . '"] </p><!-- /wp:paragraph -->',
     153            'post_status' => 'publish',
     154            'post_type' => 'page'
     155        );
     156
     157        $post_id = wp_insert_post( $args );
     158
     159        wp_send_json_success(
     160            array(
     161                'post_id'   => $post_id,
     162            )
     163        );
     164
     165        exit();
    146166    }
    147167
     
    151171     */
    152172    public function set_options() {
     173        global $ewd_upcp_controller;
     174
     175        // Authenticate request
     176        if (
     177            ! check_ajax_referer( 'ewd-upcp-getting-started', 'nonce' )
     178            ||
     179            ! current_user_can( $ewd_upcp_controller->settings->get_setting( 'access-role' ) )
     180        ) {
     181            ewdUpcpHelper::admin_nopriv_ajax();
     182        }
    153183
    154184        $ewd_upcp_options = get_option( 'ewd-upcp-settings' );
     
    160190
    161191        update_option( 'ewd-upcp-settings', $ewd_upcp_options );
    162    
    163         exit();
     192
     193        exit();
    164194    }
    165195
     
    169199     */
    170200    public function add_product() {
     201        global $ewd_upcp_controller;
     202
     203        // Authenticate request
     204        if (
     205            ! check_ajax_referer( 'ewd-upcp-getting-started', 'nonce' )
     206            ||
     207            ! current_user_can( $ewd_upcp_controller->settings->get_setting( 'access-role' ) )
     208        ) {
     209            ewdUpcpHelper::admin_nopriv_ajax();
     210        }
    171211
    172212        $args = array(
     
    220260        wp_enqueue_script( 'ewd-upcp-admin-settings-js', EWD_UPCP_PLUGIN_URL . '/lib/simple-admin-pages/js/admin-settings.js', array( 'jquery' ), EWD_UPCP_VERSION );
    221261        wp_enqueue_script( 'ewd-upcp-admin-spectrum-js', EWD_UPCP_PLUGIN_URL . '/lib/simple-admin-pages/js/spectrum.js', array( 'jquery' ), EWD_UPCP_VERSION );
     262
     263        wp_localize_script(
     264            'ewd-upcp-getting-started',
     265            'ewd_upcp_getting_started',
     266            array(
     267                'nonce' => wp_create_nonce( 'ewd-upcp-getting-started' )
     268            )
     269        );
    222270    }
    223271
     
    332380                                <fieldset>
    333381                                    <legend class="screen-reader-text"><span>Currency Symbol</span></legend>
    334                                     <label for='currency_symbol'></label><input type='text' name='currency_symbol' value='<?php echo $currency_symbol; ?>' /><br />
     382                                    <label for='currency_symbol'></label><input type='text' name='currency_symbol' value='<?php echo esc_attr( $currency_symbol ); ?>' /><br />
    335383                                    <p><?php _e('What currency symbol, if any, should be displayed before or after the price? Leave blank for none.', 'ultimate-product-catalogue'); ?></p>
    336384                                </fieldset>
  • ultimate-product-catalogue/trunk/includes/Product.class.php

    r2638260 r2650578  
    506506        $image_url = $this->get_main_image_url();
    507507
    508         return '<img class="ewd-upcp-product-image" src="' . $image_url . '" />';
     508        return '<img class="ewd-upcp-product-image" src="' . esc_url( $image_url ) . '" />';
    509509    }
    510510
  • ultimate-product-catalogue/trunk/includes/ReviewAsk.class.php

    r2638260 r2650578  
    7474        wp_enqueue_style( 'ewd-upcp-review-ask-css', EWD_UPCP_PLUGIN_URL . '/assets/css/dashboard-review-ask.css' );
    7575        wp_enqueue_script( 'ewd-upcp-review-ask-js', EWD_UPCP_PLUGIN_URL . '/assets/js/dashboard-review-ask.js', array( 'jquery' ), EWD_UPCP_VERSION, true  );
     76
     77        wp_localize_script(
     78            'ewd-upcp-review-ask-js',
     79            'ewd_upcp_review_ask',
     80            array(
     81                'nonce' => wp_create_nonce( 'ewd-upcp-review-ask-js' )
     82            )
     83        );
    7684    }
    7785
    7886    public function hide_review_ask() {
     87        global $ewd_upcp_controller;
     88
     89        // Authenticate request
     90        if (
     91            ! check_ajax_referer( 'ewd-upcp-review-ask-js', 'nonce' )
     92            ||
     93            ! current_user_can( $ewd_upcp_controller->settings->get_setting( 'access-role' ) )
     94        ) {
     95            ewdUpcpHelper::admin_nopriv_ajax();
     96        }
    7997
    8098        $ask_review_time = sanitize_text_field($_POST['ask_review_time']);
    8199
    82         if ( get_option( 'ewd-upcp-review-ask-time' ) < time() + 3600*24 * $ask_review_time ) {
    83             update_option( 'ewd-upcp-review-ask-time', time() + 3600*24 * $ask_review_time );
    84         }
     100        if ( get_option( 'ewd-upcp-review-ask-time' ) < time() + 3600*24 * $ask_review_time ) {
     101            update_option( 'ewd-upcp-review-ask-time', time() + 3600*24 * $ask_review_time );
     102        }
    85103
    86         die();
     104        die();
    87105    }
    88106
    89107    public function send_feedback() {
     108        global $ewd_upcp_controller;
     109
     110        // Authenticate request
     111        if (
     112            ! check_ajax_referer( 'ewd-upcp-review-ask-js', 'nonce' )
     113            ||
     114            ! current_user_can( $ewd_upcp_controller->settings->get_setting( 'access-role' ) )
     115        ) {
     116            ewdUpcpHelper::admin_nopriv_ajax();
     117        }
     118
    90119        $headers = 'Content-type: text/html;charset=utf-8' . "\r\n"; 
    91         $feedback = sanitize_text_field($_POST['feedback']);
    92         $feedback .= '<br /><br />Email Address: ';
    93         $feedback .= sanitize_text_field($_POST['email_address']);
     120        $feedback = sanitize_text_field($_POST['feedback']);
     121        $feedback .= '<br /><br />Email Address: ';
     122        $feedback .= sanitize_email($_POST['email_address']);
    94123
    95         wp_mail('contact@etoilewebdesign.com', 'UPCP Feedback - Dashboard Form', $feedback, $headers);
     124        wp_mail('contact@etoilewebdesign.com', 'UPCP Feedback - Dashboard Form', $feedback, $headers);
    96125
    97         die();
     126        die();
    98127    }
    99128}
  • ultimate-product-catalogue/trunk/includes/Widgets.class.php

    r2638260 r2650578  
    6060    public function widget( $args, $instance ) {
    6161
    62         echo $args['before_widget'];
    63         echo do_shortcode( "[insert-products product_ids='". $instance['product_list'] . "' catalogue_url='". $instance['catalogue_url'] . "' products_wide='". $instance['products_per_row'] . "']" );
    64         echo $args['after_widget'];
     62        echo esc_html( $args['before_widget'] );
     63        echo do_shortcode( "[insert-products product_ids='". sanitize_text_field( $instance['product_list'] ) . "' catalogue_url='". sanitize_text_field( $instance['catalogue_url'] ) . "' products_wide='". sanitize_text_field( $instance['products_per_row'] ) . "']" );
     64        echo esc_html( $args['after_widget'] );
    6565    }
    6666
     
    7979
    8080        <p>
    81             <label for="<?php echo $this->get_field_id( 'product_list' ); ?>"><?php _e( 'Comma-separated product IDs:', 'ultimate-product-catalogue' ); ?></label>
    82             <input class="widefat" id="<?php echo $this->get_field_id( 'product_list' ); ?>" name="<?php echo $this->get_field_name( 'product_list' ); ?>" type="text" value="<?php echo esc_attr( $product_list ); ?>">
    83         </p>
    84         <p>
    85             <label for="<?php echo $this->get_field_id( 'catalogue_url' ); ?>"><?php _e( 'The URL of your catalog:', 'ultimate-product-catalogue' ); ?></label>
    86             <input class="widefat" id="<?php echo $this->get_field_id( 'catalogue_url' ); ?>" name="<?php echo $this->get_field_name( 'catalogue_url' ); ?>" type="text" value="<?php echo esc_attr( $catalogue_url ); ?>">
    87         </p>
    88         <p>
    89             <label for="<?php echo $this->get_field_id( 'products_per_row' ); ?>"><?php _e( 'The number of products per row:', 'ultimate-product-catalogue' ); ?></label>
    90             <input class="widefat" id="<?php echo $this->get_field_id( 'products_per_row' ); ?>" name="<?php echo $this->get_field_name( 'products_per_row' ); ?>" type="text" value="<?php echo esc_attr( $products_per_row ); ?>">
     81            <label for="<?php echo esc_attr( $this->get_field_id( 'product_list' ) ); ?>"><?php _e( 'Comma-separated product IDs:', 'ultimate-product-catalogue' ); ?></label>
     82            <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'product_list' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'product_list' ) ); ?>" type="text" value="<?php echo esc_attr( $product_list ); ?>">
     83        </p>
     84        <p>
     85            <label for="<?php echo esc_attr( $this->get_field_id( 'catalogue_url' ) ); ?>"><?php _e( 'The URL of your catalog:', 'ultimate-product-catalogue' ); ?></label>
     86            <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'catalogue_url' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'catalogue_url' ) ); ?>" type="text" value="<?php echo esc_attr( $catalogue_url ); ?>">
     87        </p>
     88        <p>
     89            <label for="<?php echo esc_attr( $this->get_field_id( 'products_per_row' ) ); ?>"><?php _e( 'The number of products per row:', 'ultimate-product-catalogue' ); ?></label>
     90            <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'products_per_row' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'products_per_row' ) ); ?>" type="text" value="<?php echo esc_attr( $products_per_row ); ?>">
    9191        </p>
    9292
     
    133133    public function widget( $args, $instance ) {
    134134
    135         echo $args['before_widget'];
    136         echo do_shortcode( "[insert-products catalogue_id='". $instance['catalogue_id'] . "' product_count='". $instance['product_count'] . "' catalogue_url='". $instance['catalogue_url'] . "']" );
    137         echo $args['after_widget'];
     135        echo esc_html( $args['before_widget'] );
     136        echo do_shortcode( "[insert-products catalogue_id='". sanitize_text_field( $instance['catalogue_id'] ) . "' product_count='". sanitize_text_field( $instance['product_count'] ) . "' catalogue_url='". sanitize_text_field( $instance['catalogue_url'] ) . "']" );
     137        echo esc_html( $args['after_widget'] );
    138138    }
    139139
     
    152152
    153153        <p>
    154             <label for="<?php echo $this->get_field_id( 'catalogue_id' ); ?>"><?php _e( 'Catalog ID:', 'ultimate-product-catalogue' ); ?></label>
    155             <input class="widefat" id="<?php echo $this->get_field_id( 'catalogue_id' ); ?>" name="<?php echo $this->get_field_name( 'catalogue_id' ); ?>" type="text" value="<?php echo esc_attr( $catalogue_id ); ?>">
    156         </p>
    157         <p>
    158             <label for="<?php echo $this->get_field_id( 'product_count' ); ?>"><?php _e( 'Number of products to display:', 'ultimate-product-catalogue' ); ?></label>
    159             <input class="widefat" id="<?php echo $this->get_field_id( 'product_count' ); ?>" name="<?php echo $this->get_field_name( 'product_count' ); ?>" type="text" value="<?php echo esc_attr( $product_count ); ?>">
    160         </p>
    161         <p>
    162             <label for="<?php echo $this->get_field_id( 'catalogue_url' ); ?>"><?php _e( 'The URL of your catalog:', 'ultimate-product-catalogue' ); ?></label>
    163             <input class="widefat" id="<?php echo $this->get_field_id( 'catalogue_url' ); ?>" name="<?php echo $this->get_field_name( 'catalogue_url' ); ?>" type="text" value="<?php echo esc_attr( $catalogue_url ); ?>">
     154            <label for="<?php echo esc_attr( $this->get_field_id( 'catalogue_id' ) ); ?>"><?php _e( 'Catalog ID:', 'ultimate-product-catalogue' ); ?></label>
     155            <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'catalogue_id' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'catalogue_id' ) ); ?>" type="text" value="<?php echo esc_attr( $catalogue_id ); ?>">
     156        </p>
     157        <p>
     158            <label for="<?php echo esc_attr( $this->get_field_id( 'product_count' ) ); ?>"><?php _e( 'Number of products to display:', 'ultimate-product-catalogue' ); ?></label>
     159            <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'product_count' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'product_count' ) ); ?>" type="text" value="<?php echo esc_attr( $product_count ); ?>">
     160        </p>
     161        <p>
     162            <label for="<?php echo esc_attr( $this->get_field_id( 'catalogue_url' ) ); ?>"><?php _e( 'The URL of your catalog:', 'ultimate-product-catalogue' ); ?></label>
     163            <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'catalogue_url' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'catalogue_url' ) ); ?>" type="text" value="<?php echo esc_attr( $catalogue_url ); ?>">
    164164        </p>
    165165
     
    206206    public function widget( $args, $instance ) {
    207207
    208         echo $args['before_widget'];
    209         echo do_shortcode( "[insert-products catalogue_id='". $instance['catalogue_id'] . "' catalogue_search='recent' product_count='". $instance['product_count'] . "' catalogue_url='". $instance['catalogue_url'] . "']" );
    210         echo $args['after_widget'];
     208        echo esc_html( $args['before_widget'] );
     209        echo do_shortcode( "[insert-products catalogue_id='". sanitize_text_field( $instance['catalogue_id'] ) . "' catalogue_search='recent' product_count='". sanitize_text_field( $instance['product_count'] ) . "' catalogue_url='". sanitize_text_field( $instance['catalogue_url'] ) . "']" );
     210        echo esc_html( $args['after_widget'] );
    211211    }
    212212
     
    225225
    226226        <p>
    227             <label for="<?php echo $this->get_field_id( 'catalogue_id' ); ?>"><?php _e( 'Catalog ID:', 'ultimate-product-catalogue' ); ?></label>
    228             <input class="widefat" id="<?php echo $this->get_field_id( 'catalogue_id' ); ?>" name="<?php echo $this->get_field_name( 'catalogue_id' ); ?>" type="text" value="<?php echo esc_attr( $catalogue_id ); ?>">
    229         </p>
    230         <p>
    231             <label for="<?php echo $this->get_field_id( 'product_count' ); ?>"><?php _e( 'Number of products to display:', 'ultimate-product-catalogue' ); ?></label>
    232             <input class="widefat" id="<?php echo $this->get_field_id( 'product_count' ); ?>" name="<?php echo $this->get_field_name( 'product_count' ); ?>" type="text" value="<?php echo esc_attr( $product_count ); ?>">
    233         </p>
    234         <p>
    235             <label for="<?php echo $this->get_field_id( 'catalogue_url' ); ?>"><?php _e( 'The URL of your catalog:', 'ultimate-product-catalogue' ); ?></label>
    236             <input class="widefat" id="<?php echo $this->get_field_id( 'catalogue_url' ); ?>" name="<?php echo $this->get_field_name( 'catalogue_url' ); ?>" type="text" value="<?php echo esc_attr( $catalogue_url ); ?>">
     227            <label for="<?php echo esc_attr( $this->get_field_id( 'catalogue_id' ) ); ?>"><?php _e( 'Catalog ID:', 'ultimate-product-catalogue' ); ?></label>
     228            <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'catalogue_id' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'catalogue_id' ) ); ?>" type="text" value="<?php echo esc_attr( $catalogue_id ); ?>">
     229        </p>
     230        <p>
     231            <label for="<?php echo esc_attr( $this->get_field_id( 'product_count' ) ); ?>"><?php _e( 'Number of products to display:', 'ultimate-product-catalogue' ); ?></label>
     232            <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'product_count' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'product_count' ) ); ?>" type="text" value="<?php echo esc_attr( $product_count ); ?>">
     233        </p>
     234        <p>
     235            <label for="<?php echo esc_attr( $this->get_field_id( 'catalogue_url' ) ); ?>"><?php _e( 'The URL of your catalog:', 'ultimate-product-catalogue' ); ?></label>
     236            <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'catalogue_url' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'catalogue_url' ) ); ?>" type="text" value="<?php echo esc_attr( $catalogue_url ); ?>">
    237237        </p>
    238238
     
    279279    public function widget( $args, $instance ) {
    280280
    281         echo $args['before_widget'];
    282         echo do_shortcode( "[insert-products catalogue_id='". $instance['catalogue_id'] . "' catalogue_search='popular' product_count='". $instance['product_count'] . "' catalogue_url='". $instance['catalogue_url'] . "']" );
    283         echo $args['after_widget'];
     281        echo esc_html( $args['before_widget'] );
     282        echo do_shortcode( "[insert-products catalogue_id='". sanitize_text_field( $instance['catalogue_id'] ) . "' catalogue_search='popular' product_count='". sanitize_text_field( $instance['product_count'] ) . "' catalogue_url='". sanitize_text_field( $instance['catalogue_url'] ) . "']" );
     283        echo esc_html( $args['after_widget'] );
    284284    }
    285285
     
    298298
    299299        <p>
    300             <label for="<?php echo $this->get_field_id( 'catalogue_id' ); ?>"><?php _e( 'Catalog ID:', 'ultimate-product-catalogue' ); ?></label>
    301             <input class="widefat" id="<?php echo $this->get_field_id( 'catalogue_id' ); ?>" name="<?php echo $this->get_field_name( 'catalogue_id' ); ?>" type="text" value="<?php echo esc_attr( $catalogue_id ); ?>">
    302         </p>
    303         <p>
    304             <label for="<?php echo $this->get_field_id( 'product_count' ); ?>"><?php _e( 'Number of products to display:', 'ultimate-product-catalogue' ); ?></label>
    305             <input class="widefat" id="<?php echo $this->get_field_id( 'product_count' ); ?>" name="<?php echo $this->get_field_name( 'product_count' ); ?>" type="text" value="<?php echo esc_attr( $product_count ); ?>">
    306         </p>
    307         <p>
    308             <label for="<?php echo $this->get_field_id( 'catalogue_url' ); ?>"><?php _e( 'The URL of your catalog:', 'ultimate-product-catalogue' ); ?></label>
    309             <input class="widefat" id="<?php echo $this->get_field_id( 'catalogue_url' ); ?>" name="<?php echo $this->get_field_name( 'catalogue_url' ); ?>" type="text" value="<?php echo esc_attr( $catalogue_url ); ?>">
     300            <label for="<?php echo esc_attr( $this->get_field_id( 'catalogue_id' ) ); ?>"><?php _e( 'Catalog ID:', 'ultimate-product-catalogue' ); ?></label>
     301            <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'catalogue_id' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'catalogue_id' ) ); ?>" type="text" value="<?php echo esc_attr( $catalogue_id ); ?>">
     302        </p>
     303        <p>
     304            <label for="<?php echo esc_attr( $this->get_field_id( 'product_count' ) ); ?>"><?php _e( 'Number of products to display:', 'ultimate-product-catalogue' ); ?></label>
     305            <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'product_count' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'product_count' ) ); ?>" type="text" value="<?php echo esc_attr( $product_count ); ?>">
     306        </p>
     307        <p>
     308            <label for="<?php echo esc_attr( $this->get_field_id( 'catalogue_url' ) ); ?>"><?php _e( 'The URL of your catalog:', 'ultimate-product-catalogue' ); ?></label>
     309            <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'catalogue_url' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'catalogue_url' ) ); ?>" type="text" value="<?php echo esc_attr( $catalogue_url ); ?>">
    310310        </p>
    311311
     
    352352    public function widget( $args, $instance ) {
    353353
    354         echo $args['before_widget'];
     354        echo esc_html( $args['before_widget'] );
    355355        echo "<div class='ewd-upcp-product-search-widget-div'>";
    356         echo "<form method='post' action='" . add_query_arg( 'overview_mode', 'None', $instance['catalogue_url'] ) . "'>";
    357         echo "<div class='ewd-upcp-widget-search-label'>" . $instance['search_label'] . "</div>";
    358         echo "<div class='ewd-upcp-widget-search-input'><input type='text' name='prod_name' placeholder='" . $instance['search_placeholder'] . "'/></div>";
    359         echo "<input type='submit' class='ewd-upcp-widget-submit' name='upcp_widget_search_submit' value='" . $instance['search_label'] . "' />";
     356        echo "<form method='post' action='" . esc_attr( add_query_arg( 'overview_mode', 'None', $instance['catalogue_url'] ) ) . "'>";
     357        echo "<div class='ewd-upcp-widget-search-label'>" . sanitize_text_field( $instance['search_label'] ) . "</div>";
     358        echo "<div class='ewd-upcp-widget-search-input'><input type='text' name='prod_name' placeholder='" . esc_attr( $instance['search_placeholder'] ) . "'/></div>";
     359        echo "<input type='submit' class='ewd-upcp-widget-submit' name='upcp_widget_search_submit' value='" . esc_attr( $instance['search_label'] ) . "' />";
    360360        echo "</form>";
    361361        echo "</div>";
    362         echo $args['after_widget'];
     362        echo esc_html( $args['after_widget'] );
    363363    }
    364364
     
    377377
    378378        <p>
    379             <label for="<?php echo $this->get_field_id( 'search_label' ); ?>"><?php _e( 'Catalog ID:', 'ultimate-product-catalogue' ); ?></label>
    380             <input class="widefat" id="<?php echo $this->get_field_id( 'search_label' ); ?>" name="<?php echo $this->get_field_name( 'search_label' ); ?>" type="text" value="<?php echo esc_attr( $search_label ); ?>">
    381         </p>
    382         <p>
    383             <label for="<?php echo $this->get_field_id( 'search_placeholder' ); ?>"><?php _e( 'Number of products to display:', 'ultimate-product-catalogue' ); ?></label>
    384             <input class="widefat" id="<?php echo $this->get_field_id( 'search_placeholder' ); ?>" name="<?php echo $this->get_field_name( 'search_placeholder' ); ?>" type="text" value="<?php echo esc_attr( $search_placeholder ); ?>">
    385         </p>
    386         <p>
    387             <label for="<?php echo $this->get_field_id( 'catalogue_url' ); ?>"><?php _e( 'The URL of your catalog:', 'ultimate-product-catalogue' ); ?></label>
    388             <input class="widefat" id="<?php echo $this->get_field_id( 'catalogue_url' ); ?>" name="<?php echo $this->get_field_name( 'catalogue_url' ); ?>" type="text" value="<?php echo esc_attr( $catalogue_url ); ?>">
     379            <label for="<?php echo esc_attr( $this->get_field_id( 'search_label' ) ); ?>"><?php _e( 'Catalog ID:', 'ultimate-product-catalogue' ); ?></label>
     380            <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'search_label' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'search_label' ) ); ?>" type="text" value="<?php echo esc_attr( $search_label ); ?>">
     381        </p>
     382        <p>
     383            <label for="<?php echo esc_attr( $this->get_field_id( 'search_placeholder' ) ); ?>"><?php _e( 'Number of products to display:', 'ultimate-product-catalogue' ); ?></label>
     384            <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'search_placeholder' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'search_placeholder' ) ); ?>" type="text" value="<?php echo esc_attr( $search_placeholder ); ?>">
     385        </p>
     386        <p>
     387            <label for="<?php echo esc_attr( $this->get_field_id( 'catalogue_url' ) ); ?>"><?php _e( 'The URL of your catalog:', 'ultimate-product-catalogue' ); ?></label>
     388            <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'catalogue_url' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'catalogue_url' ) ); ?>" type="text" value="<?php echo esc_attr( $catalogue_url ); ?>">
    389389        </p>
    390390
  • ultimate-product-catalogue/trunk/includes/template-functions.php

    r2638260 r2650578  
    180180
    181181    if ( count( $classes ) ) {
    182         return ' class="' . join( ' ', $classes ) . '"';
     182        return ' class="' . esc_attr( join( ' ', $classes ) ) . '"';
    183183    }
    184184}
  • ultimate-product-catalogue/trunk/readme.txt

    r2638260 r2650578  
    55Requires at least: 4.0.0
    66Tested up to: 5.8
     7Stable tag: 5.0.26
    78License: GPLv3
    89License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    332333
    333334== Changelog ==
     335
     336= 5.0.26 (2021-12-29) =
     337- Updating nonce and authorization checks for AJAX calls.
     338- Updating sanitizing and escaping.
    334339
    335340= 5.0.25 (2021-12-01) =
  • ultimate-product-catalogue/trunk/ultimate-product-catalogue.php

    r2638260 r2650578  
    88Terms and Conditions: https://www.etoilewebdesign.com/plugin-terms-and-conditions/
    99Text Domain: ultimate-product-catalogue
    10 Version: 5.0.25
     10Version: 5.0.26
    1111*/
    1212
     
    4848        define( 'EWD_UPCP_PLUGIN_FNAME', plugin_basename( __FILE__ ) );
    4949        define( 'EWD_UPCP_TEMPLATE_DIR', 'ewd-upcp-templates' );
    50         define( 'EWD_UPCP_VERSION', '5.0.23' );
     50        define( 'EWD_UPCP_VERSION', '5.0.26' );
    5151
    5252        define( 'EWD_UPCP_PRODUCT_POST_TYPE', 'upcp_product' );
     
    7272        require_once( EWD_UPCP_PLUGIN_DIR . '/includes/Dashboard.class.php' );
    7373        require_once( EWD_UPCP_PLUGIN_DIR . '/includes/DeactivationSurvey.class.php' );
     74        require_once( EWD_UPCP_PLUGIN_DIR . '/includes/Helper.class.php' );
    7475        require_once( EWD_UPCP_PLUGIN_DIR . '/includes/Export.class.php' );
    7576        require_once( EWD_UPCP_PLUGIN_DIR . '/includes/Import.class.php' );
     
    143144
    144145        add_action( 'admin_notices',                    array( $this, 'display_header_area' ) );
     146        add_action( 'admin_notices',                    array( $this, 'maybe_display_helper_notice' ) );
    145147
    146148        add_action( 'admin_enqueue_scripts',            array( $this, 'enqueue_admin_assets' ), 10, 1 );
     
    150152
    151153        add_filter( 'plugin_action_links',              array( $this, 'plugin_action_links' ), 10, 2);
     154
     155        add_action( 'wp_ajax_ewd_upcp_hide_helper_notice', array( $this, 'hide_helper_notice' ) );
    152156    }
    153157
     
    259263        global $post;
    260264
     265        wp_enqueue_script( 'ewd-upcp-helper-notice', EWD_UPCP_PLUGIN_URL . '/assets/js/ewd-upcp-helper-install-notice.js', array( 'jquery' ), EWD_UPCP_VERSION, true );
     266        wp_localize_script(
     267            'ewd-upcp-helper-notice',
     268            'ewd_upcp_helper_notice',
     269            array( 'nonce' => wp_create_nonce( 'ewd-upcp-helper-notice' ) )
     270        );
     271
     272        wp_enqueue_style( 'ewd-upcp-helper-notice', EWD_UPCP_PLUGIN_URL . '/assets/css/ewd-upcp-helper-install-notice.css', array(), EWD_UPCP_VERSION );
     273
    261274        $post_type = is_object( $post ) ?  $post->post_type : '';
    262275
    263276        $screen = get_current_screen();
    264277
    265         // Return if not one of the UASP post types, we're not on a post-type page, or we're not on the settings or widget pages
    266         if ( $hook != 'upcp_product_page_ewd-upcp-settings' and $hook != 'upcp_product_page_ewd-upcp-import' and $hook != 'upcp_product_page_ewd-upcp-export' and ( empty( $screen->post_type ) or $screen->post_type != 'upcp_product' ) and ( empty( $screen->post_type ) or $screen->post_type != 'upcp_catalog' ) and $screen->id != 'upcp_product_page_ewd-upcp-dashboard' and $screen->id != 'upcp_product_page_ewd-upcp-custom-fields' ) { return; }
    267 
    268         wp_enqueue_media();
     278        // Return if not one of the UASP post types, we're not on a post-type page, or we're not on the settings or widget pages
     279        $candidates = array(
     280            'upcp_product_page_ewd-upcp-dashboard',
     281
     282            'edit-upcp_product',
     283            'upcp_product',
     284
     285            'edit-upcp_catalog',
     286            'upcp_catalog',
     287
     288            'edit-upcp-product-category',
     289            'edit-upcp-product-tag',
     290            'upcp_product_page_ewd-upcp-export',
     291            'upcp_product_page_ewd-upcp-import',
     292            'upcp_product_page_ewd-upcp-custom-fields',
     293            'upcp_product_page_ewd-upcp-product-page',
     294            'upcp_product_page_ewd-upcp-settings'
     295        );
     296
     297        if ( ! in_array( $hook, $candidates )
     298            && ( empty( $screen->post_type ) or ! in_array ( $screen->post_type, $candidates ) )
     299            and ! in_array( $screen->id, $candidates )
     300        ) {
     301            return;
     302        }
     303
     304        wp_enqueue_media();
    269305
    270306        wp_enqueue_style( 'ewd-upcp-admin-css', EWD_UPCP_PLUGIN_URL . '/assets/css/ewd-upcp-admin.css', array(), EWD_UPCP_VERSION );
     
    279315
    280316        $args = array(
     317            'nonce' => wp_create_nonce( 'ewd-upcp-admin-js' ),
    281318            'product_add' => ( $this->permissions->check_permission( 'premium' ) or sizeof( $products ) < 100 ),
    282319        );
     
    301338        wp_register_script( 'ewd-upcp-gridster', EWD_UPCP_PLUGIN_URL . '/assets/js/jquery.gridster.js', array( 'jquery' ), EWD_UPCP_VERSION, true );
    302339        wp_register_script( 'ewd-upcp-js', EWD_UPCP_PLUGIN_URL . '/assets/js/ewd-upcp.js', array( 'jquery', 'jquery-ui-slider' ), EWD_UPCP_VERSION, true );
     340
     341        wp_localize_script(
     342            'ewd-upcp-js',
     343            'ewd_upcp_js',
     344            array(
     345                'nonce' => wp_create_nonce( 'ewd-upcp-js' )
     346            )
     347        );
    303348    }
    304349
     
    475520    }
    476521
     522    public function maybe_display_helper_notice() {
     523        global $ewd_upcp_controller;
     524
     525        if ( empty( $ewd_upcp_controller->permissions->check_permission( 'premium' ) ) ) { return; }
     526
     527        if ( is_plugin_active( 'ewd-premium-helper/ewd-premium-helper.php' ) ) { return; }
     528
     529        if ( get_transient( 'ewd-helper-notice-dismissed' ) ) { return; }
     530       
     531        ?>
     532
     533        <div class='notice notice-error is-dismissible ewd-upcp-helper-install-notice'>
     534           
     535            <div class='ewd-upcp-helper-install-notice-img'>
     536                <img src='<?php echo EWD_UPCP_PLUGIN_URL . '/lib/simple-admin-pages/img/options-asset-exclamation.png' ; ?>' />
     537            </div>
     538
     539            <div class='ewd-upcp-helper-install-notice-txt'>
     540                <?php _e( 'You\'re using the Ultimate Product Catalog premium version, but the premium helper plugin is not active.', 'ultimate-product-catalogue' ); ?>
     541                <br />
     542                <?php echo sprintf( __( 'Please re-activate the helper plugin, or <a target=\'_blank\' href=\'%s\'>download and install it</a> if the plugin is no longer installed to ensure continued access to the premium features of the plugin.', 'ultimate-product-catalogue' ), 'https://www.etoilewebdesign.com/2021/12/11/requiring-premium-helper-plugin/' ); ?>
     543            </div>
     544
     545            <div class='ewd-upcp-clear'></div>
     546
     547        </div>
     548
     549        <?php
     550    }
     551
     552    public function hide_helper_notice() {
     553        global $ewd_upcp_controller;
     554
     555        // Authenticate request
     556        if (
     557            ! check_ajax_referer( 'ewd-upcp-helper-notice', 'nonce' )
     558            ||
     559            ! current_user_can( $ewd_upcp_controller->settings->get_setting( 'access-role' ) )
     560        ) {
     561            ewdUpcpHelper::admin_nopriv_ajax();
     562        }
     563
     564        set_transient( 'ewd-helper-notice-dismissed', true, 3600*24*7 );
     565
     566        die();
     567    }
     568
    477569}
    478570} // endif;
  • ultimate-product-catalogue/trunk/views/View.class.php

    r2638260 r2650578  
    158158        global $ewd_upcp_controller;
    159159
    160         echo '<style>';
    161             if ( $ewd_upcp_controller->settings->get_setting( 'styling-action-button-background-color' ) != '' ) { echo '.ewd-upcp-product-action-button { border-color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-action-button-background-color' ) . ' !important; color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-action-button-background-color' ) . ' !important; } .ewd-upcp-product-action-button:hover { background: ' . $ewd_upcp_controller->settings->get_setting( 'styling-action-button-background-color' ) . ' !important; }'; }
    162             if ( $ewd_upcp_controller->settings->get_setting( 'styling-action-button-text-color' ) != '' ) { echo '.ewd-upcp-product-action-button:hover { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-action-button-text-color' ) . ' !important; }'; }
    163             if ( $ewd_upcp_controller->settings->get_setting( 'styling-compare-button-background-color' ) != '' ) { echo '.ewd-upcp-product-comparison-button { background: ' . $ewd_upcp_controller->settings->get_setting( 'styling-compare-button-background-color' ) . ' !important; }'; }
    164             if ( $ewd_upcp_controller->settings->get_setting( 'styling-compare-button-text-color' ) != '' ) { echo '.ewd-upcp-product-comparison-button { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-compare-button-text-color' ) . ' !important; }'; }
    165             if ( $ewd_upcp_controller->settings->get_setting( 'styling-compare-button-clicked-background-color' ) != '' ) { echo '.ewd-upcp-product-comparison-button.ewd-upcp-comparison-clicked { background: ' . $ewd_upcp_controller->settings->get_setting( 'styling-compare-button-clicked-background-color' ) . ' !important; }'; }
    166             if ( $ewd_upcp_controller->settings->get_setting( 'styling-compare-button-clicked-text-color' ) != '' ) { echo '.ewd-upcp-product-comparison-button.ewd-upcp-comparison-clicked { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-compare-button-clicked-text-color' ) . ' !important; }'; }
    167             if ( $ewd_upcp_controller->settings->get_setting( 'styling-compare-button-font-size' ) != '' ) { echo '.ewd-upcp-product-comparison-button span { font-size: ' . $ewd_upcp_controller->settings->get_setting( 'styling-compare-button-font-size' ) . ' !important; }'; }
    168             if ( $ewd_upcp_controller->settings->get_setting( 'styling-sale-button-background-color' ) != '' ) { echo '.ewd-upcp-sale-price { background: ' . $ewd_upcp_controller->settings->get_setting( 'styling-sale-button-background-color' ) . ' !important; }'; }
    169             if ( $ewd_upcp_controller->settings->get_setting( 'styling-sale-button-text-color' ) != '' ) { echo '.ewd-upcp-sale-price { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-sale-button-text-color' ) . ' !important; }'; }
    170             if ( $ewd_upcp_controller->settings->get_setting( 'styling-sale-button-font-size' ) != '' ) { echo '.ewd-upcp-sale-price span { font-size: ' . $ewd_upcp_controller->settings->get_setting( 'styling-compare-button-font-size' ) . ' !important; }'; }
    171             if ( $ewd_upcp_controller->settings->get_setting( 'styling-product-comparison-title-font-color' ) != '' ) { echo '.ewd-upcp-product-comparison-product a { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-product-comparison-title-font-color' ) . ' !important; }'; }
    172             if ( $ewd_upcp_controller->settings->get_setting( 'styling-product-comparison-title-font-size' ) != '' ) { echo '.ewd-upcp-product-comparison-product a { font-size: ' . $ewd_upcp_controller->settings->get_setting( 'styling-product-comparison-title-font-size' ) . ' !important; }'; }
    173             if ( $ewd_upcp_controller->settings->get_setting( 'styling-product-comparison-price-font-size' ) != '' ) { echo '.ewd-upcp-product-comparison-price { font-size: ' . $ewd_upcp_controller->settings->get_setting( 'styling-product-comparison-price-font-size' ) . ' !important; }'; }
    174             if ( $ewd_upcp_controller->settings->get_setting( 'styling-product-comparison-price-font-color' ) != '' ) { echo '.ewd-upcp-product-comparison-price { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-product-comparison-price-font-color' ) . ' !important; }'; }
    175             if ( $ewd_upcp_controller->settings->get_setting( 'styling-product-comparison-price-background-color' ) != '' ) { echo '.ewd-upcp-product-comparison-price { background: ' . $ewd_upcp_controller->settings->get_setting( 'styling-product-comparison-price-background-color' ) . ' !important; }'; }
    176 
    177             if ( $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-image-border-color' ) != '' ) { echo '.ewd-upcp-catalog-product-thumbnail-image-div { border: 5px solid ' . $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-image-border-color' ) . ' !important; }'; }
    178             if ( $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-box-min-height' ) != '' ) { echo '.ewd-upcp-catalog-product-thumbnail { min-height: ' . $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-box-min-height' ) . 'px !important; }'; }
    179             if ( $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-box-max-height' ) != '' ) { echo '.ewd-upcp-catalog-product-thumbnail { max-height: ' . $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-box-max-height' ) . 'px !important; }'; }
    180             if ( $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-box-padding' ) != '' ) { echo '.ewd-upcp-catalog-main-block .ewd-upcp-catalog-product-thumbnail { padding: ' . $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-box-padding' ) . 'px !important; }'; }
    181             if ( $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-border-color' ) != '' ) { echo '.ewd-upcp-catalog-main-block .ewd-upcp-catalog-product-thumbnail, .ewd-upcp-catalog-main-block .ewd-upcp-catalog-product-thumbnail .ewd-upcp-product-action-button { border-color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-border-color' ) . ' !important; }'; }
    182             if ( $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-title-font' ) != '' ) { echo '.ewd-upcp-catalog-product-thumbnail-body-div a { font-family: ' . $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-title-font' ) . ' !important; }'; }
    183             if ( $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-title-font-size' ) != '' ) { echo '.ewd-upcp-catalog-product-thumbnail-body-div a { font-size: ' . $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-title-font-size' ) . ' !important; }'; }
    184             if ( $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-title-font-color' ) != '' ) { echo '.ewd-upcp-catalog-product-thumbnail-body-div a { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-title-font-color' ) . ' !important; }'; }
    185             if ( $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-price-font' ) != '' ) { echo '.ewd-upcp-catalog-product-thumbnail .ewd-upcp-catalog-product-price { font-family: ' . $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-price-font' ) . ' !important; }'; }
    186             if ( $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-price-font-size' ) != '' ) { echo '.ewd-upcp-catalog-product-thumbnail .ewd-upcp-catalog-product-price { font-size: ' . $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-price-font-size' ) . ' !important; }'; }
    187             if ( $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-price-font-color' ) != '' ) { echo '.ewd-upcp-catalog-product-thumbnail .ewd-upcp-catalog-product-price { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-price-font-color' ) . ' !important; }'; }
    188             if ( $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-background-color' ) != '' ) { echo '.ewd-upcp-catalog-product-thumbnail { background: ' . $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-background-color' ) . ' !important; }'; }
    189 
    190             if ( $ewd_upcp_controller->settings->get_setting( 'styling-list-view-image-border-color' ) != '' ) { echo '.ewd-upcp-catalog-product-list-image-div { border: 5px solid ' . $ewd_upcp_controller->settings->get_setting( 'styling-list-view-image-border-color' ) . ' !important; }'; }
    191             if ( $ewd_upcp_controller->settings->get_setting( 'styling-list-view-box-border-color' ) != '' ) { echo '.ewd-upcp-catalog-product-list-content { border: 5px solid ' . $ewd_upcp_controller->settings->get_setting( 'styling-list-view-box-border-color' ) . ' !important; }'; }
    192             if ( $ewd_upcp_controller->settings->get_setting( 'styling-list-view-box-padding' ) != '' ) { echo '.ewd-upcp-catalog-product-list-content { padding: ' . $ewd_upcp_controller->settings->get_setting( 'styling-list-view-box-padding' ) . 'px !important; }'; }
    193             if ( $ewd_upcp_controller->settings->get_setting( 'styling-list-view-box-margin-top' ) != '' ) { echo '.ewd-upcp-catalog-product-list-content { margin-top: ' . $ewd_upcp_controller->settings->get_setting( 'styling-list-view-box-margin-top' ) . 'px !important; }'; }
    194             if ( $ewd_upcp_controller->settings->get_setting( 'styling-list-view-title-font' ) != '' ) { echo '.ewd-upcp-catalog-product-list a.ewd-upcp-product-title { font-family: ' . $ewd_upcp_controller->settings->get_setting( 'styling-list-view-title-font' ) . ' !important; }'; }
    195             if ( $ewd_upcp_controller->settings->get_setting( 'styling-list-view-title-font-size' ) != '' ) { echo '.ewd-upcp-catalog-product-list a.ewd-upcp-product-title { font-size: ' . $ewd_upcp_controller->settings->get_setting( 'styling-list-view-title-font-size' ) . ' !important; }'; }
    196             if ( $ewd_upcp_controller->settings->get_setting( 'styling-list-view-title-font-color' ) != '' ) { echo '.ewd-upcp-catalog-product-list a.ewd-upcp-product-title { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-list-view-title-font-color' ) . ' !important; }'; }
    197             if ( $ewd_upcp_controller->settings->get_setting( 'styling-list-view-price-font' ) != '' ) { echo '.ewd-upcp-catalog-product-list .ewd-upcp-catalog-product-price { font-family: ' . $ewd_upcp_controller->settings->get_setting( 'styling-list-view-price-font' ) . ' !important; }'; }
    198             if ( $ewd_upcp_controller->settings->get_setting( 'styling-list-view-price-font-size' ) != '' ) { echo '.ewd-upcp-catalog-product-list .ewd-upcp-catalog-product-price { font-size: ' . $ewd_upcp_controller->settings->get_setting( 'styling-list-view-price-font-size' ) . ' !important; }'; }
    199             if ( $ewd_upcp_controller->settings->get_setting( 'styling-list-view-price-font-color' ) != '' ) { echo '.ewd-upcp-catalog-product-list .ewd-upcp-catalog-product-price { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-list-view-price-font-color' ) . ' !important; }'; }
    200 
    201             if ( $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-image-border-color' ) != '' ) { echo '.ewd-upcp-catalog-product-detail-image-div img { border: 5px solid ' . $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-image-border-color' ) . ' !important; }'; }
    202             if ( $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-box-padding' ) != '' ) { echo '.ewd-upcp-catalog-main-block .ewd-upcp-catalog-product-detail { padding: ' . $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-box-padding' ) . 'px !important; }'; }
    203             if ( $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-box-margin' ) != '' ) { echo '.ewd-upcp-catalog-product-detail { margin-top: ' . $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-box-margin' ) . 'px !important; }'; }
    204             if ( $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-box-background-color' ) != '' ) { echo '.ewd-upcp-catalog-product-detail { background: ' . $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-box-background-color' ) . ' !important; }'; }
    205             if ( $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-border-color' ) != '' ) { echo '.ewd-upcp-catalog-main-block .ewd-upcp-catalog-product-detail, .ewd-upcp-catalog-main-block .ewd-upcp-catalog-product-detail-mid-div, .ewd-upcp-catalog-main-block .ewd-upcp-catalog-product-detail .ewd-upcp-product-action-button { border-color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-border-color' ) . ' !important; }'; }
    206             if ( $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-title-font' ) != '' ) { echo '.ewd-upcp-catalog-product-detail-mid-div a.ewd-upcp-product-title { font-family: ' . $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-title-font' ) . ' !important; }'; }
    207             if ( $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-title-font-size' ) != '' ) { echo '.ewd-upcp-catalog-product-detail-mid-div a.ewd-upcp-product-title { font-size: ' . $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-title-font-size' ) . ' !important; }'; }
    208             if ( $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-title-font-color' ) != '' ) { echo '.ewd-upcp-catalog-product-detail-mid-div a.ewd-upcp-product-title { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-title-font-color' ) . ' !important; }'; }
    209             if ( $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-price-font' ) != '' ) { echo '.ewd-upcp-catalog-product-detail-end-div .ewd-upcp-catalog-product-price { font-family: ' . $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-price-font' ) . ' !important; }'; }
    210             if ( $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-price-font-size' ) != '' ) { echo '.ewd-upcp-catalog-product-detail-end-div .ewd-upcp-catalog-product-price { font-size: ' . $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-price-font-size' ) . ' !important; }'; }
    211             if ( $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-price-font-color' ) != '' ) { echo '.ewd-upcp-catalog-product-detail-end-div .ewd-upcp-catalog-product-price { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-price-font-color' ) . ' !important; }'; }
    212 
    213             if ( $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-title-hover' ) == 'underline' ) { echo '.ewd-upcp-catalog-sidebar-sort > span:hover, .ewd-upcp-catalog-sidebar-search > span:hover, .ewd-upcp-catalog-sidebar-price-filter > span:hover, .ewd-upcp-catalog-sidebar-title:hover { text-decoration: underline !important; }'; }
    214             if ( $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-header-font' ) != '' ) { echo '.ewd-upcp-catalog-sidebar-sort > span, .ewd-upcp-catalog-sidebar-search > span, .ewd-upcp-catalog-sidebar-price-filter > span, .ewd-upcp-catalog-sidebar-title { font-family: ' . $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-header-font' ) . ' !important; }'; }
    215             if ( $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-header-font-size' ) != '' ) { echo '.ewd-upcp-catalog-sidebar-sort > span, .ewd-upcp-catalog-sidebar-search > span, .ewd-upcp-catalog-sidebar-price-filter > span, .ewd-upcp-catalog-sidebar-title { font-size: ' . $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-header-font-size' ) . ' !important; }'; }
    216             if ( $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-header-font-color' ) != '' ) { echo '.ewd-upcp-catalog-sidebar-sort > span, .ewd-upcp-catalog-sidebar-search > span, .ewd-upcp-catalog-sidebar-price-filter > span, .ewd-upcp-catalog-sidebar-title { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-header-font-color' ) . ' !important; }'; }
    217             if ( $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-header-font-weight' ) != '' ) { echo '.ewd-upcp-catalog-sidebar-sort > span, .ewd-upcp-catalog-sidebar-search > span, .ewd-upcp-catalog-sidebar-price-filter > span, .ewd-upcp-catalog-sidebar-title { font-weight: ' . $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-header-font-weight' ) . ' !important; }'; }
    218             if ( $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-checkbox-font' ) != '' ) { echo '.ewd-upcp-catalog-sidebar-content label { font-family: ' . $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-checkbox-font' ) . ' !important; }'; }
    219             if ( $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-checkbox-font-size' ) != '' ) { echo '.ewd-upcp-catalog-sidebar-content label { font-size: ' . $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-checkbox-font-size' ) . ' !important; }'; }
    220             if ( $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-checkbox-font-color' ) != '' ) { echo '.ewd-upcp-catalog-sidebar-content label { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-checkbox-font-color' ) . ' !important; }'; }
    221             if ( $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-checkbox-font-weight' ) != '' ) { echo '.ewd-upcp-catalog-sidebar-content label { font-weight: ' . $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-checkbox-font-weight' ) . ' !important; }'; }
    222 
    223             if ( $ewd_upcp_controller->settings->get_setting( 'styling-breadcrumbs-font' ) != '' ) { echo '.ewd-upcp-single-product-breadcrumb-link a { font-family: ' . $ewd_upcp_controller->settings->get_setting( 'styling-breadcrumbs-font' ) . ' !important; }'; }
    224             if ( $ewd_upcp_controller->settings->get_setting( 'styling-breadcrumbs-font-size' ) != '' ) { echo '.ewd-upcp-single-product-breadcrumb-link a { font-size: ' . $ewd_upcp_controller->settings->get_setting( 'styling-breadcrumbs-font-size' ) . ' !important; }'; }
    225             if ( $ewd_upcp_controller->settings->get_setting( 'styling-breadcrumbs-font-color' ) != '' ) { echo '.ewd-upcp-single-product-breadcrumb-link a { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-breadcrumbs-font-color' ) . ' !important; }'; }
    226             if ( $ewd_upcp_controller->settings->get_setting( 'styling-breadcrumbs-font-hover-color' ) != '' ) { echo '.ewd-upcp-single-product-breadcrumb-link a:hover { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-breadcrumbs-font-hover-color' ) . ' !important; }'; }
    227 
    228             if ( $ewd_upcp_controller->settings->get_setting( 'styling-pagination-background-color' ) != '' ) { echo '.ewd-upcp-pagination .pagination-links a { background: ' . $ewd_upcp_controller->settings->get_setting( 'styling-pagination-background-color' ) . ' !important; }'; }
    229             if ( $ewd_upcp_controller->settings->get_setting( 'styling-pagination-text-color' ) != '' ) { echo '.ewd-upcp-pagination .pagination-links a { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-pagination-text-color' ) . ' !important; }'; }
    230             if ( $ewd_upcp_controller->settings->get_setting( 'styling-pagination-background-color-hover' ) != '' ) { echo '.ewd-upcp-pagination .pagination-links a:hover { background: ' . $ewd_upcp_controller->settings->get_setting( 'styling-pagination-background-color-hover' ) . ' !important; }'; }
    231             if ( $ewd_upcp_controller->settings->get_setting( 'styling-pagination-text-color-hover' ) != '' ) { echo '.ewd-upcp-pagination .pagination-links a:hover { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-pagination-text-color-hover' ) . ' !important; }'; }
    232 
    233         echo  '</style>';
     160        $css = '';
     161        if ( $ewd_upcp_controller->settings->get_setting( 'styling-action-button-background-color' ) != '' ) { $css .= '.ewd-upcp-product-action-button { border-color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-action-button-background-color' ) . ' !important; color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-action-button-background-color' ) . ' !important; } .ewd-upcp-product-action-button:hover { background: ' . $ewd_upcp_controller->settings->get_setting( 'styling-action-button-background-color' ) . ' !important; }'; }
     162        if ( $ewd_upcp_controller->settings->get_setting( 'styling-action-button-text-color' ) != '' ) { $css .=  '.ewd-upcp-product-action-button:hover { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-action-button-text-color' ) . ' !important; }'; }
     163        if ( $ewd_upcp_controller->settings->get_setting( 'styling-compare-button-background-color' ) != '' ) { $css .=  '.ewd-upcp-product-comparison-button { background: ' . $ewd_upcp_controller->settings->get_setting( 'styling-compare-button-background-color' ) . ' !important; }'; }
     164        if ( $ewd_upcp_controller->settings->get_setting( 'styling-compare-button-text-color' ) != '' ) { $css .=  '.ewd-upcp-product-comparison-button { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-compare-button-text-color' ) . ' !important; }'; }
     165        if ( $ewd_upcp_controller->settings->get_setting( 'styling-compare-button-clicked-background-color' ) != '' ) { $css .=  '.ewd-upcp-product-comparison-button.ewd-upcp-comparison-clicked { background: ' . $ewd_upcp_controller->settings->get_setting( 'styling-compare-button-clicked-background-color' ) . ' !important; }'; }
     166        if ( $ewd_upcp_controller->settings->get_setting( 'styling-compare-button-clicked-text-color' ) != '' ) { $css .=  '.ewd-upcp-product-comparison-button.ewd-upcp-comparison-clicked { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-compare-button-clicked-text-color' ) . ' !important; }'; }
     167        if ( $ewd_upcp_controller->settings->get_setting( 'styling-compare-button-font-size' ) != '' ) { $css .=  '.ewd-upcp-product-comparison-button span { font-size: ' . $ewd_upcp_controller->settings->get_setting( 'styling-compare-button-font-size' ) . ' !important; }'; }
     168        if ( $ewd_upcp_controller->settings->get_setting( 'styling-sale-button-background-color' ) != '' ) { $css .=  '.ewd-upcp-sale-price { background: ' . $ewd_upcp_controller->settings->get_setting( 'styling-sale-button-background-color' ) . ' !important; }'; }
     169        if ( $ewd_upcp_controller->settings->get_setting( 'styling-sale-button-text-color' ) != '' ) { $css .=  '.ewd-upcp-sale-price { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-sale-button-text-color' ) . ' !important; }'; }
     170        if ( $ewd_upcp_controller->settings->get_setting( 'styling-sale-button-font-size' ) != '' ) { $css .=  '.ewd-upcp-sale-price span { font-size: ' . $ewd_upcp_controller->settings->get_setting( 'styling-compare-button-font-size' ) . ' !important; }'; }
     171        if ( $ewd_upcp_controller->settings->get_setting( 'styling-product-comparison-title-font-color' ) != '' ) { $css .=  '.ewd-upcp-product-comparison-product a { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-product-comparison-title-font-color' ) . ' !important; }'; }
     172        if ( $ewd_upcp_controller->settings->get_setting( 'styling-product-comparison-title-font-size' ) != '' ) { $css .=  '.ewd-upcp-product-comparison-product a { font-size: ' . $ewd_upcp_controller->settings->get_setting( 'styling-product-comparison-title-font-size' ) . ' !important; }'; }
     173        if ( $ewd_upcp_controller->settings->get_setting( 'styling-product-comparison-price-font-size' ) != '' ) { $css .=  '.ewd-upcp-product-comparison-price { font-size: ' . $ewd_upcp_controller->settings->get_setting( 'styling-product-comparison-price-font-size' ) . ' !important; }'; }
     174        if ( $ewd_upcp_controller->settings->get_setting( 'styling-product-comparison-price-font-color' ) != '' ) { $css .=  '.ewd-upcp-product-comparison-price { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-product-comparison-price-font-color' ) . ' !important; }'; }
     175        if ( $ewd_upcp_controller->settings->get_setting( 'styling-product-comparison-price-background-color' ) != '' ) { $css .=  '.ewd-upcp-product-comparison-price { background: ' . $ewd_upcp_controller->settings->get_setting( 'styling-product-comparison-price-background-color' ) . ' !important; }'; }
     176
     177        if ( $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-image-border-color' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-thumbnail-image-div { border: 5px solid ' . $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-image-border-color' ) . ' !important; }'; }
     178        if ( $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-box-min-height' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-thumbnail { min-height: ' . $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-box-min-height' ) . 'px !important; }'; }
     179        if ( $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-box-max-height' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-thumbnail { max-height: ' . $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-box-max-height' ) . 'px !important; }'; }
     180        if ( $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-box-padding' ) != '' ) { $css .=  '.ewd-upcp-catalog-main-block .ewd-upcp-catalog-product-thumbnail { padding: ' . $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-box-padding' ) . 'px !important; }'; }
     181        if ( $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-border-color' ) != '' ) { $css .=  '.ewd-upcp-catalog-main-block .ewd-upcp-catalog-product-thumbnail, .ewd-upcp-catalog-main-block .ewd-upcp-catalog-product-thumbnail .ewd-upcp-product-action-button { border-color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-border-color' ) . ' !important; }'; }
     182        if ( $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-title-font' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-thumbnail-body-div a { font-family: ' . $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-title-font' ) . ' !important; }'; }
     183        if ( $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-title-font-size' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-thumbnail-body-div a { font-size: ' . $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-title-font-size' ) . ' !important; }'; }
     184        if ( $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-title-font-color' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-thumbnail-body-div a { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-title-font-color' ) . ' !important; }'; }
     185        if ( $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-price-font' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-thumbnail .ewd-upcp-catalog-product-price { font-family: ' . $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-price-font' ) . ' !important; }'; }
     186        if ( $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-price-font-size' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-thumbnail .ewd-upcp-catalog-product-price { font-size: ' . $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-price-font-size' ) . ' !important; }'; }
     187        if ( $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-price-font-color' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-thumbnail .ewd-upcp-catalog-product-price { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-price-font-color' ) . ' !important; }'; }
     188        if ( $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-background-color' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-thumbnail { background: ' . $ewd_upcp_controller->settings->get_setting( 'styling-thumbnail-view-background-color' ) . ' !important; }'; }
     189
     190        if ( $ewd_upcp_controller->settings->get_setting( 'styling-list-view-image-border-color' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-list-image-div { border: 5px solid ' . $ewd_upcp_controller->settings->get_setting( 'styling-list-view-image-border-color' ) . ' !important; }'; }
     191        if ( $ewd_upcp_controller->settings->get_setting( 'styling-list-view-box-border-color' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-list-content { border: 5px solid ' . $ewd_upcp_controller->settings->get_setting( 'styling-list-view-box-border-color' ) . ' !important; }'; }
     192        if ( $ewd_upcp_controller->settings->get_setting( 'styling-list-view-box-padding' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-list-content { padding: ' . $ewd_upcp_controller->settings->get_setting( 'styling-list-view-box-padding' ) . 'px !important; }'; }
     193        if ( $ewd_upcp_controller->settings->get_setting( 'styling-list-view-box-margin-top' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-list-content { margin-top: ' . $ewd_upcp_controller->settings->get_setting( 'styling-list-view-box-margin-top' ) . 'px !important; }'; }
     194        if ( $ewd_upcp_controller->settings->get_setting( 'styling-list-view-title-font' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-list a.ewd-upcp-product-title { font-family: ' . $ewd_upcp_controller->settings->get_setting( 'styling-list-view-title-font' ) . ' !important; }'; }
     195        if ( $ewd_upcp_controller->settings->get_setting( 'styling-list-view-title-font-size' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-list a.ewd-upcp-product-title { font-size: ' . $ewd_upcp_controller->settings->get_setting( 'styling-list-view-title-font-size' ) . ' !important; }'; }
     196        if ( $ewd_upcp_controller->settings->get_setting( 'styling-list-view-title-font-color' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-list a.ewd-upcp-product-title { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-list-view-title-font-color' ) . ' !important; }'; }
     197        if ( $ewd_upcp_controller->settings->get_setting( 'styling-list-view-price-font' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-list .ewd-upcp-catalog-product-price { font-family: ' . $ewd_upcp_controller->settings->get_setting( 'styling-list-view-price-font' ) . ' !important; }'; }
     198        if ( $ewd_upcp_controller->settings->get_setting( 'styling-list-view-price-font-size' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-list .ewd-upcp-catalog-product-price { font-size: ' . $ewd_upcp_controller->settings->get_setting( 'styling-list-view-price-font-size' ) . ' !important; }'; }
     199        if ( $ewd_upcp_controller->settings->get_setting( 'styling-list-view-price-font-color' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-list .ewd-upcp-catalog-product-price { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-list-view-price-font-color' ) . ' !important; }'; }
     200
     201        if ( $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-image-border-color' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-detail-image-div img { border: 5px solid ' . $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-image-border-color' ) . ' !important; }'; }
     202        if ( $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-box-padding' ) != '' ) { $css .=  '.ewd-upcp-catalog-main-block .ewd-upcp-catalog-product-detail { padding: ' . $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-box-padding' ) . 'px !important; }'; }
     203        if ( $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-box-margin' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-detail { margin-top: ' . $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-box-margin' ) . 'px !important; }'; }
     204        if ( $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-box-background-color' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-detail { background: ' . $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-box-background-color' ) . ' !important; }'; }
     205        if ( $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-border-color' ) != '' ) { $css .=  '.ewd-upcp-catalog-main-block .ewd-upcp-catalog-product-detail, .ewd-upcp-catalog-main-block .ewd-upcp-catalog-product-detail-mid-div, .ewd-upcp-catalog-main-block .ewd-upcp-catalog-product-detail .ewd-upcp-product-action-button { border-color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-border-color' ) . ' !important; }'; }
     206        if ( $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-title-font' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-detail-mid-div a.ewd-upcp-product-title { font-family: ' . $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-title-font' ) . ' !important; }'; }
     207        if ( $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-title-font-size' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-detail-mid-div a.ewd-upcp-product-title { font-size: ' . $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-title-font-size' ) . ' !important; }'; }
     208        if ( $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-title-font-color' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-detail-mid-div a.ewd-upcp-product-title { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-title-font-color' ) . ' !important; }'; }
     209        if ( $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-price-font' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-detail-end-div .ewd-upcp-catalog-product-price { font-family: ' . $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-price-font' ) . ' !important; }'; }
     210        if ( $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-price-font-size' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-detail-end-div .ewd-upcp-catalog-product-price { font-size: ' . $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-price-font-size' ) . ' !important; }'; }
     211        if ( $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-price-font-color' ) != '' ) { $css .=  '.ewd-upcp-catalog-product-detail-end-div .ewd-upcp-catalog-product-price { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-detail-view-price-font-color' ) . ' !important; }'; }
     212
     213        if ( $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-title-hover' ) == 'underline' ) { $css .=  '.ewd-upcp-catalog-sidebar-sort > span:hover, .ewd-upcp-catalog-sidebar-search > span:hover, .ewd-upcp-catalog-sidebar-price-filter > span:hover, .ewd-upcp-catalog-sidebar-title:hover { text-decoration: underline !important; }'; }
     214        if ( $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-header-font' ) != '' ) { $css .=  '.ewd-upcp-catalog-sidebar-sort > span, .ewd-upcp-catalog-sidebar-search > span, .ewd-upcp-catalog-sidebar-price-filter > span, .ewd-upcp-catalog-sidebar-title { font-family: ' . $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-header-font' ) . ' !important; }'; }
     215        if ( $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-header-font-size' ) != '' ) { $css .=  '.ewd-upcp-catalog-sidebar-sort > span, .ewd-upcp-catalog-sidebar-search > span, .ewd-upcp-catalog-sidebar-price-filter > span, .ewd-upcp-catalog-sidebar-title { font-size: ' . $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-header-font-size' ) . ' !important; }'; }
     216        if ( $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-header-font-color' ) != '' ) { $css .=  '.ewd-upcp-catalog-sidebar-sort > span, .ewd-upcp-catalog-sidebar-search > span, .ewd-upcp-catalog-sidebar-price-filter > span, .ewd-upcp-catalog-sidebar-title { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-header-font-color' ) . ' !important; }'; }
     217        if ( $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-header-font-weight' ) != '' ) { $css .=  '.ewd-upcp-catalog-sidebar-sort > span, .ewd-upcp-catalog-sidebar-search > span, .ewd-upcp-catalog-sidebar-price-filter > span, .ewd-upcp-catalog-sidebar-title { font-weight: ' . $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-header-font-weight' ) . ' !important; }'; }
     218        if ( $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-checkbox-font' ) != '' ) { $css .=  '.ewd-upcp-catalog-sidebar-content label { font-family: ' . $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-checkbox-font' ) . ' !important; }'; }
     219        if ( $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-checkbox-font-size' ) != '' ) { $css .=  '.ewd-upcp-catalog-sidebar-content label { font-size: ' . $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-checkbox-font-size' ) . ' !important; }'; }
     220        if ( $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-checkbox-font-color' ) != '' ) { $css .=  '.ewd-upcp-catalog-sidebar-content label { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-checkbox-font-color' ) . ' !important; }'; }
     221        if ( $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-checkbox-font-weight' ) != '' ) { $css .=  '.ewd-upcp-catalog-sidebar-content label { font-weight: ' . $ewd_upcp_controller->settings->get_setting( 'styling-sidebar-checkbox-font-weight' ) . ' !important; }'; }
     222
     223        if ( $ewd_upcp_controller->settings->get_setting( 'styling-breadcrumbs-font' ) != '' ) { $css .=  '.ewd-upcp-single-product-breadcrumb-link a { font-family: ' . $ewd_upcp_controller->settings->get_setting( 'styling-breadcrumbs-font' ) . ' !important; }'; }
     224        if ( $ewd_upcp_controller->settings->get_setting( 'styling-breadcrumbs-font-size' ) != '' ) { $css .=  '.ewd-upcp-single-product-breadcrumb-link a { font-size: ' . $ewd_upcp_controller->settings->get_setting( 'styling-breadcrumbs-font-size' ) . ' !important; }'; }
     225        if ( $ewd_upcp_controller->settings->get_setting( 'styling-breadcrumbs-font-color' ) != '' ) { $css .=  '.ewd-upcp-single-product-breadcrumb-link a { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-breadcrumbs-font-color' ) . ' !important; }'; }
     226        if ( $ewd_upcp_controller->settings->get_setting( 'styling-breadcrumbs-font-hover-color' ) != '' ) { $css .=  '.ewd-upcp-single-product-breadcrumb-link a:hover { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-breadcrumbs-font-hover-color' ) . ' !important; }'; }
     227
     228        if ( $ewd_upcp_controller->settings->get_setting( 'styling-pagination-background-color' ) != '' ) { $css .=  '.ewd-upcp-pagination .pagination-links a { background: ' . $ewd_upcp_controller->settings->get_setting( 'styling-pagination-background-color' ) . ' !important; }'; }
     229        if ( $ewd_upcp_controller->settings->get_setting( 'styling-pagination-text-color' ) != '' ) { $css .=  '.ewd-upcp-pagination .pagination-links a { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-pagination-text-color' ) . ' !important; }'; }
     230        if ( $ewd_upcp_controller->settings->get_setting( 'styling-pagination-background-color-hover' ) != '' ) { $css .=  '.ewd-upcp-pagination .pagination-links a:hover { background: ' . $ewd_upcp_controller->settings->get_setting( 'styling-pagination-background-color-hover' ) . ' !important; }'; }
     231        if ( $ewd_upcp_controller->settings->get_setting( 'styling-pagination-text-color-hover' ) != '' ) { $css .=  '.ewd-upcp-pagination .pagination-links a:hover { color: ' . $ewd_upcp_controller->settings->get_setting( 'styling-pagination-text-color-hover' ) . ' !important; }'; }
     232
     233        if( ! empty( $css ) ) {
     234            echo '<style>';
     235                echo wp_strip_all_tags( $css );
     236            echo '</style>';
     237        }
    234238    }
    235239
Note: See TracChangeset for help on using the changeset viewer.