Changeset 2650578
- Timestamp:
- 12/29/2021 05:03:33 PM (3 years ago)
- Location:
- ultimate-product-catalogue
- Files:
-
- 6 added
- 126 edited
- 1 copied
-
tags/5.0.26 (copied) (copied from ultimate-product-catalogue/trunk)
-
tags/5.0.26/assets/css/ewd-upcp-helper-install-notice.css (added)
-
tags/5.0.26/assets/js/dashboard-review-ask.js (modified) (5 diffs)
-
tags/5.0.26/assets/js/ewd-upcp-admin.js (modified) (5 diffs)
-
tags/5.0.26/assets/js/ewd-upcp-helper-install-notice.js (added)
-
tags/5.0.26/assets/js/ewd-upcp-welcome-screen.js (modified) (4 diffs)
-
tags/5.0.26/assets/js/ewd-upcp.js (modified) (3 diffs)
-
tags/5.0.26/ewd-upcp-templates/catalog-header-bar.php (modified) (1 diff)
-
tags/5.0.26/ewd-upcp-templates/catalog-pagination.php (modified) (2 diffs)
-
tags/5.0.26/ewd-upcp-templates/catalog-product-content.php (modified) (1 diff)
-
tags/5.0.26/ewd-upcp-templates/catalog-product-rating.php (modified) (1 diff)
-
tags/5.0.26/ewd-upcp-templates/catalog-shortcode-attributes.php (modified) (1 diff)
-
tags/5.0.26/ewd-upcp-templates/catalog-sidebar-custom-field-checkbox.php (modified) (2 diffs)
-
tags/5.0.26/ewd-upcp-templates/catalog-sidebar-custom-field-dropdown.php (modified) (2 diffs)
-
tags/5.0.26/ewd-upcp-templates/catalog-sidebar-custom-field-radio.php (modified) (2 diffs)
-
tags/5.0.26/ewd-upcp-templates/catalog-sidebar-custom-field-slider.php (modified) (2 diffs)
-
tags/5.0.26/ewd-upcp-templates/catalog-sidebar-price-filter.php (modified) (2 diffs)
-
tags/5.0.26/ewd-upcp-templates/catalog-sidebar-taxonomy-checkbox.php (modified) (1 diff)
-
tags/5.0.26/ewd-upcp-templates/catalog-sidebar-taxonomy-dropdown.php (modified) (1 diff)
-
tags/5.0.26/ewd-upcp-templates/catalog-sidebar-taxonomy-radio.php (modified) (1 diff)
-
tags/5.0.26/ewd-upcp-templates/custom-large-single-product.php (modified) (1 diff)
-
tags/5.0.26/ewd-upcp-templates/custom-mobile-single-product.php (modified) (1 diff)
-
tags/5.0.26/ewd-upcp-templates/custom-single-product.php (modified) (1 diff)
-
tags/5.0.26/ewd-upcp-templates/default-single-product.php (modified) (1 diff)
-
tags/5.0.26/ewd-upcp-templates/shop-style-single-product.php (modified) (1 diff)
-
tags/5.0.26/ewd-upcp-templates/single-product-additional-images.php (modified) (1 diff)
-
tags/5.0.26/ewd-upcp-templates/single-product-custom-element-additional-images.php (modified) (1 diff)
-
tags/5.0.26/ewd-upcp-templates/single-product-custom-element-back-to-catalog.php (modified) (1 diff)
-
tags/5.0.26/ewd-upcp-templates/single-product-custom-element-blank.php (modified) (1 diff)
-
tags/5.0.26/ewd-upcp-templates/single-product-custom-element-categories-label.php (modified) (1 diff)
-
tags/5.0.26/ewd-upcp-templates/single-product-custom-element-categories.php (modified) (1 diff)
-
tags/5.0.26/ewd-upcp-templates/single-product-custom-element-custom-field.php (modified) (1 diff)
-
tags/5.0.26/ewd-upcp-templates/single-product-custom-element-description.php (modified) (1 diff)
-
tags/5.0.26/ewd-upcp-templates/single-product-custom-element-link.php (modified) (1 diff)
-
tags/5.0.26/ewd-upcp-templates/single-product-custom-element-main-image.php (modified) (1 diff)
-
tags/5.0.26/ewd-upcp-templates/single-product-custom-element-next-previous.php (modified) (1 diff)
-
tags/5.0.26/ewd-upcp-templates/single-product-custom-element-price-label.php (modified) (1 diff)
-
tags/5.0.26/ewd-upcp-templates/single-product-custom-element-price.php (modified) (1 diff)
-
tags/5.0.26/ewd-upcp-templates/single-product-custom-element-related-products.php (modified) (1 diff)
-
tags/5.0.26/ewd-upcp-templates/single-product-custom-element-subcategories-label.php (modified) (1 diff)
-
tags/5.0.26/ewd-upcp-templates/single-product-custom-element-subcategories.php (modified) (1 diff)
-
tags/5.0.26/ewd-upcp-templates/single-product-custom-element-tags-label.php (modified) (1 diff)
-
tags/5.0.26/ewd-upcp-templates/single-product-custom-element-tags.php (modified) (1 diff)
-
tags/5.0.26/ewd-upcp-templates/single-product-custom-element-text.php (modified) (1 diff)
-
tags/5.0.26/ewd-upcp-templates/single-product-custom-element-title.php (modified) (1 diff)
-
tags/5.0.26/ewd-upcp-templates/single-product-description.php (modified) (1 diff)
-
tags/5.0.26/ewd-upcp-templates/single-product-main-image.php (modified) (1 diff)
-
tags/5.0.26/ewd-upcp-templates/single-product-tab-faqs.php (modified) (1 diff)
-
tags/5.0.26/ewd-upcp-templates/single-product-videos.php (modified) (1 diff)
-
tags/5.0.26/ewd-upcp-templates/tabbed-single-product.php (modified) (1 diff)
-
tags/5.0.26/includes/AdminCustomFields.class.php (modified) (2 diffs)
-
tags/5.0.26/includes/AdminProductPage.class.php (modified) (9 diffs)
-
tags/5.0.26/includes/Ajax.class.php (modified) (4 diffs)
-
tags/5.0.26/includes/CustomPostTypes.class.php (modified) (11 diffs)
-
tags/5.0.26/includes/Dashboard.class.php (modified) (5 diffs)
-
tags/5.0.26/includes/DeactivationSurvey.class.php (modified) (2 diffs)
-
tags/5.0.26/includes/Export.class.php (modified) (2 diffs)
-
tags/5.0.26/includes/Helper.class.php (added)
-
tags/5.0.26/includes/Import.class.php (modified) (2 diffs)
-
tags/5.0.26/includes/InstallationWalkthrough.class.php (modified) (7 diffs)
-
tags/5.0.26/includes/Product.class.php (modified) (1 diff)
-
tags/5.0.26/includes/ReviewAsk.class.php (modified) (1 diff)
-
tags/5.0.26/includes/Widgets.class.php (modified) (10 diffs)
-
tags/5.0.26/includes/template-functions.php (modified) (1 diff)
-
tags/5.0.26/readme.txt (modified) (2 diffs)
-
tags/5.0.26/ultimate-product-catalogue.php (modified) (9 diffs)
-
tags/5.0.26/views/View.class.php (modified) (1 diff)
-
trunk/assets/css/ewd-upcp-helper-install-notice.css (added)
-
trunk/assets/js/dashboard-review-ask.js (modified) (5 diffs)
-
trunk/assets/js/ewd-upcp-admin.js (modified) (5 diffs)
-
trunk/assets/js/ewd-upcp-helper-install-notice.js (added)
-
trunk/assets/js/ewd-upcp-welcome-screen.js (modified) (4 diffs)
-
trunk/assets/js/ewd-upcp.js (modified) (3 diffs)
-
trunk/ewd-upcp-templates/catalog-header-bar.php (modified) (1 diff)
-
trunk/ewd-upcp-templates/catalog-pagination.php (modified) (2 diffs)
-
trunk/ewd-upcp-templates/catalog-product-content.php (modified) (1 diff)
-
trunk/ewd-upcp-templates/catalog-product-rating.php (modified) (1 diff)
-
trunk/ewd-upcp-templates/catalog-shortcode-attributes.php (modified) (1 diff)
-
trunk/ewd-upcp-templates/catalog-sidebar-custom-field-checkbox.php (modified) (2 diffs)
-
trunk/ewd-upcp-templates/catalog-sidebar-custom-field-dropdown.php (modified) (2 diffs)
-
trunk/ewd-upcp-templates/catalog-sidebar-custom-field-radio.php (modified) (2 diffs)
-
trunk/ewd-upcp-templates/catalog-sidebar-custom-field-slider.php (modified) (2 diffs)
-
trunk/ewd-upcp-templates/catalog-sidebar-price-filter.php (modified) (2 diffs)
-
trunk/ewd-upcp-templates/catalog-sidebar-taxonomy-checkbox.php (modified) (1 diff)
-
trunk/ewd-upcp-templates/catalog-sidebar-taxonomy-dropdown.php (modified) (1 diff)
-
trunk/ewd-upcp-templates/catalog-sidebar-taxonomy-radio.php (modified) (1 diff)
-
trunk/ewd-upcp-templates/custom-large-single-product.php (modified) (1 diff)
-
trunk/ewd-upcp-templates/custom-mobile-single-product.php (modified) (1 diff)
-
trunk/ewd-upcp-templates/custom-single-product.php (modified) (1 diff)
-
trunk/ewd-upcp-templates/default-single-product.php (modified) (1 diff)
-
trunk/ewd-upcp-templates/shop-style-single-product.php (modified) (1 diff)
-
trunk/ewd-upcp-templates/single-product-additional-images.php (modified) (1 diff)
-
trunk/ewd-upcp-templates/single-product-custom-element-additional-images.php (modified) (1 diff)
-
trunk/ewd-upcp-templates/single-product-custom-element-back-to-catalog.php (modified) (1 diff)
-
trunk/ewd-upcp-templates/single-product-custom-element-blank.php (modified) (1 diff)
-
trunk/ewd-upcp-templates/single-product-custom-element-categories-label.php (modified) (1 diff)
-
trunk/ewd-upcp-templates/single-product-custom-element-categories.php (modified) (1 diff)
-
trunk/ewd-upcp-templates/single-product-custom-element-custom-field.php (modified) (1 diff)
-
trunk/ewd-upcp-templates/single-product-custom-element-description.php (modified) (1 diff)
-
trunk/ewd-upcp-templates/single-product-custom-element-link.php (modified) (1 diff)
-
trunk/ewd-upcp-templates/single-product-custom-element-main-image.php (modified) (1 diff)
-
trunk/ewd-upcp-templates/single-product-custom-element-next-previous.php (modified) (1 diff)
-
trunk/ewd-upcp-templates/single-product-custom-element-price-label.php (modified) (1 diff)
-
trunk/ewd-upcp-templates/single-product-custom-element-price.php (modified) (1 diff)
-
trunk/ewd-upcp-templates/single-product-custom-element-related-products.php (modified) (1 diff)
-
trunk/ewd-upcp-templates/single-product-custom-element-subcategories-label.php (modified) (1 diff)
-
trunk/ewd-upcp-templates/single-product-custom-element-subcategories.php (modified) (1 diff)
-
trunk/ewd-upcp-templates/single-product-custom-element-tags-label.php (modified) (1 diff)
-
trunk/ewd-upcp-templates/single-product-custom-element-tags.php (modified) (1 diff)
-
trunk/ewd-upcp-templates/single-product-custom-element-text.php (modified) (1 diff)
-
trunk/ewd-upcp-templates/single-product-custom-element-title.php (modified) (1 diff)
-
trunk/ewd-upcp-templates/single-product-description.php (modified) (1 diff)
-
trunk/ewd-upcp-templates/single-product-main-image.php (modified) (1 diff)
-
trunk/ewd-upcp-templates/single-product-tab-faqs.php (modified) (1 diff)
-
trunk/ewd-upcp-templates/single-product-videos.php (modified) (1 diff)
-
trunk/ewd-upcp-templates/tabbed-single-product.php (modified) (1 diff)
-
trunk/includes/AdminCustomFields.class.php (modified) (2 diffs)
-
trunk/includes/AdminProductPage.class.php (modified) (9 diffs)
-
trunk/includes/Ajax.class.php (modified) (4 diffs)
-
trunk/includes/CustomPostTypes.class.php (modified) (11 diffs)
-
trunk/includes/Dashboard.class.php (modified) (5 diffs)
-
trunk/includes/DeactivationSurvey.class.php (modified) (2 diffs)
-
trunk/includes/Export.class.php (modified) (2 diffs)
-
trunk/includes/Helper.class.php (added)
-
trunk/includes/Import.class.php (modified) (2 diffs)
-
trunk/includes/InstallationWalkthrough.class.php (modified) (7 diffs)
-
trunk/includes/Product.class.php (modified) (1 diff)
-
trunk/includes/ReviewAsk.class.php (modified) (1 diff)
-
trunk/includes/Widgets.class.php (modified) (10 diffs)
-
trunk/includes/template-functions.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/ultimate-product-catalogue.php (modified) (9 diffs)
-
trunk/views/View.class.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
ultimate-product-catalogue/tags/5.0.26/assets/js/dashboard-review-ask.js
r2638260 r2650578 3 3 4 4 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 ); 12 jQuery.post( ajaxurl, data, function() {} ); 13 }); 8 14 9 15 jQuery( '.ewd-upcp-review-ask-yes' ).on( 'click', function() { … … 17 23 jQuery( '.ewd-upcp-review-ask-yes' ).addClass( 'ewd-upcp-hidden' ); 18 24 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() {} ); 21 33 }); 22 34 … … 28 40 jQuery( '.ewd-upcp-review-ask-actions' ).addClass( 'ewd-upcp-hidden' ); 29 41 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() {} ); 32 50 }); 33 51 34 52 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 = {}; 37 54 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' ); 39 63 }); 40 64 … … 43 67 jQuery( '.ewd-upcp-review-ask-thank-you-text' ).removeClass( 'ewd-upcp-hidden' ); 44 68 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() {} ); 47 77 }); 48 78 … … 50 80 var feedback = jQuery( '.ewd-upcp-review-ask-feedback-explanation textarea' ).val(); 51 81 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() {} );54 82 55 var data = 'ask_review_time=1000&action=ewd_upcp_hide_review_ask'; 56 jQuery.post( ajaxurl, data, function() {} ); 83 var params = {}; 57 84 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' ); 61 105 }); 62 106 }); -
ultimate-product-catalogue/tags/5.0.26/assets/js/ewd-upcp-admin.js
r2638260 r2650578 222 222 update: function() { 223 223 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; 225 231 jQuery.post( ajaxurl, data, function( response ) {}); 226 232 } … … 234 240 update: function() { 235 241 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; 237 249 jQuery.post( ajaxurl, data, function( response ) {}); 238 250 } … … 253 265 update: function() { 254 266 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; 256 274 jQuery.post( ajaxurl, data, function( response ) {}); 257 275 } … … 620 638 event.preventDefault(); 621 639 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 ); 625 648 jQuery.post( ajaxurl, data, function( response ) { 626 649 627 650 jQuery( '.gridster-mobile-save' ).after( '<div class="ewd-upcp-gridster-response">Layout Saved!</div>' ); 628 651 … … 677 700 event.preventDefault(); 678 701 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 ); 682 710 jQuery.post( ajaxurl, data, function( response ) { 683 711 684 712 jQuery( '.gridster-large-save' ).after( '<div class="ewd-upcp-gridster-response">Layout Saved!</div>' ); 685 713 -
ultimate-product-catalogue/tags/5.0.26/assets/js/ewd-upcp-welcome-screen.js
r2638260 r2650578 25 25 jQuery('.ewd-upcp-welcome-screen-add-category-description textarea').val(''); 26 26 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 ); 28 35 jQuery.post(ajaxurl, data, function(response) { 29 36 var HTML = '<tr class="upcp-welcome-screen-category">'; … … 50 57 jQuery('.ewd-upcp-welcome-screen-add-catalog-page-name input').val(''); 51 58 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 ); 53 68 jQuery.post(ajaxurl, data, function(response) {}); 54 69 … … 62 77 var product_search = jQuery.map( jQuery( 'input[name="product_search\\[\\]"]:checked' ), function( n, i ) { return n.value; } ).join( ',' ); 63 78 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 ); 65 89 jQuery.post(ajaxurl, data, function(response) { 66 90 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>'); … … 85 109 jQuery('.ewd-upcp-welcome-screen-add-product-price input').val(''); 86 110 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 ); 88 122 jQuery.post(ajaxurl, data, function(response) { 89 123 var HTML = '<tr class="upcp-welcome-screen-product">'; -
ultimate-product-catalogue/tags/5.0.26/assets/js/ewd-upcp.js
r2638260 r2650578 525 525 jQuery( '.ewd-upcp-cart-item-count' ).html( +jQuery( '.ewd-upcp-cart-item-count' ).html() + 1 ); 526 526 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 ); 528 534 jQuery.post( ajaxurl, data, function( response ) {} ); 529 535 }); … … 535 541 jQuery( '.ewd-upcp-cart-item-count' ).html( '0' ); 536 542 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 ) {} ); 539 550 }); 540 551 } … … 867 878 window.history.replaceState( null, null, url ); 868 879 869 var data = 'id=' + id + '&excluded_views=' + excluded_views + '&orderby=' + orderby + '&order=' + order + '&ajax_url=' + ajax_url + '¤t_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 ); 870 902 871 903 return data; -
ultimate-product-catalogue/tags/5.0.26/ewd-upcp-templates/catalog-header-bar.php
r2638260 r2650578 3 3 <?php foreach ( $this->get_catalog_views() as $catalog_view ) { ?> 4 4 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> 6 6 7 7 <?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 ); ?>'> 2 2 3 3 <span class='displaying-num'> 4 4 5 <span class='product-count'><?php echo $this->product_count; ?></span>5 <span class='product-count'><?php echo esc_html( $this->product_count ); ?></span> 6 6 7 7 <?php echo esc_html( $this->get_label( 'label-products-pagination' ) ); ?> … … 18 18 <?php echo esc_html( $this->get_label( 'label-page' ) ); ?> 19 19 20 <span class='current-page'><?php echo $this->current_page; ?></span>20 <span class='current-page'><?php echo esc_html( $this->current_page ); ?></span> 21 21 22 22 <?php echo esc_html( $this->get_label( 'label-pagination-of' ) ); ?> 23 23 24 <span class='total-pages'><?php echo $this->max_pages; ?></span>24 <span class='total-pages'><?php echo esc_html( $this->max_pages ); ?></span> 25 25 26 26 </span> -
ultimate-product-catalogue/tags/5.0.26/ewd-upcp-templates/catalog-product-content.php
r2638260 r2650578 2 2 3 3 <div class='ewd-upcp-catalog-product-description'> 4 <?php echo $this->product->description; ?>4 <?php echo esc_html( $this->product->description ); ?> 5 5 </div> 6 6 -
ultimate-product-catalogue/tags/5.0.26/ewd-upcp-templates/catalog-product-rating.php
r2638260 r2650578 3 3 <?php if ( empty( $average_rating ) ) { return; } ?> 4 4 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 ); ?>'> 6 6 7 7 <?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 ); ?>' /> 6 6 <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 ); ?>'> 2 2 3 3 <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' : '' ); ?>'> … … 7 7 <?php foreach ( $this->sidebar_custom_fields[ $this->custom_field->id ] as $field_value => $field_count ) { ?> 8 8 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 ); ?>'> 10 10 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' : '' ); ?> > 12 12 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 ); ?>'> 14 14 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> 16 16 17 17 </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 ); ?>'> 2 2 3 3 <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' : '' ); ?>'> … … 15 15 <option value='<?php echo esc_attr( $field_value ); ?>' <?php echo ( $this->is_custom_field_value_selected( $field_value ) ? 'selected' : '' ); ?>> 16 16 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> 18 18 19 19 </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 ); ?>'> 2 2 3 3 <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' : '' ); ?>'> … … 7 7 <?php foreach ( $this->sidebar_custom_fields[ $this->custom_field->id ] as $field_value => $field_count ) { ?> 8 8 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 ); ?>'> 10 10 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' : '' ); ?> > 12 12 13 13 <label class='ewd-upcp-catalog-sidebar-custom-field-value-label'> 14 14 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> 16 16 17 17 </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 ); ?>'> 2 2 3 3 <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' : '' ); ?>'> … … 5 5 </div> 6 6 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> 8 8 9 9 <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 13 13 <?php $this->maybe_print_currency_symbol( 'before' ); ?> 14 14 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 ); ?>' /> 16 16 17 17 <?php $this->maybe_print_currency_symbol( 'after' ); ?> … … 25 25 <?php $this->maybe_print_currency_symbol( 'before' ); ?> 26 26 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 ); ?>' /> 28 28 29 29 <?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 ); ?>'> 2 2 3 3 <?php $this->maybe_print_taxonomy_image(); ?> 4 4 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' : '' ); ?> > 6 6 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 ); ?>'> 8 8 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> 10 10 11 11 </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' : '' ); ?> > 2 2 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> 4 4 5 5 </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 ); ?>'> 2 2 3 3 <?php $this->maybe_print_taxonomy_image(); ?> 4 4 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' : '' ); ?> > 6 6 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 ); ?>'> 8 8 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> 10 10 11 11 </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'> 2 2 3 3 <?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'> 2 2 3 3 <?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'> 2 2 3 3 <?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'> 2 2 3 3 <?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'> 2 2 3 3 <?php $this->print_product_breadcrumbs(); ?> -
ultimate-product-catalogue/tags/5.0.26/ewd-upcp-templates/single-product-additional-images.php
r2638260 r2650578 3 3 <?php foreach ( $this->product->get_all_images() as $count => $image ) { ?> 4 4 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'> 7 7 </a> 8 8 9 <?php } ?> 9 <?php } ?> 10 10 11 11 </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'> 2 2 3 3 <?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'> 2 2 3 3 <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'> 2 2 3 3 </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'> 2 2 3 3 <?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'> 2 2 3 3 <?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'> 2 2 3 <?php echo $this->product->custom_fields[ $this->element->element_id ]; ?>3 <?php echo esc_html( $this->product->custom_fields[ $this->element->element_id ] ); ?> 4 4 5 5 </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'> 2 2 3 3 <?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'> 2 2 3 3 <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'> 2 2 3 3 <?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'> 2 2 3 3 <?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'> 2 2 3 3 <?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'> 2 2 3 3 <?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'> 2 2 3 3 <?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'> 2 2 3 3 <?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'> 2 2 3 3 <?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'> 2 2 3 3 <?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'> 2 2 3 3 <?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'> 2 2 3 3 <?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'> 2 2 3 3 <?php $this->print_title(); ?> -
ultimate-product-catalogue/tags/5.0.26/ewd-upcp-templates/single-product-description.php
r2638260 r2650578 1 1 <div class='ewd-upcp-single-product-description'> 2 2 3 <?php echo $this->product->get_product_description(); ?>3 <?php echo wp_kses_post( $this->product->get_product_description() ); ?> 4 4 5 5 </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() ); ?>'> 2 2 3 3 <?php echo $this->product->get_image(); ?> -
ultimate-product-catalogue/tags/5.0.26/ewd-upcp-templates/single-product-tab-faqs.php
r2638260 r2650578 3 3 <?php $ufaq_product_category = get_term_by( 'name', $this->product->name, 'ufaq-category' ); ?> 4 4 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() ) . "']" ); ?> 6 6 7 7 </div> -
ultimate-product-catalogue/tags/5.0.26/ewd-upcp-templates/single-product-videos.php
r2638260 r2650578 7 7 </div> */ ?> 8 8 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 ); ?>'> 10 10 11 11 <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'> 2 2 3 3 <?php $this->print_product_breadcrumbs(); ?> -
ultimate-product-catalogue/tags/5.0.26/includes/AdminCustomFields.class.php
r2638260 r2650578 14 14 // Add the admin menu 15 15 add_action( 'admin_menu', array( $this, 'add_menu_page' ), 12 ); 16 17 // Enqueue admin scripts18 add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ), 12 );19 16 } 20 17 … … 221 218 do_action( 'ewd_upcp_custom_fields_updated' ); 222 219 } 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 }234 220 } 235 221 } // endif; -
ultimate-product-catalogue/tags/5.0.26/includes/AdminProductPage.class.php
r2638260 r2650578 399 399 <li> 400 400 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> 402 402 403 403 </li> … … 417 417 <?php foreach ( $gridster as $grid_element ) { ?> 418 418 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;'> 420 420 421 421 <?php echo substr( $grid_element->element_type, 0, strpos( $grid_element->element_type, '<' ) ); ?> … … 426 426 427 427 <textarea class='ewd-upcp-pb-textarea'> 428 <?php echo $grid_element->element_id; ?>428 <?php echo esc_textarea( $grid_element->element_id ); ?> 429 429 </textarea> 430 430 … … 500 500 <li> 501 501 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> 503 503 504 504 </li> … … 518 518 <?php foreach ( $gridster as $grid_element ) { ?> 519 519 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;'> 521 521 522 522 <?php echo substr( $grid_element->element_type, 0, strpos( $grid_element->element_type, '<' ) ); ?> … … 527 527 528 528 <textarea class='ewd-upcp-pb-textarea'> 529 <?php echo $grid_element->element_id; ?>529 <?php echo esc_textarea( $grid_element->element_id ); ?> 530 530 </textarea> 531 531 … … 537 537 538 538 </ul> 539 539 540 540 </div> 541 541 … … 563 563 564 564 </div> 565 565 566 566 </form> 567 567 568 568 </div> 569 569 … … 611 611 612 612 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 } 613 623 614 624 $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 32 32 global $ewd_upcp_controller; 33 33 34 // Authenticate request 35 if ( ! check_ajax_referer( 'ewd-upcp-js', 'nonce' ) ) { 36 ewdUpcpHelper::bad_nonce_ajax(); 37 } 38 34 39 $product_id = intval( $_POST['product_id'] ); 35 40 … … 43 48 public function update_catalog() { 44 49 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 46 56 $args = array( 47 57 'sidebar' => 'no', … … 112 122 global $woocommerce; 113 123 124 // Authenticate request 125 if ( ! check_ajax_referer( 'ewd-upcp-js', 'nonce' ) ) { 126 ewdUpcpHelper::bad_nonce_ajax(); 127 } 128 114 129 setcookie( 'upcp_cart_products', '', time() - 3600, '/' ); 115 130 … … 129 144 global $ewd_upcp_controller; 130 145 global $woocommerce; 146 147 // Authenticate request 148 if ( ! check_ajax_referer( 'ewd-upcp-js', 'nonce' ) ) { 149 ewdUpcpHelper::bad_nonce_ajax(); 150 } 131 151 132 152 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 389 389 ?> 390 390 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 ); ?>"> 392 392 393 393 <div class='ewd-upcp-meta-field'> … … 612 612 613 613 <?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> 615 615 <?php } ?> 616 616 … … 628 628 629 629 <?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> 631 631 <?php } ?> 632 632 … … 658 658 659 659 <?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> 661 661 <?php } ?> 662 662 … … 676 676 677 677 <?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> 679 679 <?php } ?> 680 680 … … 870 870 <?php foreach ( $products as $product ) { ?> 871 871 <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 ); ?>' /> 873 873 <span class='ewd-upcp-admin-checkbox'></span> <span><?php echo esc_html( $product->post_title ); ?></span> 874 874 </label> … … 885 885 <?php foreach ( $categories as $category ) { ?> 886 886 <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 ); ?>' /> 888 888 <span class='ewd-upcp-admin-checkbox'></span> <span><?php echo esc_html( $category->name ); ?></span> 889 889 </label> … … 904 904 <div class='ewd-upcp-catalog-meta-current-items'> 905 905 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 ); ?>"> 907 907 908 908 <table class='ewd-upcp-catalog-meta-items'> … … 936 936 <td> 937 937 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 ); ?>' /> 941 941 942 942 <?php echo esc_html( $item_name ) ?> … … 1257 1257 */ 1258 1258 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 } 1259 1269 1260 1270 $ids = is_array( $_POST['tag'] ) ? array_map( 'intval', $_POST['tag'] ) : array(); … … 1497 1507 */ 1498 1508 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 } 1499 1519 1500 1520 $ids = is_array( $_POST['post'] ) ? array_map( 'intval', $_POST['post'] ) : array(); -
ultimate-product-catalogue/tags/5.0.26/includes/Dashboard.class.php
r2638260 r2650578 15 15 public function __construct() { 16 16 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') );22 17 23 18 if ( ! empty( $_POST['ewd_upcp_reset_settings'] ) ) { … … 62 57 } 63 58 64 // Enqueues the admin script so that our hacky sub-menu opening function can run65 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 75 59 public function display_dashboard_screen() { 76 60 global $ewd_upcp_controller; … … 100 84 $premium_info = apply_filters( 'ewd_dashboard_top', $premium_info, 'UPCP', 'https://www.etoilewebdesign.com/license-payment/?Selected=UPCP&Quantity=1' ); 101 85 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 ); 103 108 } ?> 104 109 105 110 <div class="ewd-upcp-dashboard-new-widget-box ewd-widget-box-full" id="ewd-upcp-dashboard-support-widget-box"> 106 111 <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"> ▼</span><span id="ewd-upcp-dash-mobile-support-up-caret"> ▲</span></div> … … 151 156 foreach ( $catalogs as $catalog ) { ?> 152 157 <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> 155 160 </tr> 156 161 <?php } … … 228 233 229 234 <?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/' ); 231 236 232 237 echo apply_filters( 'ewd_trial_button', $trial_info, 'UPCP' ); -
ultimate-product-catalogue/tags/5.0.26/includes/DeactivationSurvey.class.php
r2638260 r2650578 55 55 <div class="ewd-upcp-deactivate-survey-modal" id="ewd-upcp-deactivate-survey-ultimate-product-catalogue"> 56 56 <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 ); ?>"> 58 58 <span class="ewd-upcp-deactivate-survey-title"><span class="dashicons dashicons-testimonial"></span><?php echo ' ' . __( 'Quick Feedback', 'ultimate-product-catalogue' ); ?></span> 59 59 <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> … … 61 61 <?php foreach ( $options as $id => $option ) : ?> 62 62 <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> 66 66 </label> 67 67 <?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'] ); ?>" /> 69 69 <?php endif; ?> 70 70 </div> -
ultimate-product-catalogue/tags/5.0.26/includes/Export.class.php
r2638260 r2650578 21 21 22 22 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' ) );25 23 } 26 24 … … 171 169 } 172 170 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 184 171 } 185 172 -
ultimate-product-catalogue/tags/5.0.26/includes/Import.class.php
r2638260 r2650578 19 19 20 20 if ( isset( $_POST['ewdupcpImport'] ) ) { add_action( 'admin_init', array($this, 'import_products' )); } 21 22 add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_import_scripts' ) );23 21 } 24 22 … … 376 374 } 377 375 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 389 376 public function display_notice() { 390 377 -
ultimate-product-catalogue/tags/5.0.26/includes/InstallationWalkthrough.class.php
r2638260 r2650578 80 80 */ 81 81 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 } 82 92 83 93 $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(); 91 101 } 92 102 … … 96 106 */ 97 107 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 } 98 118 99 119 $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_TYPE104 );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(); 146 166 } 147 167 … … 151 171 */ 152 172 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 } 153 183 154 184 $ewd_upcp_options = get_option( 'ewd-upcp-settings' ); … … 160 190 161 191 update_option( 'ewd-upcp-settings', $ewd_upcp_options ); 162 163 exit();192 193 exit(); 164 194 } 165 195 … … 169 199 */ 170 200 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 } 171 211 172 212 $args = array( … … 220 260 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 ); 221 261 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 ); 222 270 } 223 271 … … 332 380 <fieldset> 333 381 <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 /> 335 383 <p><?php _e('What currency symbol, if any, should be displayed before or after the price? Leave blank for none.', 'ultimate-product-catalogue'); ?></p> 336 384 </fieldset> -
ultimate-product-catalogue/tags/5.0.26/includes/Product.class.php
r2638260 r2650578 506 506 $image_url = $this->get_main_image_url(); 507 507 508 return '<img class="ewd-upcp-product-image" src="' . $image_url. '" />';508 return '<img class="ewd-upcp-product-image" src="' . esc_url( $image_url ) . '" />'; 509 509 } 510 510 -
ultimate-product-catalogue/tags/5.0.26/includes/ReviewAsk.class.php
r2638260 r2650578 74 74 wp_enqueue_style( 'ewd-upcp-review-ask-css', EWD_UPCP_PLUGIN_URL . '/assets/css/dashboard-review-ask.css' ); 75 75 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 ); 76 84 } 77 85 78 86 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 } 79 97 80 98 $ask_review_time = sanitize_text_field($_POST['ask_review_time']); 81 99 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 } 85 103 86 die();104 die(); 87 105 } 88 106 89 107 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 90 119 $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']); 94 123 95 wp_mail('contact@etoilewebdesign.com', 'UPCP Feedback - Dashboard Form', $feedback, $headers);124 wp_mail('contact@etoilewebdesign.com', 'UPCP Feedback - Dashboard Form', $feedback, $headers); 96 125 97 die();126 die(); 98 127 } 99 128 } -
ultimate-product-catalogue/tags/5.0.26/includes/Widgets.class.php
r2638260 r2650578 60 60 public function widget( $args, $instance ) { 61 61 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'] ); 65 65 } 66 66 … … 79 79 80 80 <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 ); ?>"> 91 91 </p> 92 92 … … 133 133 public function widget( $args, $instance ) { 134 134 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'] ); 138 138 } 139 139 … … 152 152 153 153 <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 ); ?>"> 164 164 </p> 165 165 … … 206 206 public function widget( $args, $instance ) { 207 207 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'] ); 211 211 } 212 212 … … 225 225 226 226 <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 ); ?>"> 237 237 </p> 238 238 … … 279 279 public function widget( $args, $instance ) { 280 280 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'] ); 284 284 } 285 285 … … 298 298 299 299 <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 ); ?>"> 310 310 </p> 311 311 … … 352 352 public function widget( $args, $instance ) { 353 353 354 echo $args['before_widget'];354 echo esc_html( $args['before_widget'] ); 355 355 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'] ) . "' />"; 360 360 echo "</form>"; 361 361 echo "</div>"; 362 echo $args['after_widget'];362 echo esc_html( $args['after_widget'] ); 363 363 } 364 364 … … 377 377 378 378 <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 ); ?>"> 389 389 </p> 390 390 -
ultimate-product-catalogue/tags/5.0.26/includes/template-functions.php
r2638260 r2650578 180 180 181 181 if ( count( $classes ) ) { 182 return ' class="' . join( ' ', $classes) . '"';182 return ' class="' . esc_attr( join( ' ', $classes ) ) . '"'; 183 183 } 184 184 } -
ultimate-product-catalogue/tags/5.0.26/readme.txt
r2638260 r2650578 5 5 Requires at least: 4.0.0 6 6 Tested up to: 5.8 7 Stable tag: 5.0.26 7 8 License: GPLv3 8 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 332 333 333 334 == Changelog == 335 336 = 5.0.26 (2021-12-29) = 337 - Updating nonce and authorization checks for AJAX calls. 338 - Updating sanitizing and escaping. 334 339 335 340 = 5.0.25 (2021-12-01) = -
ultimate-product-catalogue/tags/5.0.26/ultimate-product-catalogue.php
r2638260 r2650578 8 8 Terms and Conditions: https://www.etoilewebdesign.com/plugin-terms-and-conditions/ 9 9 Text Domain: ultimate-product-catalogue 10 Version: 5.0.2 510 Version: 5.0.26 11 11 */ 12 12 … … 48 48 define( 'EWD_UPCP_PLUGIN_FNAME', plugin_basename( __FILE__ ) ); 49 49 define( 'EWD_UPCP_TEMPLATE_DIR', 'ewd-upcp-templates' ); 50 define( 'EWD_UPCP_VERSION', '5.0.2 3' );50 define( 'EWD_UPCP_VERSION', '5.0.26' ); 51 51 52 52 define( 'EWD_UPCP_PRODUCT_POST_TYPE', 'upcp_product' ); … … 72 72 require_once( EWD_UPCP_PLUGIN_DIR . '/includes/Dashboard.class.php' ); 73 73 require_once( EWD_UPCP_PLUGIN_DIR . '/includes/DeactivationSurvey.class.php' ); 74 require_once( EWD_UPCP_PLUGIN_DIR . '/includes/Helper.class.php' ); 74 75 require_once( EWD_UPCP_PLUGIN_DIR . '/includes/Export.class.php' ); 75 76 require_once( EWD_UPCP_PLUGIN_DIR . '/includes/Import.class.php' ); … … 143 144 144 145 add_action( 'admin_notices', array( $this, 'display_header_area' ) ); 146 add_action( 'admin_notices', array( $this, 'maybe_display_helper_notice' ) ); 145 147 146 148 add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_assets' ), 10, 1 ); … … 150 152 151 153 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' ) ); 152 156 } 153 157 … … 259 263 global $post; 260 264 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 261 274 $post_type = is_object( $post ) ? $post->post_type : ''; 262 275 263 276 $screen = get_current_screen(); 264 277 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(); 269 305 270 306 wp_enqueue_style( 'ewd-upcp-admin-css', EWD_UPCP_PLUGIN_URL . '/assets/css/ewd-upcp-admin.css', array(), EWD_UPCP_VERSION ); … … 279 315 280 316 $args = array( 317 'nonce' => wp_create_nonce( 'ewd-upcp-admin-js' ), 281 318 'product_add' => ( $this->permissions->check_permission( 'premium' ) or sizeof( $products ) < 100 ), 282 319 ); … … 301 338 wp_register_script( 'ewd-upcp-gridster', EWD_UPCP_PLUGIN_URL . '/assets/js/jquery.gridster.js', array( 'jquery' ), EWD_UPCP_VERSION, true ); 302 339 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 ); 303 348 } 304 349 … … 475 520 } 476 521 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 477 569 } 478 570 } // endif; -
ultimate-product-catalogue/tags/5.0.26/views/View.class.php
r2638260 r2650578 158 158 global $ewd_upcp_controller; 159 159 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 } 234 238 } 235 239 -
ultimate-product-catalogue/trunk/assets/js/dashboard-review-ask.js
r2638260 r2650578 3 3 4 4 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 ); 12 jQuery.post( ajaxurl, data, function() {} ); 13 }); 8 14 9 15 jQuery( '.ewd-upcp-review-ask-yes' ).on( 'click', function() { … … 17 23 jQuery( '.ewd-upcp-review-ask-yes' ).addClass( 'ewd-upcp-hidden' ); 18 24 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() {} ); 21 33 }); 22 34 … … 28 40 jQuery( '.ewd-upcp-review-ask-actions' ).addClass( 'ewd-upcp-hidden' ); 29 41 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() {} ); 32 50 }); 33 51 34 52 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 = {}; 37 54 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' ); 39 63 }); 40 64 … … 43 67 jQuery( '.ewd-upcp-review-ask-thank-you-text' ).removeClass( 'ewd-upcp-hidden' ); 44 68 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() {} ); 47 77 }); 48 78 … … 50 80 var feedback = jQuery( '.ewd-upcp-review-ask-feedback-explanation textarea' ).val(); 51 81 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() {} );54 82 55 var data = 'ask_review_time=1000&action=ewd_upcp_hide_review_ask'; 56 jQuery.post( ajaxurl, data, function() {} ); 83 var params = {}; 57 84 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' ); 61 105 }); 62 106 }); -
ultimate-product-catalogue/trunk/assets/js/ewd-upcp-admin.js
r2638260 r2650578 222 222 update: function() { 223 223 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; 225 231 jQuery.post( ajaxurl, data, function( response ) {}); 226 232 } … … 234 240 update: function() { 235 241 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; 237 249 jQuery.post( ajaxurl, data, function( response ) {}); 238 250 } … … 253 265 update: function() { 254 266 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; 256 274 jQuery.post( ajaxurl, data, function( response ) {}); 257 275 } … … 620 638 event.preventDefault(); 621 639 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 ); 625 648 jQuery.post( ajaxurl, data, function( response ) { 626 649 627 650 jQuery( '.gridster-mobile-save' ).after( '<div class="ewd-upcp-gridster-response">Layout Saved!</div>' ); 628 651 … … 677 700 event.preventDefault(); 678 701 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 ); 682 710 jQuery.post( ajaxurl, data, function( response ) { 683 711 684 712 jQuery( '.gridster-large-save' ).after( '<div class="ewd-upcp-gridster-response">Layout Saved!</div>' ); 685 713 -
ultimate-product-catalogue/trunk/assets/js/ewd-upcp-welcome-screen.js
r2638260 r2650578 25 25 jQuery('.ewd-upcp-welcome-screen-add-category-description textarea').val(''); 26 26 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 ); 28 35 jQuery.post(ajaxurl, data, function(response) { 29 36 var HTML = '<tr class="upcp-welcome-screen-category">'; … … 50 57 jQuery('.ewd-upcp-welcome-screen-add-catalog-page-name input').val(''); 51 58 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 ); 53 68 jQuery.post(ajaxurl, data, function(response) {}); 54 69 … … 62 77 var product_search = jQuery.map( jQuery( 'input[name="product_search\\[\\]"]:checked' ), function( n, i ) { return n.value; } ).join( ',' ); 63 78 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 ); 65 89 jQuery.post(ajaxurl, data, function(response) { 66 90 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>'); … … 85 109 jQuery('.ewd-upcp-welcome-screen-add-product-price input').val(''); 86 110 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 ); 88 122 jQuery.post(ajaxurl, data, function(response) { 89 123 var HTML = '<tr class="upcp-welcome-screen-product">'; -
ultimate-product-catalogue/trunk/assets/js/ewd-upcp.js
r2638260 r2650578 525 525 jQuery( '.ewd-upcp-cart-item-count' ).html( +jQuery( '.ewd-upcp-cart-item-count' ).html() + 1 ); 526 526 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 ); 528 534 jQuery.post( ajaxurl, data, function( response ) {} ); 529 535 }); … … 535 541 jQuery( '.ewd-upcp-cart-item-count' ).html( '0' ); 536 542 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 ) {} ); 539 550 }); 540 551 } … … 867 878 window.history.replaceState( null, null, url ); 868 879 869 var data = 'id=' + id + '&excluded_views=' + excluded_views + '&orderby=' + orderby + '&order=' + order + '&ajax_url=' + ajax_url + '¤t_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 ); 870 902 871 903 return data; -
ultimate-product-catalogue/trunk/ewd-upcp-templates/catalog-header-bar.php
r2638260 r2650578 3 3 <?php foreach ( $this->get_catalog_views() as $catalog_view ) { ?> 4 4 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> 6 6 7 7 <?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 ); ?>'> 2 2 3 3 <span class='displaying-num'> 4 4 5 <span class='product-count'><?php echo $this->product_count; ?></span>5 <span class='product-count'><?php echo esc_html( $this->product_count ); ?></span> 6 6 7 7 <?php echo esc_html( $this->get_label( 'label-products-pagination' ) ); ?> … … 18 18 <?php echo esc_html( $this->get_label( 'label-page' ) ); ?> 19 19 20 <span class='current-page'><?php echo $this->current_page; ?></span>20 <span class='current-page'><?php echo esc_html( $this->current_page ); ?></span> 21 21 22 22 <?php echo esc_html( $this->get_label( 'label-pagination-of' ) ); ?> 23 23 24 <span class='total-pages'><?php echo $this->max_pages; ?></span>24 <span class='total-pages'><?php echo esc_html( $this->max_pages ); ?></span> 25 25 26 26 </span> -
ultimate-product-catalogue/trunk/ewd-upcp-templates/catalog-product-content.php
r2638260 r2650578 2 2 3 3 <div class='ewd-upcp-catalog-product-description'> 4 <?php echo $this->product->description; ?>4 <?php echo esc_html( $this->product->description ); ?> 5 5 </div> 6 6 -
ultimate-product-catalogue/trunk/ewd-upcp-templates/catalog-product-rating.php
r2638260 r2650578 3 3 <?php if ( empty( $average_rating ) ) { return; } ?> 4 4 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 ); ?>'> 6 6 7 7 <?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 ); ?>' /> 6 6 <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 ); ?>'> 2 2 3 3 <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' : '' ); ?>'> … … 7 7 <?php foreach ( $this->sidebar_custom_fields[ $this->custom_field->id ] as $field_value => $field_count ) { ?> 8 8 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 ); ?>'> 10 10 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' : '' ); ?> > 12 12 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 ); ?>'> 14 14 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> 16 16 17 17 </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 ); ?>'> 2 2 3 3 <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' : '' ); ?>'> … … 15 15 <option value='<?php echo esc_attr( $field_value ); ?>' <?php echo ( $this->is_custom_field_value_selected( $field_value ) ? 'selected' : '' ); ?>> 16 16 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> 18 18 19 19 </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 ); ?>'> 2 2 3 3 <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' : '' ); ?>'> … … 7 7 <?php foreach ( $this->sidebar_custom_fields[ $this->custom_field->id ] as $field_value => $field_count ) { ?> 8 8 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 ); ?>'> 10 10 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' : '' ); ?> > 12 12 13 13 <label class='ewd-upcp-catalog-sidebar-custom-field-value-label'> 14 14 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> 16 16 17 17 </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 ); ?>'> 2 2 3 3 <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' : '' ); ?>'> … … 5 5 </div> 6 6 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> 8 8 9 9 <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 13 13 <?php $this->maybe_print_currency_symbol( 'before' ); ?> 14 14 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 ); ?>' /> 16 16 17 17 <?php $this->maybe_print_currency_symbol( 'after' ); ?> … … 25 25 <?php $this->maybe_print_currency_symbol( 'before' ); ?> 26 26 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 ); ?>' /> 28 28 29 29 <?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 ); ?>'> 2 2 3 3 <?php $this->maybe_print_taxonomy_image(); ?> 4 4 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' : '' ); ?> > 6 6 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 ); ?>'> 8 8 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> 10 10 11 11 </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' : '' ); ?> > 2 2 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> 4 4 5 5 </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 ); ?>'> 2 2 3 3 <?php $this->maybe_print_taxonomy_image(); ?> 4 4 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' : '' ); ?> > 6 6 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 ); ?>'> 8 8 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> 10 10 11 11 </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'> 2 2 3 3 <?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'> 2 2 3 3 <?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'> 2 2 3 3 <?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'> 2 2 3 3 <?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'> 2 2 3 3 <?php $this->print_product_breadcrumbs(); ?> -
ultimate-product-catalogue/trunk/ewd-upcp-templates/single-product-additional-images.php
r2638260 r2650578 3 3 <?php foreach ( $this->product->get_all_images() as $count => $image ) { ?> 4 4 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'> 7 7 </a> 8 8 9 <?php } ?> 9 <?php } ?> 10 10 11 11 </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'> 2 2 3 3 <?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'> 2 2 3 3 <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'> 2 2 3 3 </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'> 2 2 3 3 <?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'> 2 2 3 3 <?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'> 2 2 3 <?php echo $this->product->custom_fields[ $this->element->element_id ]; ?>3 <?php echo esc_html( $this->product->custom_fields[ $this->element->element_id ] ); ?> 4 4 5 5 </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'> 2 2 3 3 <?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'> 2 2 3 3 <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'> 2 2 3 3 <?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'> 2 2 3 3 <?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'> 2 2 3 3 <?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'> 2 2 3 3 <?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'> 2 2 3 3 <?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'> 2 2 3 3 <?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'> 2 2 3 3 <?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'> 2 2 3 3 <?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'> 2 2 3 3 <?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'> 2 2 3 3 <?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'> 2 2 3 3 <?php $this->print_title(); ?> -
ultimate-product-catalogue/trunk/ewd-upcp-templates/single-product-description.php
r2638260 r2650578 1 1 <div class='ewd-upcp-single-product-description'> 2 2 3 <?php echo $this->product->get_product_description(); ?>3 <?php echo wp_kses_post( $this->product->get_product_description() ); ?> 4 4 5 5 </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() ); ?>'> 2 2 3 3 <?php echo $this->product->get_image(); ?> -
ultimate-product-catalogue/trunk/ewd-upcp-templates/single-product-tab-faqs.php
r2638260 r2650578 3 3 <?php $ufaq_product_category = get_term_by( 'name', $this->product->name, 'ufaq-category' ); ?> 4 4 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() ) . "']" ); ?> 6 6 7 7 </div> -
ultimate-product-catalogue/trunk/ewd-upcp-templates/single-product-videos.php
r2638260 r2650578 7 7 </div> */ ?> 8 8 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 ); ?>'> 10 10 11 11 <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'> 2 2 3 3 <?php $this->print_product_breadcrumbs(); ?> -
ultimate-product-catalogue/trunk/includes/AdminCustomFields.class.php
r2638260 r2650578 14 14 // Add the admin menu 15 15 add_action( 'admin_menu', array( $this, 'add_menu_page' ), 12 ); 16 17 // Enqueue admin scripts18 add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ), 12 );19 16 } 20 17 … … 221 218 do_action( 'ewd_upcp_custom_fields_updated' ); 222 219 } 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 }234 220 } 235 221 } // endif; -
ultimate-product-catalogue/trunk/includes/AdminProductPage.class.php
r2638260 r2650578 399 399 <li> 400 400 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> 402 402 403 403 </li> … … 417 417 <?php foreach ( $gridster as $grid_element ) { ?> 418 418 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;'> 420 420 421 421 <?php echo substr( $grid_element->element_type, 0, strpos( $grid_element->element_type, '<' ) ); ?> … … 426 426 427 427 <textarea class='ewd-upcp-pb-textarea'> 428 <?php echo $grid_element->element_id; ?>428 <?php echo esc_textarea( $grid_element->element_id ); ?> 429 429 </textarea> 430 430 … … 500 500 <li> 501 501 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> 503 503 504 504 </li> … … 518 518 <?php foreach ( $gridster as $grid_element ) { ?> 519 519 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;'> 521 521 522 522 <?php echo substr( $grid_element->element_type, 0, strpos( $grid_element->element_type, '<' ) ); ?> … … 527 527 528 528 <textarea class='ewd-upcp-pb-textarea'> 529 <?php echo $grid_element->element_id; ?>529 <?php echo esc_textarea( $grid_element->element_id ); ?> 530 530 </textarea> 531 531 … … 537 537 538 538 </ul> 539 539 540 540 </div> 541 541 … … 563 563 564 564 </div> 565 565 566 566 </form> 567 567 568 568 </div> 569 569 … … 611 611 612 612 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 } 613 623 614 624 $option_name = $_POST['type'] == 'mobile' ? 'UPCP_Product_Page_Serialized_Mobile' : 'UPCP_Product_Page_Serialized'; -
ultimate-product-catalogue/trunk/includes/Ajax.class.php
r2638260 r2650578 32 32 global $ewd_upcp_controller; 33 33 34 // Authenticate request 35 if ( ! check_ajax_referer( 'ewd-upcp-js', 'nonce' ) ) { 36 ewdUpcpHelper::bad_nonce_ajax(); 37 } 38 34 39 $product_id = intval( $_POST['product_id'] ); 35 40 … … 43 48 public function update_catalog() { 44 49 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 46 56 $args = array( 47 57 'sidebar' => 'no', … … 112 122 global $woocommerce; 113 123 124 // Authenticate request 125 if ( ! check_ajax_referer( 'ewd-upcp-js', 'nonce' ) ) { 126 ewdUpcpHelper::bad_nonce_ajax(); 127 } 128 114 129 setcookie( 'upcp_cart_products', '', time() - 3600, '/' ); 115 130 … … 129 144 global $ewd_upcp_controller; 130 145 global $woocommerce; 146 147 // Authenticate request 148 if ( ! check_ajax_referer( 'ewd-upcp-js', 'nonce' ) ) { 149 ewdUpcpHelper::bad_nonce_ajax(); 150 } 131 151 132 152 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 389 389 ?> 390 390 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 ); ?>"> 392 392 393 393 <div class='ewd-upcp-meta-field'> … … 612 612 613 613 <?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> 615 615 <?php } ?> 616 616 … … 628 628 629 629 <?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> 631 631 <?php } ?> 632 632 … … 658 658 659 659 <?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> 661 661 <?php } ?> 662 662 … … 676 676 677 677 <?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> 679 679 <?php } ?> 680 680 … … 870 870 <?php foreach ( $products as $product ) { ?> 871 871 <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 ); ?>' /> 873 873 <span class='ewd-upcp-admin-checkbox'></span> <span><?php echo esc_html( $product->post_title ); ?></span> 874 874 </label> … … 885 885 <?php foreach ( $categories as $category ) { ?> 886 886 <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 ); ?>' /> 888 888 <span class='ewd-upcp-admin-checkbox'></span> <span><?php echo esc_html( $category->name ); ?></span> 889 889 </label> … … 904 904 <div class='ewd-upcp-catalog-meta-current-items'> 905 905 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 ); ?>"> 907 907 908 908 <table class='ewd-upcp-catalog-meta-items'> … … 936 936 <td> 937 937 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 ); ?>' /> 941 941 942 942 <?php echo esc_html( $item_name ) ?> … … 1257 1257 */ 1258 1258 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 } 1259 1269 1260 1270 $ids = is_array( $_POST['tag'] ) ? array_map( 'intval', $_POST['tag'] ) : array(); … … 1497 1507 */ 1498 1508 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 } 1499 1519 1500 1520 $ids = is_array( $_POST['post'] ) ? array_map( 'intval', $_POST['post'] ) : array(); -
ultimate-product-catalogue/trunk/includes/Dashboard.class.php
r2638260 r2650578 15 15 public function __construct() { 16 16 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') );22 17 23 18 if ( ! empty( $_POST['ewd_upcp_reset_settings'] ) ) { … … 62 57 } 63 58 64 // Enqueues the admin script so that our hacky sub-menu opening function can run65 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 75 59 public function display_dashboard_screen() { 76 60 global $ewd_upcp_controller; … … 100 84 $premium_info = apply_filters( 'ewd_dashboard_top', $premium_info, 'UPCP', 'https://www.etoilewebdesign.com/license-payment/?Selected=UPCP&Quantity=1' ); 101 85 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 ); 103 108 } ?> 104 109 105 110 <div class="ewd-upcp-dashboard-new-widget-box ewd-widget-box-full" id="ewd-upcp-dashboard-support-widget-box"> 106 111 <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"> ▼</span><span id="ewd-upcp-dash-mobile-support-up-caret"> ▲</span></div> … … 151 156 foreach ( $catalogs as $catalog ) { ?> 152 157 <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> 155 160 </tr> 156 161 <?php } … … 228 233 229 234 <?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/' ); 231 236 232 237 echo apply_filters( 'ewd_trial_button', $trial_info, 'UPCP' ); -
ultimate-product-catalogue/trunk/includes/DeactivationSurvey.class.php
r2638260 r2650578 55 55 <div class="ewd-upcp-deactivate-survey-modal" id="ewd-upcp-deactivate-survey-ultimate-product-catalogue"> 56 56 <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 ); ?>"> 58 58 <span class="ewd-upcp-deactivate-survey-title"><span class="dashicons dashicons-testimonial"></span><?php echo ' ' . __( 'Quick Feedback', 'ultimate-product-catalogue' ); ?></span> 59 59 <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> … … 61 61 <?php foreach ( $options as $id => $option ) : ?> 62 62 <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> 66 66 </label> 67 67 <?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'] ); ?>" /> 69 69 <?php endif; ?> 70 70 </div> -
ultimate-product-catalogue/trunk/includes/Export.class.php
r2638260 r2650578 21 21 22 22 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' ) );25 23 } 26 24 … … 171 169 } 172 170 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 184 171 } 185 172 -
ultimate-product-catalogue/trunk/includes/Import.class.php
r2638260 r2650578 19 19 20 20 if ( isset( $_POST['ewdupcpImport'] ) ) { add_action( 'admin_init', array($this, 'import_products' )); } 21 22 add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_import_scripts' ) );23 21 } 24 22 … … 376 374 } 377 375 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 389 376 public function display_notice() { 390 377 -
ultimate-product-catalogue/trunk/includes/InstallationWalkthrough.class.php
r2638260 r2650578 80 80 */ 81 81 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 } 82 92 83 93 $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(); 91 101 } 92 102 … … 96 106 */ 97 107 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 } 98 118 99 119 $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_TYPE104 );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(); 146 166 } 147 167 … … 151 171 */ 152 172 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 } 153 183 154 184 $ewd_upcp_options = get_option( 'ewd-upcp-settings' ); … … 160 190 161 191 update_option( 'ewd-upcp-settings', $ewd_upcp_options ); 162 163 exit();192 193 exit(); 164 194 } 165 195 … … 169 199 */ 170 200 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 } 171 211 172 212 $args = array( … … 220 260 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 ); 221 261 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 ); 222 270 } 223 271 … … 332 380 <fieldset> 333 381 <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 /> 335 383 <p><?php _e('What currency symbol, if any, should be displayed before or after the price? Leave blank for none.', 'ultimate-product-catalogue'); ?></p> 336 384 </fieldset> -
ultimate-product-catalogue/trunk/includes/Product.class.php
r2638260 r2650578 506 506 $image_url = $this->get_main_image_url(); 507 507 508 return '<img class="ewd-upcp-product-image" src="' . $image_url. '" />';508 return '<img class="ewd-upcp-product-image" src="' . esc_url( $image_url ) . '" />'; 509 509 } 510 510 -
ultimate-product-catalogue/trunk/includes/ReviewAsk.class.php
r2638260 r2650578 74 74 wp_enqueue_style( 'ewd-upcp-review-ask-css', EWD_UPCP_PLUGIN_URL . '/assets/css/dashboard-review-ask.css' ); 75 75 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 ); 76 84 } 77 85 78 86 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 } 79 97 80 98 $ask_review_time = sanitize_text_field($_POST['ask_review_time']); 81 99 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 } 85 103 86 die();104 die(); 87 105 } 88 106 89 107 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 90 119 $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']); 94 123 95 wp_mail('contact@etoilewebdesign.com', 'UPCP Feedback - Dashboard Form', $feedback, $headers);124 wp_mail('contact@etoilewebdesign.com', 'UPCP Feedback - Dashboard Form', $feedback, $headers); 96 125 97 die();126 die(); 98 127 } 99 128 } -
ultimate-product-catalogue/trunk/includes/Widgets.class.php
r2638260 r2650578 60 60 public function widget( $args, $instance ) { 61 61 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'] ); 65 65 } 66 66 … … 79 79 80 80 <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 ); ?>"> 91 91 </p> 92 92 … … 133 133 public function widget( $args, $instance ) { 134 134 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'] ); 138 138 } 139 139 … … 152 152 153 153 <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 ); ?>"> 164 164 </p> 165 165 … … 206 206 public function widget( $args, $instance ) { 207 207 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'] ); 211 211 } 212 212 … … 225 225 226 226 <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 ); ?>"> 237 237 </p> 238 238 … … 279 279 public function widget( $args, $instance ) { 280 280 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'] ); 284 284 } 285 285 … … 298 298 299 299 <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 ); ?>"> 310 310 </p> 311 311 … … 352 352 public function widget( $args, $instance ) { 353 353 354 echo $args['before_widget'];354 echo esc_html( $args['before_widget'] ); 355 355 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'] ) . "' />"; 360 360 echo "</form>"; 361 361 echo "</div>"; 362 echo $args['after_widget'];362 echo esc_html( $args['after_widget'] ); 363 363 } 364 364 … … 377 377 378 378 <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 ); ?>"> 389 389 </p> 390 390 -
ultimate-product-catalogue/trunk/includes/template-functions.php
r2638260 r2650578 180 180 181 181 if ( count( $classes ) ) { 182 return ' class="' . join( ' ', $classes) . '"';182 return ' class="' . esc_attr( join( ' ', $classes ) ) . '"'; 183 183 } 184 184 } -
ultimate-product-catalogue/trunk/readme.txt
r2638260 r2650578 5 5 Requires at least: 4.0.0 6 6 Tested up to: 5.8 7 Stable tag: 5.0.26 7 8 License: GPLv3 8 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 332 333 333 334 == Changelog == 335 336 = 5.0.26 (2021-12-29) = 337 - Updating nonce and authorization checks for AJAX calls. 338 - Updating sanitizing and escaping. 334 339 335 340 = 5.0.25 (2021-12-01) = -
ultimate-product-catalogue/trunk/ultimate-product-catalogue.php
r2638260 r2650578 8 8 Terms and Conditions: https://www.etoilewebdesign.com/plugin-terms-and-conditions/ 9 9 Text Domain: ultimate-product-catalogue 10 Version: 5.0.2 510 Version: 5.0.26 11 11 */ 12 12 … … 48 48 define( 'EWD_UPCP_PLUGIN_FNAME', plugin_basename( __FILE__ ) ); 49 49 define( 'EWD_UPCP_TEMPLATE_DIR', 'ewd-upcp-templates' ); 50 define( 'EWD_UPCP_VERSION', '5.0.2 3' );50 define( 'EWD_UPCP_VERSION', '5.0.26' ); 51 51 52 52 define( 'EWD_UPCP_PRODUCT_POST_TYPE', 'upcp_product' ); … … 72 72 require_once( EWD_UPCP_PLUGIN_DIR . '/includes/Dashboard.class.php' ); 73 73 require_once( EWD_UPCP_PLUGIN_DIR . '/includes/DeactivationSurvey.class.php' ); 74 require_once( EWD_UPCP_PLUGIN_DIR . '/includes/Helper.class.php' ); 74 75 require_once( EWD_UPCP_PLUGIN_DIR . '/includes/Export.class.php' ); 75 76 require_once( EWD_UPCP_PLUGIN_DIR . '/includes/Import.class.php' ); … … 143 144 144 145 add_action( 'admin_notices', array( $this, 'display_header_area' ) ); 146 add_action( 'admin_notices', array( $this, 'maybe_display_helper_notice' ) ); 145 147 146 148 add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_assets' ), 10, 1 ); … … 150 152 151 153 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' ) ); 152 156 } 153 157 … … 259 263 global $post; 260 264 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 261 274 $post_type = is_object( $post ) ? $post->post_type : ''; 262 275 263 276 $screen = get_current_screen(); 264 277 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(); 269 305 270 306 wp_enqueue_style( 'ewd-upcp-admin-css', EWD_UPCP_PLUGIN_URL . '/assets/css/ewd-upcp-admin.css', array(), EWD_UPCP_VERSION ); … … 279 315 280 316 $args = array( 317 'nonce' => wp_create_nonce( 'ewd-upcp-admin-js' ), 281 318 'product_add' => ( $this->permissions->check_permission( 'premium' ) or sizeof( $products ) < 100 ), 282 319 ); … … 301 338 wp_register_script( 'ewd-upcp-gridster', EWD_UPCP_PLUGIN_URL . '/assets/js/jquery.gridster.js', array( 'jquery' ), EWD_UPCP_VERSION, true ); 302 339 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 ); 303 348 } 304 349 … … 475 520 } 476 521 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 477 569 } 478 570 } // endif; -
ultimate-product-catalogue/trunk/views/View.class.php
r2638260 r2650578 158 158 global $ewd_upcp_controller; 159 159 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 } 234 238 } 235 239
Note: See TracChangeset
for help on using the changeset viewer.