Ultimate Tag Cloud Widget - Version 2.7.2

Version Description

  • #69: Fix issues selection strategies
Download this release

Release Info

Developer exz
Plugin Icon wp plugin Ultimate Tag Cloud Widget
Version 2.7.2
Comparing to
See all releases

Code changes from version 2.7.1 to 2.7.2

js/utcw.min.js CHANGED
@@ -1 +1 @@
1
- /*! utcw - v2.7.1 - 2014-04-18*/var Query=function(a){"use strict";var b=function(a){var b,c,d,e,f=[];if("undefined"==typeof a||null===a||""===a)return f;for(0===a.indexOf("?")&&(a=a.substring(1)),c=a.toString().split(/[&;]/),b=0;b<c.length;b++)d=c[b],e=d.split("="),f.push([e[0],e[1]]);return f},c=b(a),d=function(){var a,b,d="";for(a=0;a<c.length;a++)b=c[a],d.length>0&&(d+="&"),d+=b.join("=");return d.length>0?"?"+d:d},e=function(a){return a=decodeURIComponent(a),a=a.replace("+"," ")},f=function(a){var b,d;for(d=0;d<c.length;d++)if(b=c[d],e(a)===e(b[0]))return b[1]},g=function(a){var b,d,f=[];for(b=0;b<c.length;b++)d=c[b],e(a)===e(d[0])&&f.push(d[1]);return f},h=function(a,b){var d,f,g,h,i=[];for(d=0;d<c.length;d++)f=c[d],g=e(f[0])===e(a),h=e(f[1])===e(b),(1===arguments.length&&!g||2===arguments.length&&!g&&!h)&&i.push(f);return c=i,this},i=function(a,b,d){return 3===arguments.length&&-1!==d?(d=Math.min(d,c.length),c.splice(d,0,[a,b])):arguments.length>0&&c.push([a,b]),this},j=function(a,b,d){var f,g,j=-1;if(3===arguments.length){for(f=0;f<c.length;f++)if(g=c[f],e(g[0])===e(a)&&decodeURIComponent(g[1])===e(d)){j=f;break}h(a,d).addParam(a,b,j)}else{for(f=0;f<c.length;f++)if(g=c[f],e(g[0])===e(a)){j=f;break}h(a),i(a,b,j)}return this};return{getParamValue:f,getParamValues:g,deleteParam:h,addParam:i,replaceParam:j,toString:d}},Uri=function(a){"use strict";var b=!1,c=function(a){for(var c={strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/},d=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],e={name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},f=c[b?"strict":"loose"].exec(a),g={},h=14;h--;)g[d[h]]=f[h]||"";return g[e.name]={},g[d[12]].replace(e.parser,function(a,b,c){b&&(g[e.name][b]=c)}),g},d=c(a||""),e=new Query(d.query),f=function(a){return"undefined"!=typeof a&&(d.protocol=a),d.protocol},g=null,h=function(a){return"undefined"!=typeof a&&(g=a),null===g?-1!==d.source.indexOf("//"):g},i=function(a){return"undefined"!=typeof a&&(d.userInfo=a),d.userInfo},j=function(a){return"undefined"!=typeof a&&(d.host=a),d.host},k=function(a){return"undefined"!=typeof a&&(d.port=a),d.port},l=function(a){return"undefined"!=typeof a&&(d.path=a),d.path},m=function(a){return"undefined"!=typeof a&&(e=new Query(a)),e},n=function(a){return"undefined"!=typeof a&&(d.anchor=a),d.anchor},o=function(a){return f(a),this},p=function(a){return h(a),this},q=function(a){return i(a),this},r=function(a){return j(a),this},s=function(a){return k(a),this},t=function(a){return l(a),this},u=function(a){return m(a),this},v=function(a){return n(a),this},w=function(a){return m().getParamValue(a)},x=function(a){return m().getParamValues(a)},y=function(a,b){return 2===arguments.length?m().deleteParam(a,b):m().deleteParam(a),this},z=function(a,b,c){return 3===arguments.length?m().addParam(a,b,c):m().addParam(a,b),this},A=function(a,b,c){return 3===arguments.length?m().replaceParam(a,b,c):m().replaceParam(a,b),this},B=function(){var a="",b=function(a){return null!==a&&""!==a};return b(f())?(a+=f(),f().indexOf(":")!==f().length-1&&(a+=":"),a+="//"):h()&&b(j())&&(a+="//"),b(i())&&b(j())&&(a+=i(),i().indexOf("@")!==i().length-1&&(a+="@")),b(j())&&(a+=j(),b(k())&&(a+=":"+k())),b(l())?a+=l():b(j())&&(b(m().toString())||b(n()))&&(a+="/"),b(m().toString())&&(0!==m().toString().indexOf("?")&&(a+="?"),a+=m().toString()),b(n())&&(0!==n().indexOf("#")&&(a+="#"),a+=n()),a},C=function(){return new Uri(B())};return{protocol:f,hasAuthorityPrefix:h,userInfo:i,host:j,port:k,path:l,query:m,anchor:n,setProtocol:o,setHasAuthorityPrefix:p,setUserInfo:q,setHost:r,setPort:s,setPath:t,setQuery:u,setAnchor:v,getQueryParamValue:w,getQueryParamValues:x,deleteQueryParam:y,addQueryParam:z,replaceQueryParam:A,toString:B,clone:C}},jsUri=Uri;!function(a){a.fn.wTooltip=function(b,c){function d(c){c&&(b.degrade?a(n).html(b.content.replace(/<\/?[^>]+>/gi,"")):a(n).html(b.content))}function e(c){function d(){f&&!b.content&&(f="")}function e(){!l&&b.auto&&(clearInterval(i),b.fadeOut?a(n).fadeOut(b.fadeOut,function(){d(c)}):(d(c),n.style.display="none")),"function"==typeof b.callAfter&&b.callAfter(n,c,b),p&&(b=a.listen(b))}b.timeout>0?h=setTimeout(function(){e()},b.timeout):e()}b=a.extend({content:null,ajax:null,follow:!0,auto:!0,fadeIn:0,fadeOut:0,appendTip:document.body,degrade:!1,offsetY:10,offsetX:1,style:{},className:null,id:null,callBefore:function(){},callAfter:function(){},clickAction:function(b){a(b).hide()},delay:0,timeout:0},b||{}),b.style||"object"==typeof b.style?b.style=a.extend({border:"1px solid gray",background:"#edeef0",color:"#000",padding:"10px",zIndex:"1000",textAlign:"left"},b.style||{}):(b.style={},b.style.zIndex="1000"),"function"==typeof c&&(b.callAfter=c||b.callAfter),b.style.display="none",b.style.position="absolute";var f,g,h,i,j={},k=!0,l=!1,m=!1,n=document.createElement("div"),o="undefined"==typeof document.body.style.maxWidth?!0:!1,p="function"==typeof a.talk&&"function"==typeof a.listen?!0:!1;b.id&&(n.id=b.id),b.className&&(n.className=b.className),b.degrade=b.degrade&&o?!0:!1;for(var q in b.style)n.style[q]=b.style[q];return b.ajax&&a.get(b.ajax,function(a){a&&(b.content=a),d(b.content)}),a(n).hover(function(){l=!0},function(){l=!1,e(j)}),p&&(b.key=n,b.plugin="wTooltip",b.channel="wayfarer",a.talk(b)),d(b.content&&!b.ajax),a(n).appendTo(b.appendTip),this.each(function(){a(this).hover(function(){function c(){"function"==typeof b.callBefore&&b.callBefore(n,d,b),p&&(b=a.listen(b));var c;b.content?b.degrade||(c="block"):f&&!b.degrade?(a(n).html(unescape(f)),c="block",f=""):c="none",b.auto&&("block"==c&&b.fadeIn?a(n).fadeIn(b.fadeIn):n.style.display=c)}var d=this;clearTimeout(h),!this.title&&!this.titleMemKeep||b.degrade||b.content||(f=this.title||this.titleMemKeep,this.title&&(this.titleMemKeep=this.title,this.title="")),b.content&&b.degrade&&(this.title=n.innerHTML),b.delay>0?g=setTimeout(function(){c()},b.delay):c()},function(){clearTimeout(g);var c=this;k=!0,!b.follow||m||b.offsetX<0&&0-b.offsetX<a(n).outerWidth()&&b.offsetY>0&&0-b.offsetY<a(n).outerHeight()?setTimeout(function(){i=setInterval(function(){e(c)},1)},1):e(this)}),a(this).mousemove(function(c){if(j=this,b.follow||k){var d=a(window).scrollTop(),e=a(window).scrollLeft(),f=c.clientY+d+b.offsetY,g=c.clientX+e+b.offsetX,h=a(b.appendTip).outerHeight(),i=a(b.appendTip).innerHeight(),l=a(window).width()+e-a(n).outerWidth(),o=a(window).height()+d-a(n).outerHeight();f=h>i?f-(h-i):f,m=f>o||g>l?!0:!1,0>=g-e&&b.offsetX<0?g=e:g>l&&(g=l),0>=f-d&&b.offsetY<0?f=d:f>o&&(f=o),n.style.top=f+"px",n.style.left=g+"px",k=!1}}),"function"==typeof b.clickAction&&a(this).click(function(){b.clickAction(n,this)})})}}(jQuery),function(a,b){"use strict";var c={border:"solid 1px #6295fb",background:"#fff",color:"#000",padding:"5px",zIndex:1e3},d={activeTab:{},terms:{},authors:[],init:function(){var c=a("body");c.delegate("input[id$=-color_none], input[id$=-color_random], input[id$=-color_set], input[id$=-color_span]","click",this.colorClickHandler),c.delegate("input[id$=-title_type_counter], input[id$=-title_type_name], input[id$=-title_type_custom]","click",this.titleTypeClickHandler),c.delegate(".utcw-tab-button","click",this.tabClickHandler),c.delegate(".utcw-input-taxonomy","click",this.taxonomyClickHandler),c.delegate(".utcw-all-authors","click",this.allAuthorsClickHandler),c.delegate(".utcw-selected-authors","click",this.selectedAuthorsClickHandler),c.delegate(".utcw-remove-config","click",this.removeConfigClickHandler),c.delegate(".post-term-search","keyup",this.postTermSearchHandler),c.delegate(".post-term-search","search",this.postTermSearchHandler),c.delegate(".tags-list-search","keyup",this.postTermSearchHandler),c.delegate(".tags-list-search","search",this.postTermSearchHandler),c.delegate(".author-search","keyup",this.authorSearchHandler),c.delegate(".author-search","search",this.authorSearchHandler),c.delegate(".utcw-remove-item","click",this.removeTermClickHandler),a(document).ready(this.initTooltip),a(document).ajaxSuccess(this.ajaxSuccessHandler),a.post(b,{action:"utcw_get_terms"},function(a){d.terms=a}),a.post(b,{action:"utcw_get_authors"},function(a){d.authors=a})},initTooltip:function(){a(".utcw-help").wTooltip({style:c,className:"utcw-tooltip"})},postTermSearchHandler:function(){var b=a(this),c=a(b.data("result-selector")),e=a(b.data("selected-selector")),f=b.val().toLocaleLowerCase(),g=[],h=function(a){-1!==a.name.toLocaleLowerCase().indexOf(f)&&g.push(a)};if(c.text(""),f){for(var i in d.terms)d.terms.hasOwnProperty(i)&&d.terms[i].forEach(h);g.forEach(function(f){var g=a(document.createElement("li")),h=a(document.createElement("a")),i=f.name+" ("+f.taxonomy+")";h.text(i),h.data("id",f.term_id),h.click(d.selectionClickHandler(e,b)),g.append(h),c.append(g)})}},selectionClickHandler:function(b,c){return function(){var d=a(this),e=a(document.createElement("li")),f=a(document.createElement("a")),g=a(document.createElement("span")),h=a(document.createElement("input")),i=d.parent().parent();e.text(d.text()),h.attr("type","hidden"),h.val(d.data("id")),h.attr("name",c.data("input-name")+"[]"),f.addClass("submitdelete"),f.addClass("deletion"),f.addClass("utcw-remove-item"),f.text(c.data("delete")),g.addClass("submitbox"),g.append(f),e.append(g),e.append(h),b.append(e),i.text(""),c.val("")}},authorSearchHandler:function(){var b=a(this),c=a(b.data("result-selector")),e=a(b.data("selected-selector")),f=b.val().toLocaleLowerCase(),g=[];c.text(""),f&&(d.authors.forEach(function(a){-1!==a.display_name.toLocaleLowerCase().indexOf(f)&&g.push(a)}),g.forEach(function(f){var g=a(document.createElement("li")),h=a(document.createElement("a")),i=f.display_name;h.text(i),h.data("id",f.ID),h.click(d.selectionClickHandler(e,b)),g.append(h),c.append(g)}))},removeTermClickHandler:function(){a(this).parent().parent().remove()},removeConfigClickHandler:function(){var b=a(this),c=d.findWidgetParent(b),e=c.find(".utcw-load-config"),f=e.val(),g=b.data("input-name")+"[]",h=a(document.createElement("input"));h.attr("type","hidden"),h.attr("name",g),h.attr("value",f),b.after(h),e.find(":selected").remove()},allAuthorsClickHandler:function(){var b=a(this),c=d.findWidgetParent(b);c.find(".utcw-authors").addClass("hidden"),c.find("[name*='[authors]']").attr("disabled",!0)},selectedAuthorsClickHandler:function(){var b=a(this),c=d.findWidgetParent(b);c.find(".utcw-authors").removeClass("hidden"),c.find("[name*='[authors]']").attr("disabled",!1)},tabClickHandler:function(){var b=a(this);return"utcw-__i__"===b.data("id")?!1:(b.parent().find(".utcw-tab-button").removeClass("utcw-active"),b.addClass("utcw-active"),b.parent().find("fieldset.utcw").addClass("hidden"),a("#"+b.data("tab")).removeClass("hidden"),d.activeTab[b.data("id")]=b.data("tab"),!1)},colorClickHandler:function(){var b=a('div[id$="set_chooser"]'),c=a('div[id$="span_chooser"]'),d=a(this).val();b.addClass("utcw-hidden"),c.addClass("utcw-hidden"),"set"===d?b.removeClass("utcw-hidden"):"span"===d&&c.removeClass("utcw-hidden")},titleTypeClickHandler:function(){var b=a('div[id$="-title_custom_template_container"]'),c=a(this).val();"custom"===c?b.removeClass("utcw-hidden"):b.addClass("utcw-hidden")},findWidgetParent:function(a){return a.parents(".widget-content")},taxonomyClickHandler:function(){var b=a(this),c=b.val(),e=b.is(":checked"),f=d.findWidgetParent(b),g=f.find("#"+c+"-terms");e?g.removeClass("hidden"):g.addClass("hidden")},ajaxSuccessHandler:function(a,b,c){d.setCurrentTab.apply(d,[c.data]),d.initTooltip.apply(d)},setCurrentTab:function(b){var c,d=new Uri;d.setQuery(decodeURI(b)),"save-widget"===d.getQueryParamValue("action")&&"utcw"===d.getQueryParamValue("id_base")&&(c=d.getQueryParamValue("widget-id"),this.activeTab[c]&&a('button[data-tab="'+this.activeTab[c]+'"]').trigger("click"))}};d.init()}(jQuery,ajaxurl);
1
+ /*! utcw - v2.7.2 - 2014-04-19*/var Query=function(a){"use strict";var b=function(a){var b,c,d,e,f=[];if("undefined"==typeof a||null===a||""===a)return f;for(0===a.indexOf("?")&&(a=a.substring(1)),c=a.toString().split(/[&;]/),b=0;b<c.length;b++)d=c[b],e=d.split("="),f.push([e[0],e[1]]);return f},c=b(a),d=function(){var a,b,d="";for(a=0;a<c.length;a++)b=c[a],d.length>0&&(d+="&"),d+=b.join("=");return d.length>0?"?"+d:d},e=function(a){return a=decodeURIComponent(a),a=a.replace("+"," ")},f=function(a){var b,d;for(d=0;d<c.length;d++)if(b=c[d],e(a)===e(b[0]))return b[1]},g=function(a){var b,d,f=[];for(b=0;b<c.length;b++)d=c[b],e(a)===e(d[0])&&f.push(d[1]);return f},h=function(a,b){var d,f,g,h,i=[];for(d=0;d<c.length;d++)f=c[d],g=e(f[0])===e(a),h=e(f[1])===e(b),(1===arguments.length&&!g||2===arguments.length&&!g&&!h)&&i.push(f);return c=i,this},i=function(a,b,d){return 3===arguments.length&&-1!==d?(d=Math.min(d,c.length),c.splice(d,0,[a,b])):arguments.length>0&&c.push([a,b]),this},j=function(a,b,d){var f,g,j=-1;if(3===arguments.length){for(f=0;f<c.length;f++)if(g=c[f],e(g[0])===e(a)&&decodeURIComponent(g[1])===e(d)){j=f;break}h(a,d).addParam(a,b,j)}else{for(f=0;f<c.length;f++)if(g=c[f],e(g[0])===e(a)){j=f;break}h(a),i(a,b,j)}return this};return{getParamValue:f,getParamValues:g,deleteParam:h,addParam:i,replaceParam:j,toString:d}},Uri=function(a){"use strict";var b=!1,c=function(a){for(var c={strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/},d=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],e={name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},f=c[b?"strict":"loose"].exec(a),g={},h=14;h--;)g[d[h]]=f[h]||"";return g[e.name]={},g[d[12]].replace(e.parser,function(a,b,c){b&&(g[e.name][b]=c)}),g},d=c(a||""),e=new Query(d.query),f=function(a){return"undefined"!=typeof a&&(d.protocol=a),d.protocol},g=null,h=function(a){return"undefined"!=typeof a&&(g=a),null===g?-1!==d.source.indexOf("//"):g},i=function(a){return"undefined"!=typeof a&&(d.userInfo=a),d.userInfo},j=function(a){return"undefined"!=typeof a&&(d.host=a),d.host},k=function(a){return"undefined"!=typeof a&&(d.port=a),d.port},l=function(a){return"undefined"!=typeof a&&(d.path=a),d.path},m=function(a){return"undefined"!=typeof a&&(e=new Query(a)),e},n=function(a){return"undefined"!=typeof a&&(d.anchor=a),d.anchor},o=function(a){return f(a),this},p=function(a){return h(a),this},q=function(a){return i(a),this},r=function(a){return j(a),this},s=function(a){return k(a),this},t=function(a){return l(a),this},u=function(a){return m(a),this},v=function(a){return n(a),this},w=function(a){return m().getParamValue(a)},x=function(a){return m().getParamValues(a)},y=function(a,b){return 2===arguments.length?m().deleteParam(a,b):m().deleteParam(a),this},z=function(a,b,c){return 3===arguments.length?m().addParam(a,b,c):m().addParam(a,b),this},A=function(a,b,c){return 3===arguments.length?m().replaceParam(a,b,c):m().replaceParam(a,b),this},B=function(){var a="",b=function(a){return null!==a&&""!==a};return b(f())?(a+=f(),f().indexOf(":")!==f().length-1&&(a+=":"),a+="//"):h()&&b(j())&&(a+="//"),b(i())&&b(j())&&(a+=i(),i().indexOf("@")!==i().length-1&&(a+="@")),b(j())&&(a+=j(),b(k())&&(a+=":"+k())),b(l())?a+=l():b(j())&&(b(m().toString())||b(n()))&&(a+="/"),b(m().toString())&&(0!==m().toString().indexOf("?")&&(a+="?"),a+=m().toString()),b(n())&&(0!==n().indexOf("#")&&(a+="#"),a+=n()),a},C=function(){return new Uri(B())};return{protocol:f,hasAuthorityPrefix:h,userInfo:i,host:j,port:k,path:l,query:m,anchor:n,setProtocol:o,setHasAuthorityPrefix:p,setUserInfo:q,setHost:r,setPort:s,setPath:t,setQuery:u,setAnchor:v,getQueryParamValue:w,getQueryParamValues:x,deleteQueryParam:y,addQueryParam:z,replaceQueryParam:A,toString:B,clone:C}},jsUri=Uri;!function(a){a.fn.wTooltip=function(b,c){function d(c){c&&(b.degrade?a(n).html(b.content.replace(/<\/?[^>]+>/gi,"")):a(n).html(b.content))}function e(c){function d(){f&&!b.content&&(f="")}function e(){!l&&b.auto&&(clearInterval(i),b.fadeOut?a(n).fadeOut(b.fadeOut,function(){d(c)}):(d(c),n.style.display="none")),"function"==typeof b.callAfter&&b.callAfter(n,c,b),p&&(b=a.listen(b))}b.timeout>0?h=setTimeout(function(){e()},b.timeout):e()}b=a.extend({content:null,ajax:null,follow:!0,auto:!0,fadeIn:0,fadeOut:0,appendTip:document.body,degrade:!1,offsetY:10,offsetX:1,style:{},className:null,id:null,callBefore:function(){},callAfter:function(){},clickAction:function(b){a(b).hide()},delay:0,timeout:0},b||{}),b.style||"object"==typeof b.style?b.style=a.extend({border:"1px solid gray",background:"#edeef0",color:"#000",padding:"10px",zIndex:"1000",textAlign:"left"},b.style||{}):(b.style={},b.style.zIndex="1000"),"function"==typeof c&&(b.callAfter=c||b.callAfter),b.style.display="none",b.style.position="absolute";var f,g,h,i,j={},k=!0,l=!1,m=!1,n=document.createElement("div"),o="undefined"==typeof document.body.style.maxWidth?!0:!1,p="function"==typeof a.talk&&"function"==typeof a.listen?!0:!1;b.id&&(n.id=b.id),b.className&&(n.className=b.className),b.degrade=b.degrade&&o?!0:!1;for(var q in b.style)n.style[q]=b.style[q];return b.ajax&&a.get(b.ajax,function(a){a&&(b.content=a),d(b.content)}),a(n).hover(function(){l=!0},function(){l=!1,e(j)}),p&&(b.key=n,b.plugin="wTooltip",b.channel="wayfarer",a.talk(b)),d(b.content&&!b.ajax),a(n).appendTo(b.appendTip),this.each(function(){a(this).hover(function(){function c(){"function"==typeof b.callBefore&&b.callBefore(n,d,b),p&&(b=a.listen(b));var c;b.content?b.degrade||(c="block"):f&&!b.degrade?(a(n).html(unescape(f)),c="block",f=""):c="none",b.auto&&("block"==c&&b.fadeIn?a(n).fadeIn(b.fadeIn):n.style.display=c)}var d=this;clearTimeout(h),!this.title&&!this.titleMemKeep||b.degrade||b.content||(f=this.title||this.titleMemKeep,this.title&&(this.titleMemKeep=this.title,this.title="")),b.content&&b.degrade&&(this.title=n.innerHTML),b.delay>0?g=setTimeout(function(){c()},b.delay):c()},function(){clearTimeout(g);var c=this;k=!0,!b.follow||m||b.offsetX<0&&0-b.offsetX<a(n).outerWidth()&&b.offsetY>0&&0-b.offsetY<a(n).outerHeight()?setTimeout(function(){i=setInterval(function(){e(c)},1)},1):e(this)}),a(this).mousemove(function(c){if(j=this,b.follow||k){var d=a(window).scrollTop(),e=a(window).scrollLeft(),f=c.clientY+d+b.offsetY,g=c.clientX+e+b.offsetX,h=a(b.appendTip).outerHeight(),i=a(b.appendTip).innerHeight(),l=a(window).width()+e-a(n).outerWidth(),o=a(window).height()+d-a(n).outerHeight();f=h>i?f-(h-i):f,m=f>o||g>l?!0:!1,0>=g-e&&b.offsetX<0?g=e:g>l&&(g=l),0>=f-d&&b.offsetY<0?f=d:f>o&&(f=o),n.style.top=f+"px",n.style.left=g+"px",k=!1}}),"function"==typeof b.clickAction&&a(this).click(function(){b.clickAction(n,this)})})}}(jQuery),function(a,b){"use strict";var c={border:"solid 1px #6295fb",background:"#fff",color:"#000",padding:"5px",zIndex:1e3},d={activeTab:{},terms:{},authors:[],init:function(){var c=a("body");c.delegate("input[id$=-color_none], input[id$=-color_random], input[id$=-color_set], input[id$=-color_span]","click",this.colorClickHandler),c.delegate("input[id$=-title_type_counter], input[id$=-title_type_name], input[id$=-title_type_custom]","click",this.titleTypeClickHandler),c.delegate(".utcw-tab-button","click",this.tabClickHandler),c.delegate(".utcw-input-taxonomy","click",this.taxonomyClickHandler),c.delegate(".utcw-all-authors","click",this.allAuthorsClickHandler),c.delegate(".utcw-selected-authors","click",this.selectedAuthorsClickHandler),c.delegate(".utcw-remove-config","click",this.removeConfigClickHandler),c.delegate(".post-term-search","keyup",this.postTermSearchHandler),c.delegate(".post-term-search","search",this.postTermSearchHandler),c.delegate(".tags-list-search","keyup",this.postTermSearchHandler),c.delegate(".tags-list-search","search",this.postTermSearchHandler),c.delegate(".author-search","keyup",this.authorSearchHandler),c.delegate(".author-search","search",this.authorSearchHandler),c.delegate(".utcw-remove-item","click",this.removeTermClickHandler),a(document).ready(this.initTooltip),a(document).ajaxSuccess(this.ajaxSuccessHandler),a.post(b,{action:"utcw_get_terms"},function(a){d.terms=a}),a.post(b,{action:"utcw_get_authors"},function(a){d.authors=a})},initTooltip:function(){a(".utcw-help").wTooltip({style:c,className:"utcw-tooltip"})},postTermSearchHandler:function(){var b=a(this),c=a(b.data("result-selector")),e=a(b.data("selected-selector")),f=b.val().toLocaleLowerCase(),g=[],h=function(a){-1!==a.name.toLocaleLowerCase().indexOf(f)&&g.push(a)};if(c.text(""),f){for(var i in d.terms)d.terms.hasOwnProperty(i)&&d.terms[i].forEach(h);g.forEach(function(f){var g=a(document.createElement("li")),h=a(document.createElement("a")),i=f.name+" ("+f.taxonomy+")";h.text(i),h.data("id",f.term_id),h.click(d.selectionClickHandler(e,b)),g.append(h),c.append(g)})}},selectionClickHandler:function(b,c){return function(){var d=a(this),e=a(document.createElement("li")),f=a(document.createElement("a")),g=a(document.createElement("span")),h=a(document.createElement("input")),i=d.parent().parent();e.text(d.text()),h.attr("type","hidden"),h.val(d.data("id")),h.attr("name",c.data("input-name")+"[]"),f.addClass("submitdelete"),f.addClass("deletion"),f.addClass("utcw-remove-item"),f.text(c.data("delete")),g.addClass("submitbox"),g.append(f),e.append(g),e.append(h),b.append(e),i.text(""),c.val("")}},authorSearchHandler:function(){var b=a(this),c=a(b.data("result-selector")),e=a(b.data("selected-selector")),f=b.val().toLocaleLowerCase(),g=[];c.text(""),f&&(d.authors.forEach(function(a){-1!==a.display_name.toLocaleLowerCase().indexOf(f)&&g.push(a)}),g.forEach(function(f){var g=a(document.createElement("li")),h=a(document.createElement("a")),i=f.display_name;h.text(i),h.data("id",f.ID),h.click(d.selectionClickHandler(e,b)),g.append(h),c.append(g)}))},removeTermClickHandler:function(){a(this).parent().parent().remove()},removeConfigClickHandler:function(){var b=a(this),c=d.findWidgetParent(b),e=c.find(".utcw-load-config"),f=e.val(),g=b.data("input-name")+"[]",h=a(document.createElement("input"));h.attr("type","hidden"),h.attr("name",g),h.attr("value",f),b.after(h),e.find(":selected").remove()},allAuthorsClickHandler:function(){var b=a(this),c=d.findWidgetParent(b);c.find(".utcw-authors").addClass("hidden"),c.find("[name*='[authors]']").attr("disabled",!0)},selectedAuthorsClickHandler:function(){var b=a(this),c=d.findWidgetParent(b);c.find(".utcw-authors").removeClass("hidden"),c.find("[name*='[authors]']").attr("disabled",!1)},tabClickHandler:function(){var b=a(this);return"utcw-__i__"===b.data("id")?!1:(b.parent().find(".utcw-tab-button").removeClass("utcw-active"),b.addClass("utcw-active"),b.parent().find("fieldset.utcw").addClass("hidden"),a("#"+b.data("tab")).removeClass("hidden"),d.activeTab[b.data("id")]=b.data("tab"),!1)},colorClickHandler:function(){var b=a('div[id$="set_chooser"]'),c=a('div[id$="span_chooser"]'),d=a(this).val();b.addClass("utcw-hidden"),c.addClass("utcw-hidden"),"set"===d?b.removeClass("utcw-hidden"):"span"===d&&c.removeClass("utcw-hidden")},titleTypeClickHandler:function(){var b=a('div[id$="-title_custom_template_container"]'),c=a(this).val();"custom"===c?b.removeClass("utcw-hidden"):b.addClass("utcw-hidden")},findWidgetParent:function(a){return a.parents(".widget-content")},taxonomyClickHandler:function(){var b=a(this),c=b.val(),e=b.is(":checked"),f=d.findWidgetParent(b),g=f.find("#"+c+"-terms");e?g.removeClass("hidden"):g.addClass("hidden")},ajaxSuccessHandler:function(a,b,c){d.setCurrentTab.apply(d,[c.data]),d.initTooltip.apply(d)},setCurrentTab:function(b){var c,d=new Uri;d.setQuery(decodeURI(b)),"save-widget"===d.getQueryParamValue("action")&&"utcw"===d.getQueryParamValue("id_base")&&(c=d.getQueryParamValue("widget-id"),this.activeTab[c]&&a('button[data-tab="'+this.activeTab[c]+'"]').trigger("click"))}};d.init()}(jQuery,ajaxurl);
pages/settings.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Ultimate Tag Cloud Widget
4
  * @author Rickard Andersson <rickard@0x539.se>
5
- * @version 2.7.1
6
  * @license GPLv2
7
  * @package utcw
8
  * @subpackage pages
2
  /**
3
  * Ultimate Tag Cloud Widget
4
  * @author Rickard Andersson <rickard@0x539.se>
5
+ * @version 2.7.2
6
  * @license GPLv2
7
  * @package utcw
8
  * @subpackage pages
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: exz
3
  Tags: widget, tags, configurable, tag cloud
4
  Requires at least: 3.0
5
  Tested up to: 3.9
6
- Stable tag: 2.7.1
7
  Donate link: https://0x539.se/donations/
8
  License: GPLv2 or later
9
 
@@ -21,7 +21,9 @@ This is the highly configurable tag cloud widget, the main features for this plu
21
  - Multiple strategies for selecting terms with the option to [create your own](https://github.com/rickard2/utcw/blob/master/STRATEGY.md). Built in strategies for most popular, random, recently added, from current list of posts
22
  - Short code and API for developers
23
 
24
- This plugin is under active development and my goal is to try to help everyone who have issues or suggestions for this plugin. If you find bugs or have feature requests please use [GitHub issues](https://github.com/rickard2/utcw/issues), if you need support please use the [WordPress forums](http://wordpress.org/support/plugin/ultimate-tag-cloud-widget). You're also always welcome to contact me by e-mail or Google Talk; rickard at 0x539.se
 
 
25
 
26
  Quick links:
27
 
@@ -56,6 +58,10 @@ If you have questions, please post them in the forums.
56
 
57
  == Changelog ==
58
 
 
 
 
 
59
  = 2.7.1 =
60
 
61
  * [#66](https://github.com/rickard2/utcw/issues/66): Fix issues with theme customizer in 3.9
@@ -150,6 +156,10 @@ The upgrade notice history for the 1.x branch is available on [GitHub](https://g
150
 
151
  == Upgrade Notice ==
152
 
 
 
 
 
153
  = 2.7.1 =
154
 
155
  * Fix issues with theme customizer in 3.9
3
  Tags: widget, tags, configurable, tag cloud
4
  Requires at least: 3.0
5
  Tested up to: 3.9
6
+ Stable tag: 2.7.2
7
  Donate link: https://0x539.se/donations/
8
  License: GPLv2 or later
9
 
21
  - Multiple strategies for selecting terms with the option to [create your own](https://github.com/rickard2/utcw/blob/master/STRATEGY.md). Built in strategies for most popular, random, recently added, from current list of posts
22
  - Short code and API for developers
23
 
24
+ The development of this plugin has stopped. I will make sure that the basic features still work with upcoming WordPress versions, but no new features or changes will be made.
25
+
26
+ The [code is available on github](https://github.com/rickard2/utcw) and if you're in need of new features, you're welcome to submit a pull request for it.
27
 
28
  Quick links:
29
 
58
 
59
  == Changelog ==
60
 
61
+ = 2.7.2 =
62
+
63
+ * [#69](https://github.com/rickard2/utcw/issues/69): Fix issues selection strategies
64
+
65
  = 2.7.1 =
66
 
67
  * [#66](https://github.com/rickard2/utcw/issues/66): Fix issues with theme customizer in 3.9
156
 
157
  == Upgrade Notice ==
158
 
159
+ = 2.7.2 =
160
+
161
+ * Fix issues selection strategies
162
+
163
  = 2.7.1 =
164
 
165
  * Fix issues with theme customizer in 3.9
src/Cache/W3TotalCacheHandler.php CHANGED
@@ -4,7 +4,7 @@
4
  * Ultimate Tag Cloud Widget
5
  *
6
  * @author Rickard Andersson <rickard@0x539.se>
7
- * @version 2.7.1
8
  * @license GPLv2
9
  * @package utcw
10
  * @subpackage cache
4
  * Ultimate Tag Cloud Widget
5
  *
6
  * @author Rickard Andersson <rickard@0x539.se>
7
+ * @version 2.7.2
8
  * @license GPLv2
9
  * @package utcw
10
  * @subpackage cache
src/Cache/WPSuperCacheHandler.php CHANGED
@@ -3,7 +3,7 @@
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
- * @version 2.7.1
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage cache
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
+ * @version 2.7.2
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage cache
src/Config/Config.php CHANGED
@@ -3,7 +3,7 @@
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
- * @version 2.7.1
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage config
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
+ * @version 2.7.2
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage config
src/Config/DataConfig.php CHANGED
@@ -3,7 +3,7 @@
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
- * @version 2.7.1
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage config
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
+ * @version 2.7.2
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage config
src/Config/RenderConfig.php CHANGED
@@ -3,7 +3,7 @@
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
- * @version 2.7.1
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage config
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
+ * @version 2.7.2
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage config
src/Config/Type/ArrayType.php CHANGED
@@ -3,7 +3,7 @@
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
- * @version 2.7.1
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage config-type
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
+ * @version 2.7.2
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage config-type
src/Config/Type/BooleanType.php CHANGED
@@ -3,7 +3,7 @@
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
- * @version 2.7.1
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage config-type
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
+ * @version 2.7.2
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage config-type
src/Config/Type/ClassType.php CHANGED
@@ -3,7 +3,7 @@
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
- * @version 2.7.1
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage config-type
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
+ * @version 2.7.2
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage config-type
src/Config/Type/ColorType.php CHANGED
@@ -3,7 +3,7 @@
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
- * @version 2.7.1
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage config-type
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
+ * @version 2.7.2
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage config-type
src/Config/Type/IntegerType.php CHANGED
@@ -3,7 +3,7 @@
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
- * @version 2.7.1
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage config-type
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
+ * @version 2.7.2
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage config-type
src/Config/Type/MeasurementType.php CHANGED
@@ -3,7 +3,7 @@
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
- * @version 2.7.1
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage config-type
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
+ * @version 2.7.2
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage config-type
src/Config/Type/SetType.php CHANGED
@@ -3,7 +3,7 @@
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
- * @version 2.7.1
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage config-type
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
+ * @version 2.7.2
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage config-type
src/Config/Type/StringType.php CHANGED
@@ -3,7 +3,7 @@
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
- * @version 2.7.1
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage config-type
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
+ * @version 2.7.2
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage config-type
src/Config/Type/Type.php CHANGED
@@ -3,7 +3,7 @@
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
- * @version 2.7.1
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage config-type
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
+ * @version 2.7.2
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage config-type
src/Data.php CHANGED
@@ -3,7 +3,7 @@
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
- * @version 2.7.1
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage main
@@ -131,6 +131,14 @@ class UTCW_Data
131
  $this->translationHandler = $this->plugin->get('translationHandler');
132
 
133
  foreach ($this->result as $item) {
 
 
 
 
 
 
 
 
134
  if ($this->translationHandler) {
135
 
136
  // Let the translation handler determine if the term should be included or not
@@ -144,20 +152,6 @@ class UTCW_Data
144
  }
145
  }
146
 
147
- if ($this->config->max) {
148
- $this->terms = array_slice($this->terms, 0, $this->config->max);
149
- }
150
-
151
- foreach ($this->terms as $item) {
152
- if ($item->count < $min_count) {
153
- $min_count = $item->count;
154
- }
155
-
156
- if ($item->count > $max_count) {
157
- $max_count = $item->count;
158
- }
159
- }
160
-
161
  if ($this->config->post_term_query_var && $this->config->post_term) {
162
  $this->addTermFilterQueryVars();
163
  }
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
+ * @version 2.7.2
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage main
131
  $this->translationHandler = $this->plugin->get('translationHandler');
132
 
133
  foreach ($this->result as $item) {
134
+ if ($item->count < $min_count) {
135
+ $min_count = $item->count;
136
+ }
137
+
138
+ if ($item->count > $max_count) {
139
+ $max_count = $item->count;
140
+ }
141
+
142
  if ($this->translationHandler) {
143
 
144
  // Let the translation handler determine if the term should be included or not
152
  }
153
  }
154
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
155
  if ($this->config->post_term_query_var && $this->config->post_term) {
156
  $this->addTermFilterQueryVars();
157
  }
src/Database/QueryBuilder.php CHANGED
@@ -3,7 +3,7 @@
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
- * @version 2.7.1
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage language
@@ -296,6 +296,19 @@ class UTCW_QueryBuilder
296
  }
297
  }
298
 
 
 
 
 
 
 
 
 
 
 
 
 
 
299
  /**
300
  * Add sorting the result
301
  *
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
+ * @version 2.7.2
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage language
296
  }
297
  }
298
 
299
+ /**
300
+ * Add max constraint
301
+ *
302
+ * @param int $max
303
+ *
304
+ * @since 2.2
305
+ */
306
+ public function addMaxConstraint($max)
307
+ {
308
+ $this->query[] = 'LIMIT %d';
309
+ $this->parameters[] = $max;
310
+ }
311
+
312
  /**
313
  * Add sorting the result
314
  *
src/Handler/Handler.php CHANGED
@@ -3,7 +3,7 @@
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
- * @version 2.7.1
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage handler
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
+ * @version 2.7.2
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage handler
src/Handler/HandlerFactory.php CHANGED
@@ -3,7 +3,7 @@
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
- * @version 2.7.1
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage handler
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
+ * @version 2.7.2
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage handler
src/Language/QTranslateHandler.php CHANGED
@@ -3,7 +3,7 @@
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
- * @version 2.7.1
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage language
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
+ * @version 2.7.2
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage language
src/Language/TranslationHandler.php CHANGED
@@ -3,7 +3,7 @@
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
- * @version 2.7.1
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage language
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
+ * @version 2.7.2
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage language
src/Language/WPMLHandler.php CHANGED
@@ -3,7 +3,7 @@
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
- * @version 2.7.1
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage language
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
+ * @version 2.7.2
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage language
src/Plugin.php CHANGED
@@ -11,7 +11,7 @@
11
  * Ultimate Tag Cloud Widget
12
  *
13
  * @author Rickard Andersson <rickard@0x539.se>
14
- * @version 2.7.1
15
  * @license GPLv2
16
  * @package utcw
17
  * @subpackage main
11
  * Ultimate Tag Cloud Widget
12
  *
13
  * @author Rickard Andersson <rickard@0x539.se>
14
+ * @version 2.7.2
15
  * @license GPLv2
16
  * @package utcw
17
  * @subpackage main
src/Render.php CHANGED
@@ -3,7 +3,7 @@
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
- * @version 2.7.1
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage main
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
+ * @version 2.7.2
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage main
src/Selection/CreationTimeStrategy.php CHANGED
@@ -3,7 +3,7 @@
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
- * @version 2.7.1
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage selection
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
+ * @version 2.7.2
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage selection
src/Selection/CurrentListStrategy.php CHANGED
@@ -3,7 +3,7 @@
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
- * @version 2.7.1
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage selection
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
+ * @version 2.7.2
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage selection
src/Selection/PopularityStrategy.php CHANGED
@@ -3,7 +3,7 @@
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
- * @version 2.7.1
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage selection
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
+ * @version 2.7.2
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage selection
src/Selection/RandomStrategy.php CHANGED
@@ -3,7 +3,7 @@
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
- * @version 2.7.1
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage selection
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
+ * @version 2.7.2
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage selection
src/Selection/SelectionStrategy.php CHANGED
@@ -3,7 +3,7 @@
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
- * @version 2.7.1
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage selection
@@ -116,6 +116,7 @@ class UTCW_SelectionStrategy
116
  // Add statements from the strategy
117
  $this->buildQuery($builder);
118
 
 
119
  $builder->addSort($config->order, $config->reverse, $config->case_sensitive);
120
 
121
  $query = $builder->getQuery();
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
+ * @version 2.7.2
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage selection
116
  // Add statements from the strategy
117
  $this->buildQuery($builder);
118
 
119
+ $builder->addMaxConstraint($config->max);
120
  $builder->addSort($config->order, $config->reverse, $config->case_sensitive);
121
 
122
  $query = $builder->getQuery();
src/ShortCode.php CHANGED
@@ -3,7 +3,7 @@
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
- * @version 2.7.1
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage main
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
+ * @version 2.7.2
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage main
src/Style/HoverStyleProvider.php CHANGED
@@ -3,7 +3,7 @@
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
- * @version 2.7.1
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage style
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
+ * @version 2.7.2
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage style
src/Style/LinkStyleProvider.php CHANGED
@@ -3,7 +3,7 @@
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
- * @version 2.7.1
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage style
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
+ * @version 2.7.2
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage style
src/Style/MainStyleProvider.php CHANGED
@@ -3,7 +3,7 @@
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
- * @version 2.7.1
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage style
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
+ * @version 2.7.2
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage style
src/Style/StyleProvider.php CHANGED
@@ -3,7 +3,7 @@
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
- * @version 2.7.1
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage style
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
+ * @version 2.7.2
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage style
src/Term.php CHANGED
@@ -3,7 +3,7 @@
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
- * @version 2.7.1
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage main
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
+ * @version 2.7.2
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage main
src/Widget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
- * @version 2.7.1
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage main
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
+ * @version 2.7.2
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage main
ultimate-tag-cloud-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Ultimate Tag Cloud Widget
4
  Plugin URI: https://www.0x539.se/wordpress/ultimate-tag-cloud-widget/
5
  Description: This plugin aims to be the most configurable tag cloud widget out there.
6
- Version: 2.7.1
7
  Author: Rickard Andersson
8
  Author URI: https://www.0x539.se
9
  License: GPLv2
@@ -15,7 +15,7 @@ License: GPLv2
15
  * @var string
16
  * @since 2.0
17
  */
18
- define('UTCW_VERSION', '2.7.1');
19
 
20
  /**
21
  * If development mode is currently enabled
3
  Plugin Name: Ultimate Tag Cloud Widget
4
  Plugin URI: https://www.0x539.se/wordpress/ultimate-tag-cloud-widget/
5
  Description: This plugin aims to be the most configurable tag cloud widget out there.
6
+ Version: 2.7.2
7
  Author: Rickard Andersson
8
  Author URI: https://www.0x539.se
9
  License: GPLv2
15
  * @var string
16
  * @since 2.0
17
  */
18
+ define('UTCW_VERSION', '2.7.2');
19
 
20
  /**
21
  * If development mode is currently enabled