Ultimate Tag Cloud Widget - Version 2.7-beta1

Version Description

= 2.6.1 =

  • Markup issues fixed

= 2.6 =

  • New features, see plugin page at wordpress.org for full details.

= 2.5 =

  • New features, see plugin page at wordpress.org for full details.

= 2.4 =

  • Issues with WPML and custom taxonomies resolved. New features, see plugin page at wordpress.org for full details.

= 2.3.1 =

  • Security fix for sensitive data exposed when using the debug option

= 2.3 =

  • New features, see plugin page at wordpress.org for full details. Watch out for the changes in class names: https://github.com/rickard2/utcw/issues/29

= 2.2.3 =

  • Fixed naming collision issue with other plugins

= 2.2.2 =

  • Fixed widget initialization issue

= 2.2.1 =

  • Fixes compatibility issue with PHP 5.2

= 2.2 =

  • New features, see the plugin page at wordpress.org for full details

= 2.1 =

  • New features, see the plugin page at wordpress.org for full details

= 2.0.1 =

  • Small bug fix in the widget options panel

= 2.0 =

  • New plugin architecture and a big rewrite of the plugin foundation. Watch out for breaking changes, please see http://exz.nu/utcwbreaking for more information.
Download this release

Release Info

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

Code changes from version 2.6.1 to 2.7-beta1

js/utcw.min.js CHANGED
@@ -1 +1 @@
1
- /*! utcw - v2.6.1 - 2013-12-26*/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 - 2013-12-26*/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.6.1
6
  * @license GPLv2
7
  * @package utcw
8
  * @subpackage pages
@@ -82,11 +82,11 @@ if ( ! defined( 'ABSPATH' ) ) die();
82
  <ul class="author-search-selected" id="<?php echo $this->get_field_id('author-search-selected') ?>">
83
  <?php foreach ($dataConfig->authors as $author_id) : $author = $authors_by_id[$author_id]; ?>
84
  <li>
85
- <?php echo $author->display_name ?>
86
  <span class="submitbox">
87
  <a class="submitdelete deletion utcw-remove-item"><?php _e('Delete', 'utcw') ?></a>
88
  </span>
89
- <input type="hidden" name="<?php echo $this->get_field_name( 'authors' ) ?>[]" value="<?php echo $author_id ?>" />
90
  </li>
91
  <?php endforeach ?>
92
  </ul>
@@ -135,8 +135,8 @@ if ( ! defined( 'ABSPATH' ) ) die();
135
  for="<?php echo $this->get_field_id( 'taxonomy' ) ?>"><?php _e( 'Taxonomies:', 'utcw' ) ?></label></strong><br>
136
  <?php foreach ( $available_taxonomies as $taxonomy ) : ?>
137
  <label>
138
- <input type="checkbox" class="utcw-input-taxonomy" value="<?php echo $taxonomy->name ?>" name="<?php echo $this->get_field_name( 'taxonomy' ) ?>[]" <?php if ( in_array( $taxonomy->name, $dataConfig->taxonomy ) ) echo 'checked="checked"' ?>>
139
- <?php echo $taxonomy->labels->name ?>
140
  </label><br>
141
  <?php endforeach; ?>
142
  <br>
@@ -148,8 +148,8 @@ if ( ! defined( 'ABSPATH' ) ) die();
148
  <?php foreach ( $available_post_types as $pt ) : $data = get_post_type_object( $pt ) ?>
149
  <input type="checkbox" name="<?php echo $this->get_field_name( 'post_type' ) ?>[]"
150
  id="<?php echo $this->get_field_id( 'post_type-' . $pt ) ?>"
151
- value="<?php echo $pt ?>" <?php if ( in_array( $pt, $dataConfig->post_type ) ) echo 'checked="checked"' ?>>
152
- <label for="<?php echo $this->get_field_id( 'post_type-' . $pt ) ?>"><?php echo $data->labels->name ?></label><br>
153
  <?php endforeach ?>
154
  <br>
155
 
@@ -158,7 +158,7 @@ if ( ! defined( 'ABSPATH' ) ) die();
158
  <strong><label for="<?php echo $this->get_field_id( 'minimum' ) ?>"
159
  title="<?php _e( 'Tags with fewer posts than this will be automatically excluded.', 'utcw' ) ?>"><?php _e( 'Minimum number of posts: ', 'utcw' ) ?></label></strong>
160
  <input type="number" name="<?php echo $this->get_field_name( 'minimum' ) ?>"
161
- id="<?php echo $this->get_field_id( 'minimum' ) ?>" value="<?php echo $dataConfig->minimum; ?>"><br>
162
  <br>
163
 
164
  <a class="utcw-help"
@@ -166,7 +166,7 @@ if ( ! defined( 'ABSPATH' ) ) die();
166
  <strong><label for="<?php echo $this->get_field_id( 'days_old' ) ?>"
167
  title="<?php _e( 'The maximum number of days back to search for posts, zero means every post.', 'utcw' )?>"><?php _e( 'Posts max age:', 'utcw' )?></label></strong><br>
168
  <input type="number" name="<?php echo $this->get_field_name( 'days_old' ) ?>"
169
- id="<?php echo $this->get_field_id( 'days_old' ) ?>" value="<?php echo $dataConfig->days_old; ?>"><br>
170
  <br>
171
 
172
  <a class="utcw-help"
@@ -181,11 +181,11 @@ if ( ! defined( 'ABSPATH' ) ) die();
181
  <ul class="post-term-search-selected" id="<?php echo $this->get_field_id('post-term-search-selected') ?>">
182
  <?php foreach ($dataConfig->post_term as $term_id) : $term = $terms_by_id[$term_id]; ?>
183
  <li>
184
- <?php echo $term->name ?> (<?php echo $term->taxonomy ?>)
185
  <span class="submitbox">
186
  <a class="submitdelete deletion utcw-remove-item"><?php _e('Delete', 'utcw') ?></a>
187
  </span>
188
- <input type="hidden" name="<?php echo $this->get_field_name( 'post_term' ) ?>[]" value="<?php echo $term_id ?>" />
189
  </li>
190
  <?php endforeach ?>
191
  </ul>
@@ -230,11 +230,11 @@ if ( ! defined( 'ABSPATH' ) ) die();
230
  <ul class="tags-list-search-selected" id="<?php echo $this->get_field_id('tags-list-search-selected') ?>">
231
  <?php foreach ($dataConfig->tags_list as $term_id) : $term = $terms_by_id[$term_id]; ?>
232
  <li>
233
- <?php echo $term->name ?> (<?php echo $term->taxonomy ?>)
234
  <span class="submitbox">
235
  <a class="submitdelete deletion utcw-remove-item"><?php _e('Delete', 'utcw') ?></a>
236
  </span>
237
- <input type="hidden" name="<?php echo $this->get_field_name( 'tags_list' ) ?>[]" value="<?php echo $term_id ?>" />
238
  </li>
239
  <?php endforeach ?>
240
  </ul>
@@ -252,7 +252,7 @@ if ( ! defined( 'ABSPATH' ) ) die();
252
  <label for="<?php echo $this->get_field_id( 'show_title_text' ) ?>"><?php _e( 'Show title', 'utcw' ) ?></label><br>
253
  <input type="text" id="<?php echo $this->get_field_id( 'title' );?>"
254
  name="<?php echo $this->get_field_name( 'title' );?>"
255
- value="<?php echo $renderConfig->title ?>"><br>
256
  <br>
257
 
258
  <a class="utcw-help"
@@ -261,11 +261,11 @@ if ( ! defined( 'ABSPATH' ) ) die();
261
  <label for="<?php echo $this->get_field_id( 'size_from' ) ?>"><?php _e( 'From', 'utcw' ) ?></label>
262
  <input type="text" name="<?php echo $this->get_field_name( 'size_from' ) ?>"
263
  id="<?php echo $this->get_field_id( 'size_from' ) ?>" size="3"
264
- value="<?php echo $dataConfig->size_from ?>">
265
  <label for="<?php echo $this->get_field_id( 'size_to' ) ?>"><?php _e( 'to', 'utcw' ) ?></label>
266
  <input type="text" name="<?php echo $this->get_field_name( 'size_to' ) ?>"
267
  id="<?php echo $this->get_field_id( 'size_to' ) ?>" size="3"
268
- value="<?php echo $dataConfig->size_to ?>"><br>
269
  <br>
270
 
271
  <a class="utcw-help"
@@ -274,7 +274,7 @@ if ( ! defined( 'ABSPATH' ) ) die();
274
  for="<?php echo $this->get_field_id( 'max' ) ?>"><?php _e( 'Max tags:', 'utcw' ) ?></label></strong><br>
275
  <input type="number" name="<?php echo $this->get_field_name( 'max' ) ?>"
276
  id="<?php echo $this->get_field_id( 'max' ) ?>"
277
- value="<?php echo $dataConfig->max ?>"><br>
278
  <br>
279
 
280
  <a class="utcw-help"
@@ -299,7 +299,7 @@ if ( ! defined( 'ABSPATH' ) ) die();
299
  <label class="screen-reader-text"
300
  for="<?php echo $this->get_field_id( 'color_set_chooser' ) ?>"><?php _e( 'Random from preset values', 'utcw' ) ?></label>
301
  <input type="text" name="<?php echo $this->get_field_name( 'color_set' ) ?>"
302
- id="<?php echo $this->get_field_id( 'color_set_chooser' ) ?>" value="<?php echo join( ',', $dataConfig->color_set ) ?>">
303
  </div>
304
  <input type="radio" name="<?php echo $this->get_field_name( 'color' ) ?>"
305
  id="<?php echo $this->get_field_id( 'color_span' ) ?>"
@@ -311,11 +311,11 @@ if ( ! defined( 'ABSPATH' ) ) die();
311
  id="<?php echo $this->get_field_id( 'span_chooser' ) ?>" <?php echo $dataConfig->color != 'span' ? 'class="utcw-hidden"' : ''; ?>>
312
  <label for="<?php echo $this->get_field_id( 'color_span_from' ) ?>"><?php _e( 'From', 'utcw' ) ?></label>
313
  <input type="text" size="7" name="<?php echo $this->get_field_name( 'color_span_from' ) ?>"
314
- id="<?php echo $this->get_field_id( 'color_span_from' ) ?>" value="<?php echo $dataConfig->color_span_from ?>"><br>
315
 
316
  <label for="<?php echo $this->get_field_id( 'color_span_to' ) ?>"><?php _e( 'to', 'utcw' ) ?></label>
317
  <input type="text" size="7" name="<?php echo $this->get_field_name( 'color_span_to' ) ?>"
318
- id="<?php echo $this->get_field_id( 'color_span_to' ) ?>" value="<?php echo $dataConfig->color_span_to ?>">
319
  </div>
320
  <br>
321
 
@@ -396,22 +396,22 @@ if ( ! defined( 'ABSPATH' ) ) die();
396
  for="<?php echo $this->get_field_id( 'letter_spacing' ) ?>"><?php _e( 'Between letters:', 'utcw' ) ?></label>
397
  <input type="text" size="5" name="<?php echo $this->get_field_name( 'letter_spacing' ) ?>"
398
  id="<?php echo $this->get_field_id( 'letter_spacing' ) ?>"
399
- value="<?php echo $renderConfig->letter_spacing ?>"><br>
400
  <label class="two-col"
401
  for="<?php echo $this->get_field_id( 'word_spacing' ) ?>"><?php _e( 'Between words:', 'utcw' ) ?></label>
402
  <input type="text" size="5" name="<?php echo $this->get_field_name( 'word_spacing' ) ?>"
403
  id="<?php echo $this->get_field_id( 'word_spacing' ) ?>"
404
- value="<?php echo $renderConfig->word_spacing ?>"><br>
405
  <label class="two-col"
406
  for="<?php echo $this->get_field_id( 'tag_spacing' ) ?>"><?php _e( 'Between tags:', 'utcw' ) ?></label>
407
  <input type="text" size="5" name="<?php echo $this->get_field_name( 'tag_spacing' ) ?>"
408
  id="<?php echo $this->get_field_id( 'tag_spacing' ) ?>"
409
- value="<?php echo $renderConfig->tag_spacing ?>"><br>
410
  <label class="two-col"
411
  for="<?php echo $this->get_field_id( 'line_height' ) ?>"><?php _e( 'Between rows:', 'utcw' ) ?></label>
412
  <input type="text" size="5" name="<?php echo $this->get_field_name( 'line_height' ) ?>"
413
  id="<?php echo $this->get_field_id( 'line_height' ) ?>"
414
- value="<?php echo $renderConfig->line_height ?>"><br>
415
  <br>
416
 
417
  <a class="utcw-help"
@@ -445,15 +445,15 @@ if ( ! defined( 'ABSPATH' ) ) die();
445
  for="<?php echo $this->get_field_id( 'separator' ) ?>"><?php _e( 'Separator', 'utcw' ) ?></label>
446
  <input type="text" size=5 name="<?php echo $this->get_field_name( 'separator' ) ?>"
447
  id="<?php echo $this->get_field_id( 'separator' ) ?>"
448
- value="<?php echo $renderConfig->separator ?>"><br>
449
  <label class="two-col" for="<?php echo $this->get_field_id( 'prefix' ) ?>"><?php _e( 'Prefix', 'utcw' ) ?></label>
450
  <input type="text" size=5 name="<?php echo $this->get_field_name( 'prefix' ) ?>"
451
  id="<?php echo $this->get_field_id( 'prefix' ) ?>"
452
- value="<?php echo $renderConfig->prefix ?>"><br>
453
  <label class="two-col" for="<?php echo $this->get_field_id( 'suffix' ) ?>"><?php _e( 'Suffix', 'utcw' ) ?></label>
454
  <input type="text" size=5 name="<?php echo $this->get_field_name( 'suffix' ) ?>"
455
  id="<?php echo $this->get_field_id( 'suffix' ) ?>"
456
- value="<?php echo $renderConfig->suffix ?>"><br>
457
 
458
  </fieldset>
459
 
@@ -522,7 +522,7 @@ if ( ! defined( 'ABSPATH' ) ) die();
522
  <strong><label
523
  for="<?php echo $this->get_field_id( 'link_bg_color' ) ?>"><?php _e( 'Background color (hex value):', 'utcw' ) ?></label></strong><br>
524
  <input type="text" name="<?php echo $this->get_field_name( 'link_bg_color' ) ?>"
525
- id="<?php echo $this->get_field_id( 'link_bg_color' ) ?>" value="<?php echo $renderConfig->link_bg_color ?>"><br>
526
  <br>
527
 
528
  <a class="utcw-help"
@@ -554,12 +554,12 @@ if ( ! defined( 'ABSPATH' ) ) die();
554
  <label
555
  for="<?php echo $this->get_field_id( 'link_border_width' ) ?>"><?php _e( 'Width:', 'utcw' ) ?></label><br>
556
  <input type="text" name="<?php echo $this->get_field_name( 'link_border_width' ) ?>"
557
- id="<?php echo $this->get_field_id( 'link_border_width' ) ?>" value="<?php echo $renderConfig->link_border_width ?>"><br>
558
  <br>
559
  <label
560
  for="<?php echo $this->get_field_id( 'link_border_color' ) ?>"><?php _e( 'Color (hex value): ', 'utcw' ) ?></label><br>
561
  <input type="text" name="<?php echo $this->get_field_name( 'link_border_color' ) ?>"
562
- id="<?php echo $this->get_field_id( 'link_border_color' ) ?>" value="<?php echo $renderConfig->link_border_color ?>"><br>
563
 
564
  <a class="utcw-help"
565
  title="<?php _e( 'The hover effects will only affect the style of the tag when the user hovers the tag. For details about each settings see the section above.', 'utcw' )?>">?</a>
@@ -613,12 +613,12 @@ if ( ! defined( 'ABSPATH' ) ) die();
613
  <strong><label
614
  for="<?php echo $this->get_field_id( 'hover_bg_color' ) ?>"><?php _e( 'Background color (hex value):', 'utcw' ) ?></label></strong><br>
615
  <input type="text" name="<?php echo $this->get_field_name( 'hover_bg_color' ) ?>"
616
- id="<?php echo $this->get_field_id( 'hover_bg_color' ) ?>" value="<?php echo $renderConfig->hover_bg_color ?>"><br>
617
  <br>
618
  <strong><label
619
  for="<?php echo $this->get_field_id( 'hover_color' ) ?>"><?php _e( 'Font color (hex value):', 'utcw' ) ?></label></strong><br>
620
  <input type="text" name="<?php echo $this->get_field_name( 'hover_color' ) ?>"
621
- id="<?php echo $this->get_field_id( 'hover_color' ) ?>" value="<?php echo $renderConfig->hover_color ?>"><br>
622
  <br>
623
  <strong><?php _e( 'Border', 'utcw' ) ?></strong><br>
624
  <label for="<?php echo $this->get_field_id( 'hover_border_style' ) ?>"><?php _e( 'Style: ', 'utcw' ) ?></label><br>
@@ -647,12 +647,12 @@ if ( ! defined( 'ABSPATH' ) ) die();
647
  <label
648
  for="<?php echo $this->get_field_id( 'hover_border_width' ) ?>"><?php _e( 'Width:', 'utcw' ) ?></label><br>
649
  <input type="text" name="<?php echo $this->get_field_name( 'hover_border_width' ) ?>"
650
- id="<?php echo $this->get_field_id( 'hover_border_width' ) ?>" value="<?php echo $renderConfig->hover_border_width ?>"><br>
651
  <br>
652
  <label
653
  for="<?php echo $this->get_field_id( 'hover_border_color' ) ?>"><?php _e( 'Color (hex value): ', 'utcw' ) ?></label><br>
654
  <input type="text" name="<?php echo $this->get_field_name( 'hover_border_color' ) ?>"
655
- id="<?php echo $this->get_field_id( 'hover_border_color' ) ?>" value="<?php echo $renderConfig->hover_border_color ?>"><br>
656
  </fieldset>
657
  <fieldset class="utcw hidden" id="<?php echo $this->get_field_id( 'utcw-tab-advanced' ) ?>">
658
  <legend></legend>
@@ -694,7 +694,7 @@ if ( ! defined( 'ABSPATH' ) ) die();
694
  id="<?php echo $this->get_field_id( 'load_config_name' ) ?>">
695
 
696
  <?php foreach ( $configurations as $name => $config ) : ?>
697
- <option value="<?php echo $name ?>"><?php echo $name ?></option>
698
  <?php endforeach ?>
699
 
700
  </select>
2
  /**
3
  * Ultimate Tag Cloud Widget
4
  * @author Rickard Andersson <rickard@0x539.se>
5
+ * @version 2.7
6
  * @license GPLv2
7
  * @package utcw
8
  * @subpackage pages
82
  <ul class="author-search-selected" id="<?php echo $this->get_field_id('author-search-selected') ?>">
83
  <?php foreach ($dataConfig->authors as $author_id) : $author = $authors_by_id[$author_id]; ?>
84
  <li>
85
+ <?php echo esc_html( $author->display_name ) ?>
86
  <span class="submitbox">
87
  <a class="submitdelete deletion utcw-remove-item"><?php _e('Delete', 'utcw') ?></a>
88
  </span>
89
+ <input type="hidden" name="<?php echo $this->get_field_name( 'authors' ) ?>[]" value="<?php echo esc_attr( $author_id ) ?>" />
90
  </li>
91
  <?php endforeach ?>
92
  </ul>
135
  for="<?php echo $this->get_field_id( 'taxonomy' ) ?>"><?php _e( 'Taxonomies:', 'utcw' ) ?></label></strong><br>
136
  <?php foreach ( $available_taxonomies as $taxonomy ) : ?>
137
  <label>
138
+ <input type="checkbox" class="utcw-input-taxonomy" value="<?php echo esc_attr( $taxonomy->name ) ?>" name="<?php echo $this->get_field_name( 'taxonomy' ) ?>[]" <?php if ( in_array( $taxonomy->name, $dataConfig->taxonomy ) ) echo 'checked="checked"' ?>>
139
+ <?php echo esc_attr( $taxonomy->labels->name ) ?>
140
  </label><br>
141
  <?php endforeach; ?>
142
  <br>
148
  <?php foreach ( $available_post_types as $pt ) : $data = get_post_type_object( $pt ) ?>
149
  <input type="checkbox" name="<?php echo $this->get_field_name( 'post_type' ) ?>[]"
150
  id="<?php echo $this->get_field_id( 'post_type-' . $pt ) ?>"
151
+ value="<?php echo esc_attr( $pt ) ?>" <?php if ( in_array( $pt, $dataConfig->post_type ) ) echo 'checked="checked"' ?>>
152
+ <label for="<?php echo $this->get_field_id( 'post_type-' . $pt ) ?>"><?php echo esc_attr( $data->labels->name ) ?></label><br>
153
  <?php endforeach ?>
154
  <br>
155
 
158
  <strong><label for="<?php echo $this->get_field_id( 'minimum' ) ?>"
159
  title="<?php _e( 'Tags with fewer posts than this will be automatically excluded.', 'utcw' ) ?>"><?php _e( 'Minimum number of posts: ', 'utcw' ) ?></label></strong>
160
  <input type="number" name="<?php echo $this->get_field_name( 'minimum' ) ?>"
161
+ id="<?php echo $this->get_field_id( 'minimum' ) ?>" value="<?php echo esc_attr( $dataConfig->minimum ) ?>"><br>
162
  <br>
163
 
164
  <a class="utcw-help"
166
  <strong><label for="<?php echo $this->get_field_id( 'days_old' ) ?>"
167
  title="<?php _e( 'The maximum number of days back to search for posts, zero means every post.', 'utcw' )?>"><?php _e( 'Posts max age:', 'utcw' )?></label></strong><br>
168
  <input type="number" name="<?php echo $this->get_field_name( 'days_old' ) ?>"
169
+ id="<?php echo $this->get_field_id( 'days_old' ) ?>" value="<?php echo esc_attr( $dataConfig->days_old ) ?>"><br>
170
  <br>
171
 
172
  <a class="utcw-help"
181
  <ul class="post-term-search-selected" id="<?php echo $this->get_field_id('post-term-search-selected') ?>">
182
  <?php foreach ($dataConfig->post_term as $term_id) : $term = $terms_by_id[$term_id]; ?>
183
  <li>
184
+ <?php echo esc_html( $term->name ) ?> (<?php echo esc_html( $term->taxonomy ) ?>)
185
  <span class="submitbox">
186
  <a class="submitdelete deletion utcw-remove-item"><?php _e('Delete', 'utcw') ?></a>
187
  </span>
188
+ <input type="hidden" name="<?php echo $this->get_field_name( 'post_term' ) ?>[]" value="<?php echo esc_attr( $term_id ) ?>" />
189
  </li>
190
  <?php endforeach ?>
191
  </ul>
230
  <ul class="tags-list-search-selected" id="<?php echo $this->get_field_id('tags-list-search-selected') ?>">
231
  <?php foreach ($dataConfig->tags_list as $term_id) : $term = $terms_by_id[$term_id]; ?>
232
  <li>
233
+ <?php echo esc_html( $term->name ) ?> (<?php echo esc_html( $term->taxonomy ) ?>)
234
  <span class="submitbox">
235
  <a class="submitdelete deletion utcw-remove-item"><?php _e('Delete', 'utcw') ?></a>
236
  </span>
237
+ <input type="hidden" name="<?php echo $this->get_field_name( 'tags_list' ) ?>[]" value="<?php echo esc_attr( $term_id ) ?>" />
238
  </li>
239
  <?php endforeach ?>
240
  </ul>
252
  <label for="<?php echo $this->get_field_id( 'show_title_text' ) ?>"><?php _e( 'Show title', 'utcw' ) ?></label><br>
253
  <input type="text" id="<?php echo $this->get_field_id( 'title' );?>"
254
  name="<?php echo $this->get_field_name( 'title' );?>"
255
+ value="<?php echo esc_attr( $renderConfig->title ) ?>"><br>
256
  <br>
257
 
258
  <a class="utcw-help"
261
  <label for="<?php echo $this->get_field_id( 'size_from' ) ?>"><?php _e( 'From', 'utcw' ) ?></label>
262
  <input type="text" name="<?php echo $this->get_field_name( 'size_from' ) ?>"
263
  id="<?php echo $this->get_field_id( 'size_from' ) ?>" size="3"
264
+ value="<?php echo esc_attr( $dataConfig->size_from ) ?>">
265
  <label for="<?php echo $this->get_field_id( 'size_to' ) ?>"><?php _e( 'to', 'utcw' ) ?></label>
266
  <input type="text" name="<?php echo $this->get_field_name( 'size_to' ) ?>"
267
  id="<?php echo $this->get_field_id( 'size_to' ) ?>" size="3"
268
+ value="<?php echo esc_attr( $dataConfig->size_to ) ?>"><br>
269
  <br>
270
 
271
  <a class="utcw-help"
274
  for="<?php echo $this->get_field_id( 'max' ) ?>"><?php _e( 'Max tags:', 'utcw' ) ?></label></strong><br>
275
  <input type="number" name="<?php echo $this->get_field_name( 'max' ) ?>"
276
  id="<?php echo $this->get_field_id( 'max' ) ?>"
277
+ value="<?php echo esc_attr( $dataConfig->max ) ?>"><br>
278
  <br>
279
 
280
  <a class="utcw-help"
299
  <label class="screen-reader-text"
300
  for="<?php echo $this->get_field_id( 'color_set_chooser' ) ?>"><?php _e( 'Random from preset values', 'utcw' ) ?></label>
301
  <input type="text" name="<?php echo $this->get_field_name( 'color_set' ) ?>"
302
+ id="<?php echo $this->get_field_id( 'color_set_chooser' ) ?>" value="<?php echo esc_attr( join( ',', $dataConfig->color_set ) ) ?>">
303
  </div>
304
  <input type="radio" name="<?php echo $this->get_field_name( 'color' ) ?>"
305
  id="<?php echo $this->get_field_id( 'color_span' ) ?>"
311
  id="<?php echo $this->get_field_id( 'span_chooser' ) ?>" <?php echo $dataConfig->color != 'span' ? 'class="utcw-hidden"' : ''; ?>>
312
  <label for="<?php echo $this->get_field_id( 'color_span_from' ) ?>"><?php _e( 'From', 'utcw' ) ?></label>
313
  <input type="text" size="7" name="<?php echo $this->get_field_name( 'color_span_from' ) ?>"
314
+ id="<?php echo $this->get_field_id( 'color_span_from' ) ?>" value="<?php echo esc_attr( $dataConfig->color_span_from ) ?>"><br>
315
 
316
  <label for="<?php echo $this->get_field_id( 'color_span_to' ) ?>"><?php _e( 'to', 'utcw' ) ?></label>
317
  <input type="text" size="7" name="<?php echo $this->get_field_name( 'color_span_to' ) ?>"
318
+ id="<?php echo $this->get_field_id( 'color_span_to' ) ?>" value="<?php echo esc_attr( $dataConfig->color_span_to ) ?>">
319
  </div>
320
  <br>
321
 
396
  for="<?php echo $this->get_field_id( 'letter_spacing' ) ?>"><?php _e( 'Between letters:', 'utcw' ) ?></label>
397
  <input type="text" size="5" name="<?php echo $this->get_field_name( 'letter_spacing' ) ?>"
398
  id="<?php echo $this->get_field_id( 'letter_spacing' ) ?>"
399
+ value="<?php echo esc_attr( $renderConfig->letter_spacing ) ?>"><br>
400
  <label class="two-col"
401
  for="<?php echo $this->get_field_id( 'word_spacing' ) ?>"><?php _e( 'Between words:', 'utcw' ) ?></label>
402
  <input type="text" size="5" name="<?php echo $this->get_field_name( 'word_spacing' ) ?>"
403
  id="<?php echo $this->get_field_id( 'word_spacing' ) ?>"
404
+ value="<?php echo esc_attr( $renderConfig->word_spacing ) ?>"><br>
405
  <label class="two-col"
406
  for="<?php echo $this->get_field_id( 'tag_spacing' ) ?>"><?php _e( 'Between tags:', 'utcw' ) ?></label>
407
  <input type="text" size="5" name="<?php echo $this->get_field_name( 'tag_spacing' ) ?>"
408
  id="<?php echo $this->get_field_id( 'tag_spacing' ) ?>"
409
+ value="<?php echo esc_attr( $renderConfig->tag_spacing ) ?>"><br>
410
  <label class="two-col"
411
  for="<?php echo $this->get_field_id( 'line_height' ) ?>"><?php _e( 'Between rows:', 'utcw' ) ?></label>
412
  <input type="text" size="5" name="<?php echo $this->get_field_name( 'line_height' ) ?>"
413
  id="<?php echo $this->get_field_id( 'line_height' ) ?>"
414
+ value="<?php echo esc_attr( $renderConfig->line_height ) ?>"><br>
415
  <br>
416
 
417
  <a class="utcw-help"
445
  for="<?php echo $this->get_field_id( 'separator' ) ?>"><?php _e( 'Separator', 'utcw' ) ?></label>
446
  <input type="text" size=5 name="<?php echo $this->get_field_name( 'separator' ) ?>"
447
  id="<?php echo $this->get_field_id( 'separator' ) ?>"
448
+ value="<?php echo esc_attr( $renderConfig->separator ) ?>"><br>
449
  <label class="two-col" for="<?php echo $this->get_field_id( 'prefix' ) ?>"><?php _e( 'Prefix', 'utcw' ) ?></label>
450
  <input type="text" size=5 name="<?php echo $this->get_field_name( 'prefix' ) ?>"
451
  id="<?php echo $this->get_field_id( 'prefix' ) ?>"
452
+ value="<?php echo esc_attr( $renderConfig->prefix ) ?>"><br>
453
  <label class="two-col" for="<?php echo $this->get_field_id( 'suffix' ) ?>"><?php _e( 'Suffix', 'utcw' ) ?></label>
454
  <input type="text" size=5 name="<?php echo $this->get_field_name( 'suffix' ) ?>"
455
  id="<?php echo $this->get_field_id( 'suffix' ) ?>"
456
+ value="<?php echo esc_attr( $renderConfig->suffix ) ?>"><br>
457
 
458
  </fieldset>
459
 
522
  <strong><label
523
  for="<?php echo $this->get_field_id( 'link_bg_color' ) ?>"><?php _e( 'Background color (hex value):', 'utcw' ) ?></label></strong><br>
524
  <input type="text" name="<?php echo $this->get_field_name( 'link_bg_color' ) ?>"
525
+ id="<?php echo $this->get_field_id( 'link_bg_color' ) ?>" value="<?php echo esc_attr( $renderConfig->link_bg_color ) ?>"><br>
526
  <br>
527
 
528
  <a class="utcw-help"
554
  <label
555
  for="<?php echo $this->get_field_id( 'link_border_width' ) ?>"><?php _e( 'Width:', 'utcw' ) ?></label><br>
556
  <input type="text" name="<?php echo $this->get_field_name( 'link_border_width' ) ?>"
557
+ id="<?php echo $this->get_field_id( 'link_border_width' ) ?>" value="<?php echo esc_attr( $renderConfig->link_border_width ) ?>"><br>
558
  <br>
559
  <label
560
  for="<?php echo $this->get_field_id( 'link_border_color' ) ?>"><?php _e( 'Color (hex value): ', 'utcw' ) ?></label><br>
561
  <input type="text" name="<?php echo $this->get_field_name( 'link_border_color' ) ?>"
562
+ id="<?php echo $this->get_field_id( 'link_border_color' ) ?>" value="<?php echo esc_attr( $renderConfig->link_border_color ) ?>"><br>
563
 
564
  <a class="utcw-help"
565
  title="<?php _e( 'The hover effects will only affect the style of the tag when the user hovers the tag. For details about each settings see the section above.', 'utcw' )?>">?</a>
613
  <strong><label
614
  for="<?php echo $this->get_field_id( 'hover_bg_color' ) ?>"><?php _e( 'Background color (hex value):', 'utcw' ) ?></label></strong><br>
615
  <input type="text" name="<?php echo $this->get_field_name( 'hover_bg_color' ) ?>"
616
+ id="<?php echo $this->get_field_id( 'hover_bg_color' ) ?>" value="<?php echo esc_attr( $renderConfig->hover_bg_color ) ?>"><br>
617
  <br>
618
  <strong><label
619
  for="<?php echo $this->get_field_id( 'hover_color' ) ?>"><?php _e( 'Font color (hex value):', 'utcw' ) ?></label></strong><br>
620
  <input type="text" name="<?php echo $this->get_field_name( 'hover_color' ) ?>"
621
+ id="<?php echo $this->get_field_id( 'hover_color' ) ?>" value="<?php echo esc_attr( $renderConfig->hover_color ) ?>"><br>
622
  <br>
623
  <strong><?php _e( 'Border', 'utcw' ) ?></strong><br>
624
  <label for="<?php echo $this->get_field_id( 'hover_border_style' ) ?>"><?php _e( 'Style: ', 'utcw' ) ?></label><br>
647
  <label
648
  for="<?php echo $this->get_field_id( 'hover_border_width' ) ?>"><?php _e( 'Width:', 'utcw' ) ?></label><br>
649
  <input type="text" name="<?php echo $this->get_field_name( 'hover_border_width' ) ?>"
650
+ id="<?php echo $this->get_field_id( 'hover_border_width' ) ?>" value="<?php echo esc_attr( $renderConfig->hover_border_width ) ?>"><br>
651
  <br>
652
  <label
653
  for="<?php echo $this->get_field_id( 'hover_border_color' ) ?>"><?php _e( 'Color (hex value): ', 'utcw' ) ?></label><br>
654
  <input type="text" name="<?php echo $this->get_field_name( 'hover_border_color' ) ?>"
655
+ id="<?php echo $this->get_field_id( 'hover_border_color' ) ?>" value="<?php echo esc_attr( $renderConfig->hover_border_color ) ?>"><br>
656
  </fieldset>
657
  <fieldset class="utcw hidden" id="<?php echo $this->get_field_id( 'utcw-tab-advanced' ) ?>">
658
  <legend></legend>
694
  id="<?php echo $this->get_field_id( 'load_config_name' ) ?>">
695
 
696
  <?php foreach ( $configurations as $name => $config ) : ?>
697
+ <option value="<?php echo esc_attr( $name ) ?>"><?php echo esc_html( $name ) ?></option>
698
  <?php endforeach ?>
699
 
700
  </select>
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.8
6
- Stable tag: 2.6.1
7
  Donate link: https://0x539.se/donations/
8
  License: GPLv2 or later
9
 
@@ -24,6 +24,7 @@ This is the highly configurable tag cloud widget, the main features for this plu
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
  - Short code information: http://wordpress.org/plugins/ultimate-tag-cloud-widget/other_notes/#Theme-integration-/-Shortcode
28
  - Short code configuration options: https://github.com/rickard2/utcw/blob/master/CONFIG.md
29
  - Playground which shows some configuration options: https://0x539.se/wordpress/tag-cloud-playground/
@@ -59,7 +60,7 @@ If you have questions, please post them in the forums.
59
 
60
  * [BUGFIX](http://wordpress.org/support/topic/bug-53): Fixed issue with widget markup when using avoid theme styling option
61
 
62
- = 2.6
63
 
64
  * [#46](https://github.com/rickard2/utcw/issues/46): Bring back styling behavior of <= v2.2 with a [configuration option](https://github.com/rickard2/utcw/blob/master/CONFIG.md#avoid-theme-styling)
65
  * [#48](https://github.com/rickard2/utcw/issues/48): Support for custom selection strategies to enable clouds with custom data sources. [Detailed documentation for defining your own strategy](https://github.com/rickard2/utcw/blob/master/STRATEGY.md).
3
  Tags: widget, tags, configurable, tag cloud
4
  Requires at least: 3.0
5
  Tested up to: 3.8
6
+ Stable tag: 2.7
7
  Donate link: https://0x539.se/donations/
8
  License: GPLv2 or later
9
 
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
+
28
  - Short code information: http://wordpress.org/plugins/ultimate-tag-cloud-widget/other_notes/#Theme-integration-/-Shortcode
29
  - Short code configuration options: https://github.com/rickard2/utcw/blob/master/CONFIG.md
30
  - Playground which shows some configuration options: https://0x539.se/wordpress/tag-cloud-playground/
60
 
61
  * [BUGFIX](http://wordpress.org/support/topic/bug-53): Fixed issue with widget markup when using avoid theme styling option
62
 
63
+ = 2.6 =
64
 
65
  * [#46](https://github.com/rickard2/utcw/issues/46): Bring back styling behavior of <= v2.2 with a [configuration option](https://github.com/rickard2/utcw/blob/master/CONFIG.md#avoid-theme-styling)
66
  * [#48](https://github.com/rickard2/utcw/issues/48): Support for custom selection strategies to enable clouds with custom data sources. [Detailed documentation for defining your own strategy](https://github.com/rickard2/utcw/blob/master/STRATEGY.md).
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.6.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
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.6.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
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.6.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
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.6.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
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.6.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
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.6.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
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.6.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
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.6.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
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.6.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
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.6.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
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.6.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
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.6.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
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.6.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
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.6.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
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.6.1
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage main
@@ -131,14 +131,6 @@ class UTCW_Data
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,6 +144,20 @@ class UTCW_Data
152
  }
153
  }
154
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
155
  if ($this->config->post_term_query_var && $this->config->post_term) {
156
  $this->addTermFilterQueryVars();
157
  }
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
+ * @version 2.7
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 ($this->translationHandler) {
135
 
136
  // Let the translation handler determine if the term should be included or not
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
  }
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.6.1
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage language
@@ -296,19 +296,6 @@ class UTCW_QueryBuilder
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
  *
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
+ * @version 2.7
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage language
296
  }
297
  }
298
 
 
 
 
 
 
 
 
 
 
 
 
 
 
299
  /**
300
  * Add sorting the result
301
  *
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.6.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
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.6.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
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.6.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
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.6.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
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.6.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
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.6.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
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.6.1
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage main
@@ -106,9 +106,7 @@ class UTCW_Render
106
  // If theme styling should be avoided, keep the utcw specific classes
107
  if ($this->config->avoid_theme_styling) {
108
  $markup[] = $this->config->before_widget;
109
- }
110
-
111
- // If theme styling should be enforced, swap classes to the regular tag cloud classes
112
  else {
113
  $markup[] = str_replace('widget_utcw', 'widget_utcw widget_tag_cloud', $this->config->before_widget);
114
  }
@@ -154,10 +152,11 @@ class UTCW_Render
154
  $displayName = $this->plugin->applyFilters('utcw_render_term_display_name', $displayName, $term->name);
155
 
156
  $terms[] = sprintf(
157
- '%s<%s class="tag-link-%s" href="%s" style="font-size:%s%s"%s>%s</%s>%s',
158
  $this->config->prefix,
159
  $tag,
160
  $term->term_id,
 
161
  $term->link,
162
  $term->size,
163
  $color,
@@ -192,7 +191,7 @@ class UTCW_Render
192
  $markup[] = $this->config->after_widget;
193
  }
194
 
195
- return join('', $markup);
196
  }
197
 
198
  /**
@@ -251,7 +250,7 @@ class UTCW_Render
251
  $term_title_singular = $this->plugin->applyFilters('utcw_render_term_title_singular', '%d topic');
252
  $term_title_plural = $this->plugin->applyFilters('utcw_render_term_title_plural', '%d topics');
253
 
254
- $title = _n($term_title_singular, $term_title_plural, $term->count);
255
 
256
  if (strpos($title, '%d') !== false) {
257
  $title = sprintf(' title="' . $title . '"', $term->count);
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
+ * @version 2.7
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage main
106
  // If theme styling should be avoided, keep the utcw specific classes
107
  if ($this->config->avoid_theme_styling) {
108
  $markup[] = $this->config->before_widget;
109
+ } // If theme styling should be enforced, swap classes to the regular tag cloud classes
 
 
110
  else {
111
  $markup[] = str_replace('widget_utcw', 'widget_utcw widget_tag_cloud', $this->config->before_widget);
112
  }
152
  $displayName = $this->plugin->applyFilters('utcw_render_term_display_name', $displayName, $term->name);
153
 
154
  $terms[] = sprintf(
155
+ '%s<%s class="tag-link-%s utcw-tag utcw-tag-%s" href="%s" style="font-size:%s%s"%s>%s</%s>%s',
156
  $this->config->prefix,
157
  $tag,
158
  $term->term_id,
159
+ $term->slug,
160
  $term->link,
161
  $term->size,
162
  $color,
191
  $markup[] = $this->config->after_widget;
192
  }
193
 
194
+ return do_shortcode(join('', $markup));
195
  }
196
 
197
  /**
250
  $term_title_singular = $this->plugin->applyFilters('utcw_render_term_title_singular', '%d topic');
251
  $term_title_plural = $this->plugin->applyFilters('utcw_render_term_title_plural', '%d topics');
252
 
253
+ $title = _n($term_title_singular, $term_title_plural, $term->count, 'utcw');
254
 
255
  if (strpos($title, '%d') !== false) {
256
  $title = sprintf(' title="' . $title . '"', $term->count);
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.6.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
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.6.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
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.6.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
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.6.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
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.6.1
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage selection
@@ -116,7 +116,6 @@ class UTCW_SelectionStrategy
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();
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
+ * @version 2.7
7
  * @license GPLv2
8
  * @package utcw
9
  * @subpackage selection
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();
src/ShortCode.php CHANGED
@@ -3,7 +3,7 @@
3
  * Ultimate Tag Cloud Widget
4
  *
5
  * @author Rickard Andersson <rickard@0x539.se>
6
- * @version 2.6.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
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.6.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
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.6.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
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.6.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
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.6.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
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.6.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
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.6.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
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.6.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.6.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-beta1
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-beta1');
19
 
20
  /**
21
  * If development mode is currently enabled