Advanced AJAX Product Filters - Version 1.0.4.4

Version Description

  • Enhancement - adding callback for before_update, on_update, after_update events.
  • Other small fixes
Download this release

Release Info

Developer dholovnia
Plugin Icon wp plugin Advanced AJAX Product Filters
Version 1.0.4.4
Comparing to
See all releases

Code changes from version 1.0.4.3 to 1.0.4.4

includes/widget.php CHANGED
@@ -90,7 +90,8 @@ class BeRocket_AAPF_Widget extends WP_Widget {
90
  'products_holder_id' => $br_options['products_holder_id'],
91
  'control_sorting' => $br_options['control_sorting'],
92
  'seo_friendly_urls' => $br_options['seo_friendly_urls'],
93
- 'berocket_aapf_widget_product_filters' => $post_temrs
 
94
  )
95
  );
96
 
90
  'products_holder_id' => $br_options['products_holder_id'],
91
  'control_sorting' => $br_options['control_sorting'],
92
  'seo_friendly_urls' => $br_options['seo_friendly_urls'],
93
+ 'berocket_aapf_widget_product_filters' => $post_temrs,
94
+ 'user_func' => $br_options['user_func'],
95
  )
96
  );
97
 
js/widget.min.js CHANGED
@@ -1,2 +1,2 @@
1
  /* http://dean.edwards.name/packer/ */
2
- eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(5($){$(15).1P(5(){16 d=1Q.1R(j.1S),G=[],P=[],Q=1;4($(\'.6-l\').y(\'.6-l\')){Q=s($(\'.6-l .z\').R());4(Q<1)Q=1}5 H(b){$(j.S).1T(\'17\').1U(\'<1j 1k="1l" />\');4(b){4(b.I("A"))m=b.1V("1m:1n").8();f m=b.8();4(b.I("A")){$(d).u(5(i,o){4(o[0]==m.J){d.1o(i,1)}});4($1p.B())d[d.n]=[m.J,m.18,m.1q]}f{4(b.I(\':1W\')||b.I(\':1n\')){d[d.n]=[m.J,m.18,m.1q]}f{$(d).u(5(i,o){4(o[0]==m.J&&o[1]==m.18){d.1o(i,1)}})}}}G=[];P=[];$t=$(\'.T\');4($t.y(\'T\')){$t.u(5(i,o){U=$(\'#\'+$(o).8(\'1r\')).B();V=$(\'#\'+$(o).8(\'1s\')).B();4(U!=$(o).8(\'W\')||V!=$(o).8(\'X\')){4($(o).y(\'19\')){P=[U,V]}f{G[G.n]=[$(o).8(\'J\'),U,V]}}})}4($(\'.6-l\').y(\'.6-l\')){$(\'.6-l 1X.v-1t 1p a\')}q={1a:d,r:P,1b:G,K:j.K,1Y:\'1Z\',w:$(\'.6-Y A.w\').B()};4(j.20&&\'Z\'1u 21&&\'1v\'1u Z){1w(q);q.h=h.C}f{q.h=j.1x;7=$(\'.6-l L.z\').R();4(D=h.C.E(/.+\\/v\\/([0-9]+).+/,"$1")){4(!s(7)){7=D}q.h=q.h.E(/\\/?/,"")+"/v/"+7+"/"}f 4(D=h.C.E(/.+M?=([0-9]+).+/,"$1")){4(!s(7)){7=D}q.h=q.h.E(/\\/?/,"")+"?v="+7+""}}$.22(j.23,q,5(a){$(\'.6-24-25\').N();$(\'.6-l\').N();$(\'1y.6-Y\').N();4($(\'.6-1c\').y(\'6-1c\')&&!$(j.S).I(\':26\')){4(1z a.1d!=\'1A\'){$(\'.6-1c\').1B(a.1d)}}f{4(1z a.1C!=\'1A\'){$(j.S).27(a.1C).1e(\'17\')}f{$(j.S).1B(a.1d).1e(\'17\')}}$(\'.1l\').N();1f()},"28")}5 1w(a){g=[];p=\'\';4(a.w&&$(\'.6-Y A.w 1m:29\').2a(\'2b\')!=a.w){g[g.n]=\'2c=\'+a.w}4(a.K&&a.K>0){g[g.n]=\'2d=\'+a.K}4(a.r){$1g=$(\'.19\');4(a.r[0]&&a.r[1]&&(a.r[0]!=$1g.8(\'W\')||a.r[1]!=$1g.8(\'X\'))){g[g.n]=\'r=\'+a.r[0]+\'^\'+a.r[1]}}4(a.1b){$(a.1b).u(5(i,o){g[g.n]=o[0].1D(3)+\'=\'+o[1]+\'^\'+o[2]})}4(a.1a){$(a.1a).u(5(i,o){g[g.n]=o[0].1D(3)+\'=\'+o[1]+\'^\'+o[2]})}16 b=j.1x;4(g.n){$(g).u(5(i,o){4(p)p+="|";p+=o})}7=$(\'.6-l L.z\').R();4(D=s(h.C.E(/.+\\/v\\/([0-9]+).+/,"$1"))){4(!s(7)){7=D}b=b.E(/\\/?$/,"")+"/v/"+7+"/";4(p){b=b+"?10="+p}}f{11=12;4(/\\?/.1E(h.C)){O=h.C.13(\'?\');4(O[1]){e=[];2e=[];4(/&/.1E(O[1])){e=O[1].13(\'&\');1F=e.n;1G(k=0;k<1F;k++){F=e[k].13(\'=\');e[k]=[];e[k][0]=F.1H();e[k][1]=F.1I("=")}}f{e[0]=[];F=O[1].13(\'=\');e[0][0]=F.1H();e[0][1]=F.1I("=")}1G(k=0;k<e.n;k++){4(e[k][0]==\'10\'||e[k][0]==\'v\'||e[k][0]==\'M\')2f;4(11)b+=\'&\';f b+=\'?\';b+=e[k][0]+\'=\'+e[k][1];11=1J}}}4(11&&p){b=b+"&10="+p;4(7>1){b=b+"&M="+s(7)}}f 4(p){b=b+"?10="+p;4(7>1){b=b+"&M="+s(7)}}f 4(7>1){b=b+"?M="+s(7)}}16 c={1K:"1L"};Z.1v(c,"1K 1L",b);Z.2g=b}5 1f(){$(\'.6-l\').14(\'2h\',\'a\',5(a){a.1h();$(\'.6-l L.z\').1e(\'z\');$(1i).2i("<L 1k=\'v-1t z\'>"+$(1i).R()+"</L>").N();H(12)})}$(\'.2j\').14("1M","2k, A",5(){H($(1i))});$(".T").u(5(i,o){$(o).2l({2m:1J,W:$(o).8(\'W\')>>0,X:$(o).8(\'X\')>>0,1N:[$(o).8(\'2n\')>>0,$(o).8(\'2o\')>>0],2p:5(a,b){$o=$(b.2q).2r(\'1j.T\');x=b.1N;4($(o).y(\'19\')){x[0]=x[0].1O(2);x[1]=x[1].1O(2)}$(\'#\'+$o.8(\'1r\')).B(x[0]);$(\'#\'+$o.8(\'1s\')).B(x[1])},2s:5(){H(12)}})});$(".2t").u(5(i,o){$(o).2u({2v:"2w",2x:$(o).8(\'2y\'),2z:2A})});4(j.2B){$(15).14(\'2C\',\'1y.6-Y\',5(a){a.1h()});$(15).14(\'1M\',\'A.w\',5(a){a.1h();H(12)})}1f()})})(2D);',62,164,'||||if|function|woocommerce|cur_page|data||||||passed_vars2|else|uri_request_array|location||the_ajax_script||pagination|el_data|length||uri_request|args|price|parseInt||each|page|orderby|vals|hasClass|current|select|val|href|prev_page|replace|temp|berocket_aapf_widget_product_limits|updateProducts|is|taxonomy|product_cat|span|paged|remove|passed_vars1|berocket_aapf_widget_product_price_limit|woocommerce_pagination_page|text|products_holder_id|berocket_filter_slider|val1|val2|min|max|ordering|history|filters|something_added|false|split|on|document|var|hide_products|term_id|berocket_filter_price_slider|terms|limits|info|products|removeClass|aapf_action_init|price_obj|preventDefault|this|div|class|berocket_aapf_widget_loading|option|selected|splice|li|operator|fields_1|fields_2|numbers|in|pushState|updateLocation|current_page_url|form|typeof|undefined|replaceWith|no_products|substring|test|passed_vars2_length|for|shift|join|true|BeRocket|Rules|change|values|toFixed|ready|JSON|parse|berocket_aapf_widget_product_filters|addClass|append|find|checked|ul|action|berocket_aapf_listener|seo_friendly_urls|window|post|ajaxurl|result|count|visible|html|json|first|attr|value|order|pcategory|temp2|continue|pathname|click|after|berocket_aapf_widget|input|slider|range|value1|value2|slide|handle|parents|stop|berocket_aapf_widget_height_control|mCustomScrollbar|axis|xy|theme|scroll_theme|scrollInertia|300|control_sorting|submit|jQuery'.split('|'),0,{}))
1
  /* http://dean.edwards.name/packer/ */
2
+ eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(6($){$(18).1U(6(){19 d=1V.1W(5.1X),J=[],S=[],T=1;4($(\'.7-n\').B(\'.7-n\')){T=u($(\'.7-n .C\').U());4(T<1)T=1}6 K(b){4(v 5.g!=\'w\'&&5.g!=1a&&v 5.g.1b!=\'w\'&&5.g.1b.h>0){1c(5.g.1b)}$(5.V).1Y(\'1d\').1Z(\'<1r 1s="1t" />\');4(b){4(b.L("D"))p=b.20("1u:1v").e();j p=b.e();4(b.L("D")){$(d).x(6(i,o){4(o[0]==p.M){d.1w(i,1)}});4(b.E())d[d.h]=[p.M,p.1e,p.1x]}j{4(b.L(\':21\')||b.L(\':1v\')){d[d.h]=[p.M,p.1e,p.1x]}j{$(d).x(6(i,o){4(o[0]==p.M&&o[1]==p.1e){d.1w(i,1)}})}}}J=[];S=[];$t=$(\'.W\');4($t.B(\'W\')){$t.x(6(i,o){X=$(\'#\'+$(o).e(\'1y\')).E();Y=$(\'#\'+$(o).e(\'1z\')).E();4(X!=$(o).e(\'Z\')||Y!=$(o).e(\'10\')){4($(o).B(\'1f\')){S=[X,Y]}j{J[J.h]=[$(o).e(\'M\'),X,Y]}}})}4($(\'.7-n\').B(\'.7-n\')){$(\'.7-n 22.y-1A 23 a\')}r={1g:d,s:S,1h:J,N:5.N,24:\'25\',z:$(\'.7-11 D.z\').E()};4(5.26&&\'12\'1B 27&&\'1C\'1B 12){1D(r);r.m=m.F}j{r.m=5.1E;8=$(\'.7-n O.C\').U();4(G=m.F.H(/.+\\/y\\/([0-9]+).+/,"$1")){4(!u(8)){8=G}r.m=r.m.H(/\\/?/,"")+"/y/"+8+"/"}j 4(G=m.F.H(/.+P?=([0-9]+).+/,"$1")){4(!u(8)){8=G}r.m=r.m.H(/\\/?/,"")+"?y="+8+""}}$.28(5.29,r,6(a){$(\'.7-2a-2b\').Q();$(\'.7-n\').Q();$(\'1F.7-11\').Q();4(v 5.g!=\'w\'&&5.g!=1a&&v 5.g.1i!=\'w\'&&5.g.1i.h>0){1c(5.g.1i)}4($(\'.7-1j\').B(\'7-1j\')&&!$(5.V).L(\':2c\')){4(v a.1k!=\'w\'){$(\'.7-1j\').1G(a.1k)}}j{4(v a.1H!=\'w\'){$(5.V).2d(a.1H).1l(\'1d\')}j{$(5.V).1G(a.1k).1l(\'1d\')}}$(\'.1t\').Q();1m();4(v 5.g!=\'w\'&&5.g!=1a&&v 5.g.1n!=\'w\'&&5.g.1n.h>0){1c(5.g.1n)}},"2e")}6 1D(a){l=[];q=\'\';4(a.z&&$(\'.7-11 D.z 1u:2f\').2g(\'2h\')!=a.z){l[l.h]=\'2i=\'+a.z}4(a.N&&a.N>0){l[l.h]=\'2j=\'+a.N}4(a.s){$1o=$(\'.1f\');4(a.s[0]&&a.s[1]&&(a.s[0]!=$1o.e(\'Z\')||a.s[1]!=$1o.e(\'10\'))){l[l.h]=\'s=\'+a.s[0]+\'^\'+a.s[1]}}4(a.1h){$(a.1h).x(6(i,o){l[l.h]=o[0].1I(3)+\'=\'+o[1]+\'^\'+o[2]})}4(a.1g){$(a.1g).x(6(i,o){l[l.h]=o[0].1I(3)+\'=\'+o[1]+\'^\'+o[2]})}19 b=5.1E;4(l.h){$(l).x(6(i,o){4(q)q+="|";q+=o})}8=$(\'.7-n O.C\').U();4(G=u(m.F.H(/.+\\/y\\/([0-9]+).+/,"$1"))){4(!u(8)){8=G}b=b.H(/\\/?$/,"")+"/y/"+8+"/";4(q){b=b+"?13="+q}}j{14=15;4(/\\?/.1J(m.F)){R=m.F.16(\'?\');4(R[1]){f=[];2k=[];4(/&/.1J(R[1])){f=R[1].16(\'&\');1K=f.h;1L(k=0;k<1K;k++){I=f[k].16(\'=\');f[k]=[];f[k][0]=I.1M();f[k][1]=I.1N("=")}}j{f[0]=[];I=R[1].16(\'=\');f[0][0]=I.1M();f[0][1]=I.1N("=")}1L(k=0;k<f.h;k++){4(f[k][0]==\'13\'||f[k][0]==\'y\'||f[k][0]==\'P\')2l;4(14)b+=\'&\';j b+=\'?\';b+=f[k][0]+\'=\'+f[k][1];14=1O}}}4(14&&q){b=b+"&13="+q;4(8>1){b=b+"&P="+u(8)}}j 4(q){b=b+"?13="+q;4(8>1){b=b+"&P="+u(8)}}j 4(8>1){b=b+"?P="+u(8)}}19 c={1P:"1Q"};12.1C(c,"1P 1Q",b);12.2m=b}6 1m(){$(\'.7-n\').17(\'2n\',\'a\',6(a){a.1p();$(\'.7-n O.C\').1l(\'C\');$(1q).2o("<O 1s=\'y-1A C\'>"+$(1q).U()+"</O>").Q();K(15)})}$(\'.2p\').17("1R","2q, D",6(){K($(1q))});$(".W").x(6(i,o){$(o).2r({2s:1O,Z:$(o).e(\'Z\')>>0,10:$(o).e(\'10\')>>0,1S:[$(o).e(\'2t\')>>0,$(o).e(\'2u\')>>0],2v:6(a,b){$o=$(b.2w).2x(\'1r.W\');A=b.1S;4($(o).B(\'1f\')){A[0]=A[0].1T(2);A[1]=A[1].1T(2)}$(\'#\'+$o.e(\'1y\')).E(A[0]);$(\'#\'+$o.e(\'1z\')).E(A[1])},2y:6(){K(15)}})});$(".2z").x(6(i,o){$(o).2A({2B:"2C",2D:$(o).e(\'2E\'),2F:2G})});4(5.2H){$(18).17(\'2I\',\'1F.7-11\',6(a){a.1p()});$(18).17(\'1R\',\'D.z\',6(a){a.1p();K(15)})}1m()})})(2J);',62,170,'||||if|the_ajax_script|function|woocommerce|cur_page||||||data|passed_vars2|user_func|length||else||uri_request_array|location|pagination||el_data|uri_request|args|price||parseInt|typeof|undefined|each|page|orderby|vals|hasClass|current|select|val|href|prev_page|replace|temp|berocket_aapf_widget_product_limits|updateProducts|is|taxonomy|product_cat|span|paged|remove|passed_vars1|berocket_aapf_widget_product_price_limit|woocommerce_pagination_page|text|products_holder_id|berocket_filter_slider|val1|val2|min|max|ordering|history|filters|something_added|false|split|on|document|var|null|before_update|eval|hide_products|term_id|berocket_filter_price_slider|terms|limits|on_update|info|products|removeClass|aapf_action_init|after_update|price_obj|preventDefault|this|div|class|berocket_aapf_widget_loading|option|selected|splice|operator|fields_1|fields_2|numbers|in|pushState|updateLocation|current_page_url|form|replaceWith|no_products|substring|test|passed_vars2_length|for|shift|join|true|BeRocket|Rules|change|values|toFixed|ready|JSON|parse|berocket_aapf_widget_product_filters|addClass|append|find|checked|ul|li|action|berocket_aapf_listener|seo_friendly_urls|window|post|ajaxurl|result|count|visible|html|json|first|attr|value|order|pcategory|temp2|continue|pathname|click|after|berocket_aapf_widget|input|slider|range|value1|value2|slide|handle|parents|stop|berocket_aapf_widget_height_control|mCustomScrollbar|axis|xy|theme|scroll_theme|scrollInertia|300|control_sorting|submit|jQuery'.split('|'),0,{}))
readme.txt CHANGED
@@ -5,7 +5,7 @@ Donate link: http://berocket.com
5
  Tags: filters, product filters, ajax product filters, advanced product filters, woocommerce filters, woocommerce product filters, woocommerce ajax product filters
6
  Requires at least: 3.9
7
  Tested up to: 4.1
8
- Stable tag: 1.0.4.3
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -105,7 +105,11 @@ http://woocommerce-product-filter.berocket.com
105
 
106
  == Changelog ==
107
 
108
- = 1.0.4.2 =
 
 
 
 
109
  * Enhancement - shortcode added
110
  * Critical/Fix - If slider match none its values wasn't counted
111
  * Enhancement/Fix - Changing attribute data location from url to action-element, providing more flexibility for template
5
  Tags: filters, product filters, ajax product filters, advanced product filters, woocommerce filters, woocommerce product filters, woocommerce ajax product filters
6
  Requires at least: 3.9
7
  Tested up to: 4.1
8
+ Stable tag: 1.0.4.4
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
105
 
106
  == Changelog ==
107
 
108
+ = 1.0.4.4 =
109
+ * Enhancement - adding callback for before_update, on_update, after_update events.
110
+ * Other small fixes
111
+
112
+ = 1.0.4.3 =
113
  * Enhancement - shortcode added
114
  * Critical/Fix - If slider match none its values wasn't counted
115
  * Enhancement/Fix - Changing attribute data location from url to action-element, providing more flexibility for template
templates/admin-settings.php CHANGED
@@ -51,6 +51,35 @@
51
  <span style="color:#666666;margin-left:2px;">If you want to hide filters without losing current configuration just turn them off</span>
52
  </td>
53
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
  </table>
55
  <p class="submit">
56
  <input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
51
  <span style="color:#666666;margin-left:2px;">If you want to hide filters without losing current configuration just turn them off</span>
52
  </td>
53
  </tr>
54
+ <tr>
55
+ <td colspan="2">
56
+ <h2>JavaScript callback functions</h2>
57
+ </td>
58
+ </tr>
59
+ <tr>
60
+ <th scope="row">Before Update:</th>
61
+ <td>
62
+ <textarea style="min-width: 500px; height: 100px;" name="br_filters_options[user_func][before_update]"><?php echo @$options['user_func']['before_update'] ?></textarea>
63
+ <br />
64
+ <span style="color:#666666;margin-left:2px;">If you want to add own actions on filter activation, eg: alert('1');</span>
65
+ </td>
66
+ </tr>
67
+ <tr>
68
+ <th scope="row">On Update:</th>
69
+ <td>
70
+ <textarea style="min-width: 500px; height: 100px;" name="br_filters_options[user_func][on_update]"><?php echo @$options['user_func']['on_update'] ?></textarea>
71
+ <br />
72
+ <span style="color:#666666;margin-left:2px;">If you want to add own actions right on products update. You can manipulate data here, try: data.products = 'Ha!';</span>
73
+ </td>
74
+ </tr>
75
+ <tr>
76
+ <th scope="row">After Update:</th>
77
+ <td>
78
+ <textarea style="min-width: 500px; height: 100px;" name="br_filters_options[user_func][after_update]"><?php echo @$options['user_func']['after_update'] ?></textarea>
79
+ <br />
80
+ <span style="color:#666666;margin-left:2px;">If you want to add own actions after products updated, eg: alert('1');</span>
81
+ </td>
82
+ </tr>
83
  </table>
84
  <p class="submit">
85
  <input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
woocommerce-filters.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Advanced AJAX Product Filters for WooCommerce
4
  Plugin URI: http://berocket.com/wp-plugins/product-filters
5
  Description: Advanced AJAX Product Filters for WooCommerce
6
- Version: 1.0.4.3
7
  Author: BeRocket
8
  Author URI: http://berocket.com
9
  */
3
  Plugin Name: Advanced AJAX Product Filters for WooCommerce
4
  Plugin URI: http://berocket.com/wp-plugins/product-filters
5
  Description: Advanced AJAX Product Filters for WooCommerce
6
+ Version: 1.0.4.4
7
  Author: BeRocket
8
  Author URI: http://berocket.com
9
  */