Changeset 3385611
- Timestamp:
- 10/28/2025 06:11:04 AM (3 months ago)
- Location:
- dynamic-ajax-product-filters-for-woocommerce
- Files:
-
- 77 added
- 5 edited
-
tags/1.4.2 (added)
-
tags/1.4.2/admin (added)
-
tags/1.4.2/admin/admin-notice.php (added)
-
tags/1.4.2/admin/admin-page.php (added)
-
tags/1.4.2/admin/advance_settings.php (added)
-
tags/1.4.2/admin/color_name_to_hex.php (added)
-
tags/1.4.2/admin/elementor-category.php (added)
-
tags/1.4.2/admin/form-manage.php (added)
-
tags/1.4.2/admin/form_style_tab.php (added)
-
tags/1.4.2/admin/form_template_tab.php (added)
-
tags/1.4.2/admin/license-page.php (added)
-
tags/1.4.2/admin/page-seo-permalinks.php (added)
-
tags/1.4.2/admin/settings-init.php (added)
-
tags/1.4.2/assets (added)
-
tags/1.4.2/assets/css (added)
-
tags/1.4.2/assets/css/admin-style.min.css (added)
-
tags/1.4.2/assets/css/block-editor.min.css (added)
-
tags/1.4.2/assets/css/select2.min.css (added)
-
tags/1.4.2/assets/css/style.min.css (added)
-
tags/1.4.2/assets/images (added)
-
tags/1.4.2/assets/images/button_check.png (added)
-
tags/1.4.2/assets/images/checkbox.png (added)
-
tags/1.4.2/assets/images/checkbox_hide.png (added)
-
tags/1.4.2/assets/images/color_circle.png (added)
-
tags/1.4.2/assets/images/color_no_border.png (added)
-
tags/1.4.2/assets/images/color_value.png (added)
-
tags/1.4.2/assets/images/downarrow.png (added)
-
tags/1.4.2/assets/images/dropdown.png (added)
-
tags/1.4.2/assets/images/dynamic-rating.png (added)
-
tags/1.4.2/assets/images/filter-icon-widget.png (added)
-
tags/1.4.2/assets/images/icon_search.png (added)
-
tags/1.4.2/assets/images/image.png (added)
-
tags/1.4.2/assets/images/image_no_border.png (added)
-
tags/1.4.2/assets/images/input-price-range.png (added)
-
tags/1.4.2/assets/images/placeholder.jpg (added)
-
tags/1.4.2/assets/images/plugincy_color.png (added)
-
tags/1.4.2/assets/images/plugincy_search.png (added)
-
tags/1.4.2/assets/images/price.png (added)
-
tags/1.4.2/assets/images/radio.png (added)
-
tags/1.4.2/assets/images/radio_check.png (added)
-
tags/1.4.2/assets/images/rating-text.png (added)
-
tags/1.4.2/assets/images/rating.png (added)
-
tags/1.4.2/assets/images/select.png (added)
-
tags/1.4.2/assets/images/select2.png (added)
-
tags/1.4.2/assets/images/select2_classic.png (added)
-
tags/1.4.2/assets/images/slider.png (added)
-
tags/1.4.2/assets/images/slider2.png (added)
-
tags/1.4.2/assets/images/square.png (added)
-
tags/1.4.2/assets/images/square_check.png (added)
-
tags/1.4.2/assets/images/upload.png (added)
-
tags/1.4.2/assets/js (added)
-
tags/1.4.2/assets/js/admin-script.min.js (added)
-
tags/1.4.2/assets/js/filter.min.js (added)
-
tags/1.4.2/assets/js/media-uploader.min.js (added)
-
tags/1.4.2/assets/js/select2.min.js (added)
-
tags/1.4.2/dynamic-ajax-product-filters-for-woocommerce.php (added)
-
tags/1.4.2/includes (added)
-
tags/1.4.2/includes/analytics.php (added)
-
tags/1.4.2/includes/block.min.js (added)
-
tags/1.4.2/includes/blocks (added)
-
tags/1.4.2/includes/blocks/editor.js (added)
-
tags/1.4.2/includes/blocks_widget_create.php (added)
-
tags/1.4.2/includes/class-filter-functions.php (added)
-
tags/1.4.2/includes/class-inject.php (added)
-
tags/1.4.2/includes/common-functions.php (added)
-
tags/1.4.2/includes/filter-template.php (added)
-
tags/1.4.2/includes/get_review.php (added)
-
tags/1.4.2/includes/widget_design_template.php (added)
-
tags/1.4.2/languages (added)
-
tags/1.4.2/languages/dynamic-ajax-product-filters-for-woocommerce-es_ES.l10n.php (added)
-
tags/1.4.2/languages/dynamic-ajax-product-filters-for-woocommerce-es_ES.mo (added)
-
tags/1.4.2/languages/dynamic-ajax-product-filters-for-woocommerce-es_ES.po (added)
-
tags/1.4.2/languages/dynamic-ajax-product-filters-for-woocommerce-fr_FR.l10n.php (added)
-
tags/1.4.2/languages/dynamic-ajax-product-filters-for-woocommerce-fr_FR.mo (added)
-
tags/1.4.2/languages/dynamic-ajax-product-filters-for-woocommerce-fr_FR.po (added)
-
tags/1.4.2/languages/dynamic-ajax-product-filters-for-woocommerce.pot (added)
-
tags/1.4.2/readme.txt (added)
-
trunk/admin/admin-page.php (modified) (1 diff)
-
trunk/dynamic-ajax-product-filters-for-woocommerce.php (modified) (8 diffs)
-
trunk/includes/analytics.php (modified) (9 diffs)
-
trunk/includes/filter-template.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
dynamic-ajax-product-filters-for-woocommerce/trunk/admin/admin-page.php
r3378752 r3385611 556 556 </div> 557 557 <div class="version-badge"> 558 <span><?php echo esc_html__('Version', 'dynamic-ajax-product-filters-for-woocommerce'); ?> 1.4. 1</span>558 <span><?php echo esc_html__('Version', 'dynamic-ajax-product-filters-for-woocommerce'); ?> 1.4.2</span> 559 559 </div> 560 560 </div> -
dynamic-ajax-product-filters-for-woocommerce/trunk/dynamic-ajax-product-filters-for-woocommerce.php
r3378752 r3385611 5 5 * Plugin URI: https://plugincy.com/ 6 6 * Description: A WooCommerce plugin to filter products by attributes, categories, and tags using AJAX for seamless user experience. 7 * Version: 1.4. 17 * Version: 1.4.2 8 8 * Author: Plugincy 9 9 * Author URI: https://plugincy.com … … 24 24 } 25 25 26 define('DAPFFORWC_VERSION', '1.4. 1');26 define('DAPFFORWC_VERSION', '1.4.2'); 27 27 28 28 // Global Variables … … 1521 1521 1522 1522 wp_enqueue_script('jquery'); 1523 wp_enqueue_script($script_handle, plugin_dir_url(__FILE__) . $script_path, ['jquery'], '1.4. 1', true);1523 wp_enqueue_script($script_handle, plugin_dir_url(__FILE__) . $script_path, ['jquery'], '1.4.2', true); 1524 1524 wp_script_add_data($script_handle, 'async', true); // Load script asynchronously 1525 1525 wp_localize_script($script_handle, 'dapfforwc_data', compact('dapfforwc_options', 'dapfforwc_seo_permalinks_options', 'dapfforwc_slug', 'dapfforwc_styleoptions', 'dapfforwc_advance_settings', 'dapfforwc_front_page_slug')); … … 1532 1532 ]); 1533 1533 1534 wp_enqueue_style('filter-style', plugin_dir_url(__FILE__) . 'assets/css/style.min.css', [], '1.4. 1');1535 wp_enqueue_style('select2-css', plugin_dir_url(__FILE__) . 'assets/css/select2.min.css', [], '1.4. 1');1536 wp_enqueue_script('select2-js', plugin_dir_url(__FILE__) . 'assets/js/select2.min.js', ['jquery'], '1.4. 1', true);1534 wp_enqueue_style('filter-style', plugin_dir_url(__FILE__) . 'assets/css/style.min.css', [], '1.4.2'); 1535 wp_enqueue_style('select2-css', plugin_dir_url(__FILE__) . 'assets/css/select2.min.css', [], '1.4.2'); 1536 wp_enqueue_script('select2-js', plugin_dir_url(__FILE__) . 'assets/js/select2.min.js', ['jquery'], '1.4.2', true); 1537 1537 $css = ''; 1538 1538 // Generate inline css for sidebartop in mobile … … 1574 1574 wp_enqueue_style('wp-color-picker'); 1575 1575 wp_enqueue_script('wp-color-picker'); 1576 wp_enqueue_style('dapfforwc-admin-style', plugin_dir_url(__FILE__) . 'assets/css/admin-style.min.css', [], '1.4. 1');1576 wp_enqueue_style('dapfforwc-admin-style', plugin_dir_url(__FILE__) . 'assets/css/admin-style.min.css', [], '1.4.2'); 1577 1577 wp_enqueue_code_editor(array('type' => 'text/html')); 1578 1578 wp_enqueue_script('wp-theme-plugin-editor'); 1579 1579 wp_enqueue_style('wp-codemirror'); 1580 wp_enqueue_script('dapfforwc-admin-script', plugin_dir_url(__FILE__) . 'assets/js/admin-script.min.js', [], '1.4. 1', true);1580 wp_enqueue_script('dapfforwc-admin-script', plugin_dir_url(__FILE__) . 'assets/js/admin-script.min.js', [], '1.4.2', true); 1581 1581 wp_enqueue_media(); 1582 1582 wp_enqueue_script('dapfforwc-media-uploader', plugin_dir_url(__FILE__) . 'assets/js/media-uploader.min.js', ['jquery'], '1.0.0', true); … … 1871 1871 ); 1872 1872 1873 wp_enqueue_style('custom-box-control-styles', plugin_dir_url(__FILE__) . 'assets/css/block-editor.min.css', [], '1.4. 1');1873 wp_enqueue_style('custom-box-control-styles', plugin_dir_url(__FILE__) . 'assets/css/block-editor.min.css', [], '1.4.2'); 1874 1874 } 1875 1875 add_action('enqueue_block_editor_assets', 'dapfforwc_enqueue_dynamic_ajax_filter_block_assets'); … … 2172 2172 '01', 2173 2173 'https://plugincy.com/wp-json/product-analytics/v1', 2174 "1.4. 1",2174 "1.4.2", 2175 2175 'One Page Quick Checkout for WooCommerce', 2176 2176 __FILE__ // Pass the main plugin file … … 2186 2186 2187 2187 // Handle deactivation feedback AJAX 2188 add_action('wp_ajax_ send_deactivation_feedback', array($this, 'handle_deactivation_feedback'));2188 add_action('wp_ajax_dapfforwc_send_deactivation_feedback', array($this, 'handle_deactivation_feedback')); 2189 2189 } 2190 2190 -
dynamic-ajax-product-filters-for-woocommerce/trunk/includes/analytics.php
r3355413 r3385611 214 214 $plugin_slug = dirname($plugin_basename); 215 215 ?> 216 <div id=" plugin-deactivation-feedback" style="display:none;">216 <div id="dapfforwc-plugin-deactivation-feedback" style="display:none;"> 217 217 <div class="feedback-overlay"> 218 218 <div class="feedback-modal"> … … 238 238 <div class="modal-body"> 239 239 <p>If you have a moment, please share why you are deactivating <?php echo esc_html($this->plugin_name); ?>:</p> 240 <form id="d eactivation-feedback-form">240 <form id="dapfforwc-deactivation-feedback-form"> 241 241 <div class="feedback-options"> 242 242 <label class="feedback-option"> … … 509 509 e.preventDefault(); 510 510 deactivateUrl = $(this).attr('href'); 511 $('# plugin-deactivation-feedback').show();511 $('#dapfforwc-plugin-deactivation-feedback').show(); 512 512 }); 513 513 }); … … 520 520 e.preventDefault(); 521 521 deactivateUrl = $(this).attr('href'); 522 $('# plugin-deactivation-feedback').show();522 $('#dapfforwc-plugin-deactivation-feedback').show(); 523 523 }); 524 524 } … … 526 526 527 527 // Handle feedback form submission 528 $('#d eactivation-feedback-form').on('submit', function(e) {528 $('#dapfforwc-deactivation-feedback-form').on('submit', function(e) { 529 529 e.preventDefault(); 530 530 … … 543 543 type: 'POST', 544 544 data: { 545 action: ' send_deactivation_feedback',545 action: 'dapfforwc_send_deactivation_feedback', 546 546 reason: reason || 'no-reason-provided', 547 547 nonce: '<?php echo esc_js(wp_create_nonce('deactivation_feedback')); ?>' 548 548 }, 549 complete: function() { 550 // Proceed with deactivation 551 window.location.href = deactivateUrl; 549 success: function(response) { 550 // Wait a moment to ensure the request completed 551 setTimeout(function() { 552 window.location.href = deactivateUrl; 553 }, 500); 554 }, 555 error: function(xhr, status, error) { 556 console.error('Feedback send failed:', status, error); 557 console.error('Response:', xhr.responseText); 558 559 // Even if feedback fails, proceed with deactivation 560 setTimeout(function() { 561 window.location.href = deactivateUrl; 562 }, 500); 552 563 } 553 564 }); … … 565 576 // Handle close button 566 577 $('.close-button').click(function() { 567 $('# plugin-deactivation-feedback').hide();578 $('#dapfforwc-plugin-deactivation-feedback').hide(); 568 579 }); 569 580 … … 571 582 $('.feedback-overlay').click(function(e) { 572 583 if (e.target === this) { 573 $('# plugin-deactivation-feedback').hide();584 $('#dapfforwc-plugin-deactivation-feedback').hide(); 574 585 } 575 586 }); … … 578 589 $(document).keyup(function(e) { 579 590 if (e.keyCode === 27) { // ESC key 580 $('# plugin-deactivation-feedback').hide();591 $('#dapfforwc-plugin-deactivation-feedback').hide(); 581 592 } 582 593 }); -
dynamic-ajax-product-filters-for-woocommerce/trunk/includes/filter-template.php
r3378752 r3385611 1380 1380 1381 1381 <?php if ($atts['mobile_responsive'] === 'style_1') { 1382 wp_add_inline_script('urlfilter-ajax', " 1383 function initializeMobileFilters() { 1384 if (window.innerWidth <= 768) { 1385 const titles = document.querySelectorAll('.filter-group .title'); 1386 const items = document.querySelectorAll('.filter-group .items'); 1387 1388 function hideAll() { 1389 items.forEach(item => { 1390 item.classList.add('dapfforwc-hidden-important'); 1391 item.style.removeProperty('display'); 1382 wp_add_inline_script('urlfilter-ajax', ' 1383 (() => { 1384 const MOBILE_BP = 768; 1385 const WRAPPER = ".plugincy_filter_wrapper"; 1386 const TITLE_SEL = ".filter-group .title"; 1387 const ITEMS_SEL = ".filter-group .items"; 1388 1389 // guard so we only wire up once 1390 if (window.__mobileFiltersWired) return; 1391 window.__mobileFiltersWired = true; 1392 1393 const isMobile = () => window.innerWidth <= MOBILE_BP; 1394 1395 function hideAll(root = document) { 1396 root.querySelectorAll(ITEMS_SEL).forEach(item => { 1397 item.classList.add("dapfforwc-hidden-important"); 1398 item.style.removeProperty("display"); 1399 }); 1400 root.querySelectorAll(`${TITLE_SEL} svg`).forEach(svg => svg.classList.remove("rotated")); 1401 } 1402 1403 function showItems(itemsEl) { 1404 itemsEl.classList.remove("dapfforwc-hidden-important"); 1405 let display = "block"; 1406 const c = itemsEl.classList; 1407 if (c.contains("image") || c.contains("image_no_border") || c.contains("button_check")) { 1408 display = "grid"; 1409 } else if (c.contains("plugincy_color") || c.contains("color_no_border") || c.contains("color_circle")) { 1410 display = "flex"; 1411 } 1412 itemsEl.style.setProperty("display", display, "important"); 1413 } 1414 1415 // initial mobile state 1416 if (isMobile()) hideAll(); 1417 1418 // Reapply state when crossing the breakpoint 1419 const mm = window.matchMedia(`(max-width: ${MOBILE_BP}px)`); 1420 mm.addEventListener("change", e => { 1421 if (e.matches) { 1422 hideAll(); // just entered mobile 1423 } else { 1424 // leaving mobile: clear inline styles + classes 1425 document.querySelectorAll(ITEMS_SEL).forEach(item => { 1426 item.classList.remove("dapfforwc-hidden-important"); 1427 item.style.removeProperty("display"); 1392 1428 }); 1393 titles.forEach(title => { 1394 const svg = title.querySelector('svg'); 1395 if (svg) svg.classList.remove('rotated'); 1396 }); 1397 } 1398 1399 // Start hidden 1400 hideAll(); 1401 1402 titles.forEach(title => { 1403 title.addEventListener('click', function (e) { 1404 e.stopPropagation(); 1405 1406 // Toggle current 1407 const currentItems = this.nextElementSibling; 1408 if (!currentItems.classList.contains('dapfforwc-hidden-important')) { 1409 currentItems.style.removeProperty('display'); 1410 } else { 1411 hideAll(); // Hide all first 1412 if (currentItems.classList.contains('image') || currentItems.classList.contains('image_no_border') || currentItems.classList.contains('button_check')) { 1413 currentItems.style.setProperty('display', 'grid', 'important'); 1414 } else if (currentItems.classList.contains('plugincy_color') || currentItems.classList.contains('color_no_border') || currentItems.classList.contains('color_circle')) { 1415 currentItems.style.setProperty('display', 'flex', 'important'); 1416 } else { 1417 currentItems.style.setProperty('display', 'block', 'important'); 1418 } 1419 } 1420 }); 1421 }); 1422 1423 // Click outside to hide all 1424 document.addEventListener('click', function (e) { 1425 if (!e.target.closest('.plugincy_filter_wrapper')) { 1426 hideAll(); 1429 document.querySelectorAll(`${TITLE_SEL} svg`).forEach(svg => svg.classList.remove("rotated")); 1430 } 1431 }); 1432 1433 // Single delegated click handler for all current/future titles 1434 document.addEventListener("click", e => { 1435 if (!isMobile()) return; 1436 1437 const title = e.target.closest(TITLE_SEL); 1438 if (title && title.closest(WRAPPER)) { 1439 e.stopPropagation(); 1440 1441 const currentItems = title.nextElementSibling; 1442 const container = title.closest(WRAPPER); 1443 1444 // collapse everything inside this wrapper first 1445 hideAll(container); 1446 1447 // then expand the clicked one (if it was closed) 1448 if (currentItems && currentItems.classList.contains("dapfforwc-hidden-important")) { 1449 showItems(currentItems); 1450 const svg = title.querySelector("svg"); 1451 if (svg) svg.classList.add("rotated"); 1427 1452 } 1428 }); 1429 }} 1430 1431 // Call function on DOM content loaded 1432 document.addEventListener('DOMContentLoaded', function() { 1433 initializeMobileFilters(); 1434 }); 1435 1436 // Call function after AJAX requests complete 1437 jQuery(document).ajaxComplete(function() { 1438 initializeMobileFilters(); 1439 }); 1440 "); 1453 } else if (!e.target.closest(WRAPPER)) { 1454 // click outside -> hide all (mobile only) 1455 hideAll(); 1456 } 1457 }); 1458 1459 // Reapply hidden state after AJAX updates (no re-binding needed) 1460 if (window.jQuery) { 1461 jQuery(document).ajaxComplete(() => { if (isMobile()) hideAll(); }); 1462 } 1463 })(); 1464 '); 1465 1466 1441 1467 } 1442 1468 -
dynamic-ajax-product-filters-for-woocommerce/trunk/readme.txt
r3381795 r3385611 5 5 Requires at least: 4.7 6 6 Tested up to: 6.8 7 Stable tag: 1.4. 17 Stable tag: 1.4.2 8 8 Requires PHP: 7.0 9 9 License: GPLv2 or later … … 310 310 311 311 == Changelog == 312 313 = 1.4.2 = 314 * Fixed: mobile style 1 related issues 312 315 313 316 = 1.4.1 =
Note: See TracChangeset
for help on using the changeset viewer.