Version Description
- Fixed naming collision issue with other plugins
Download this release
Release Info
Developer | exz |
Plugin | Ultimate Tag Cloud Widget |
Version | 2.2.3 |
Comparing to | |
See all releases |
Code changes from version 2.2.2 to 2.2.3
- js/utcw.min.js +1 -1
- pages/settings.php +3 -3
- readme.txt +9 -1
- src/Config.php +4 -4
- src/Data.php +12 -12
- src/Database/QueryBuilder.php +4 -4
- src/Language/QTranslateHandler.php +9 -7
- src/Language/TranslationHandler.php +5 -5
- src/Language/WPMLHandler.php +6 -6
- src/Plugin.php +11 -11
- src/Render.php +9 -9
- src/Selection/PopularityStrategy.php +17 -9
- src/Selection/RandomStrategy.php +17 -9
- src/Selection/SelectionStrategy.php +8 -6
- src/Term.php +4 -4
- src/Widget.php +12 -12
- ultimate-tag-cloud-widget.php +4 -4
js/utcw.min.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
/*! Ultimate Tag Cloud Widget - v2.2.
|
2 |
* https://0x539.se/wordpress/ultimate-tag-cloud-widget/
|
3 |
* Copyright (c) 2013 Rickard Andersson; Licensed GPLv2 */
|
4 |
var Query=function(e){"use strict";var t=function(e){var t=[],n,r,i,s;if(typeof e=="undefined"||e===null||e==="")return t;e.indexOf("?")===0&&(e=e.substring(1)),r=e.toString().split(/[&;]/);for(n=0;n<r.length;n++)i=r[n],s=i.split("="),t.push([s[0],s[1]]);return t},n=t(e),r=function(){var e="",t,r;for(t=0;t<n.length;t++)r=n[t],e.length>0&&(e+="&"),e+=r.join("=");return e.length>0?"?"+e:e},i=function(e){return e=decodeURIComponent(e),e=e.replace("+"," "),e},s=function(e){var t,r;for(r=0;r<n.length;r++){t=n[r];if(i(e)===i(t[0]))return t[1]}},o=function(e){var t=[],r,s;for(r=0;r<n.length;r++)s=n[r],i(e)===i(s[0])&&t.push(s[1]);return t},u=function(e,t){var r=[],s,o,u,a;for(s=0;s<n.length;s++)o=n[s],u=i(o[0])===i(e),a=i(o[1])===i(t),(arguments.length===1&&!u||arguments.length===2&&!u&&!a)&&r.push(o);return n=r,this},a=function(e,t,r){return arguments.length===3&&r!==-1?(r=Math.min(r,n.length),n.splice(r,0,[e,t])):arguments.length>0&&n.push([e,t]),this},f=function(e,t,r){var s=-1,o,f;if(arguments.length===3){for(o=0;o<n.length;o++){f=n[o];if(i(f[0])===i(e)&&decodeURIComponent(f[1])===i(r)){s=o;break}}u(e,r).addParam(e,t,s)}else{for(o=0;o<n.length;o++){f=n[o];if(i(f[0])===i(e)){s=o;break}}u(e),a(e,t,s)}return this};return{getParamValue:s,getParamValues:o,deleteParam:u,addParam:a,replaceParam:f,toString:r}},Uri=function(e){"use strict";var t=!1,n=function(e){var n={strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/},r=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],i={name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},s=n[t?"strict":"loose"].exec(e),o={},u=14;while(u--)o[r[u]]=s[u]||"";return o[i.name]={},o[r[12]].replace(i.parser,function(e,t,n){t&&(o[i.name][t]=n)}),o},r=n(e||""),i=new Query(r.query),s=function(e){return typeof e!="undefined"&&(r.protocol=e),r.protocol},o=null,u=function(e){return typeof e!="undefined"&&(o=e),o===null?r.source.indexOf("//")!==-1:o},a=function(e){return typeof e!="undefined"&&(r.userInfo=e),r.userInfo},f=function(e){return typeof e!="undefined"&&(r.host=e),r.host},l=function(e){return typeof e!="undefined"&&(r.port=e),r.port},c=function(e){return typeof e!="undefined"&&(r.path=e),r.path},h=function(e){return typeof e!="undefined"&&(i=new Query(e)),i},p=function(e){return typeof e!="undefined"&&(r.anchor=e),r.anchor},d=function(e){return s(e),this},v=function(e){return u(e),this},m=function(e){return a(e),this},g=function(e){return f(e),this},y=function(e){return l(e),this},b=function(e){return c(e),this},w=function(e){return h(e),this},E=function(e){return p(e),this},S=function(e){return h().getParamValue(e)},x=function(e){return h().getParamValues(e)},T=function(e,t){return arguments.length===2?h().deleteParam(e,t):h().deleteParam(e),this},N=function(e,t,n){return arguments.length===3?h().addParam(e,t,n):h().addParam(e,t),this},C=function(e,t,n){return arguments.length===3?h().replaceParam(e,t,n):h().replaceParam(e,t),this},k=function(){var e="",t=function(e){return e!==null&&e!==""};return t(s())?(e+=s(),s().indexOf(":")!==s().length-1&&(e+=":"),e+="//"):u()&&t(f())&&(e+="//"),t(a())&&t(f())&&(e+=a(),a().indexOf("@")!==a().length-1&&(e+="@")),t(f())&&(e+=f(),t(l())&&(e+=":"+l())),t(c())?e+=c():t(f())&&(t(h().toString())||t(p()))&&(e+="/"),t(h().toString())&&(h().toString().indexOf("?")!==0&&(e+="?"),e+=h().toString()),t(p())&&(p().indexOf("#")!==0&&(e+="#"),e+=p()),e},L=function(){return new Uri(k())};return{protocol:s,hasAuthorityPrefix:u,userInfo:a,host:f,port:l,path:c,query:h,anchor:p,setProtocol:d,setHasAuthorityPrefix:v,setUserInfo:m,setHost:g,setPort:y,setPath:b,setQuery:w,setAnchor:E,getQueryParamValue:S,getQueryParamValues:x,deleteQueryParam:T,addQueryParam:N,replaceQueryParam:C,toString:k,clone:L}},jsUri=Uri;(function(e){e.fn.wTooltip=function(t,n){function m(n){n&&(t.degrade?e(h).html(t.content.replace(/<\/?[^>]+>/gi,"")):e(h).html(t.content))}function g(n){function i(e){r&&!t.content&&(r="")}function u(){!l&&t.auto&&(clearInterval(o),t.fadeOut?e(h).fadeOut(t.fadeOut,function(){i(n)}):(i(n),h.style.display="none")),typeof t.callAfter=="function"&&t.callAfter(h,n,t),d&&(t=e.listen(t))}t.timeout>0?s=setTimeout(function(){u()},t.timeout):u()}t=e.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(e,t,n){},callAfter:function(e,t,n){},clickAction:function(t,n){e(t).hide()},delay:0,timeout:0},t||{}),!t.style&&typeof t.style!="object"?(t.style={},t.style.zIndex="1000"):t.style=e.extend({border:"1px solid gray",background:"#edeef0",color:"#000",padding:"10px",zIndex:"1000",textAlign:"left"},t.style||{}),typeof n=="function"&&(t.callAfter=n||t.callAfter),t.style.display="none",t.style.position="absolute";var r,i,s,o,u={},f=!0,l=!1,c=!1,h=document.createElement("div"),p=typeof document.body.style.maxWidth=="undefined"?!0:!1,d=typeof e.talk=="function"&&typeof e.listen=="function"?!0:!1;t.id&&(h.id=t.id),t.className&&(h.className=t.className),t.degrade=t.degrade&&p?!0:!1;for(var v in t.style)h.style[v]=t.style[v];return t.ajax&&e.get(t.ajax,function(e){e&&(t.content=e),m(t.content)}),e(h).hover(function(){l=!0},function(){l=!1,g(u)}),d&&(t.key=h,t.plugin="wTooltip",t.channel="wayfarer",e.talk(t)),m(t.content&&!t.ajax),e(h).appendTo(t.appendTip),this.each(function(){e(this).hover(function(){function o(){typeof t.callBefore=="function"&&t.callBefore(h,n,t),d&&(t=e.listen(t));var i;t.content?t.degrade||(i="block"):r&&!t.degrade?(e(h).html(unescape(r)),i="block",r=""):i="none",t.auto&&(i=="block"&&t.fadeIn?e(h).fadeIn(t.fadeIn):h.style.display=i)}var n=this;clearTimeout(s),(this.title||this.titleMemKeep)&&!t.degrade&&!t.content&&(r=this.title||this.titleMemKeep,this.title&&(this.titleMemKeep=this.title,this.title="")),t.content&&t.degrade&&(this.title=h.innerHTML),t.delay>0?i=setTimeout(function(){o()},t.delay):o()},function(){clearTimeout(i);var n=this;f=!0,!t.follow||c||t.offsetX<0&&0-t.offsetX<e(h).outerWidth()&&t.offsetY>0&&0-t.offsetY<e(h).outerHeight()?setTimeout(function(){o=setInterval(function(){g(n)},1)},1):g(this)}),e(this).mousemove(function(n){u=this;if(t.follow||f){var r=e(window).scrollTop(),i=e(window).scrollLeft(),s=n.clientY+r+t.offsetY,o=n.clientX+i+t.offsetX,l=e(t.appendTip).outerHeight(),p=e(t.appendTip).innerHeight(),d=e(window).width()+i-e(h).outerWidth(),v=e(window).height()+r-e(h).outerHeight();s=l>p?s-(l-p):s,c=s>v||o>d?!0:!1,o-i<=0&&t.offsetX<0?o=i:o>d&&(o=d),s-r<=0&&t.offsetY<0?s=r:s>v&&(s=v),h.style.top=s+"px",h.style.left=o+"px",f=!1}}),typeof t.clickAction=="function"&&e(this).click(function(){t.clickAction(h,this)})})}})(jQuery),function(e){"use strict";var t={border:"solid 1px #6295fb",background:"#fff",color:"#000",padding:"5px",zIndex:1e3},n={activeTab:{},init:function(){e("input[id$=-color_none], input[id$=-color_random], input[id$=-color_set], input[id$=-color_span]").live("click",this.colorClickHandler),e(".utcw-tab-button").live("click",this.tabClickHandler),e(".utcw-input-taxonomy").live("click",this.taxonomyClickHandler),e(".utcw-all-authors").live("click",this.allAuthorsClickHandler),e(".utcw-selected-authors").live("click",this.selectedAuthorsClickHandler),e(".utcw-remove-config").live("click",this.removeConfigClickHandler),e(document).ready(this.initTooltip),e(document).ajaxSuccess(this.ajaxSuccessHandler)},initTooltip:function(){e(".utcw-help").wTooltip({style:t,className:"utcw-tooltip"})},removeConfigClickHandler:function(){var t=e(this),r=n.findWidgetParent(t),i=r.find(".utcw-load-config"),s=i.val(),o=t.data("input-name")+"[]",u=e(document.createElement("input"));u.attr("type","hidden"),u.attr("name",o),u.attr("value",s),t.after(u),i.find(":selected").remove()},allAuthorsClickHandler:function(){var t=e(this),r=n.findWidgetParent(t);r.find(".utcw-authors").addClass("hidden"),r.find(".utcw-author-field").attr("checked",!1)},selectedAuthorsClickHandler:function(){var t=e(this),r=n.findWidgetParent(t);r.find(".utcw-authors").removeClass("hidden")},tabClickHandler:function(){var t=e(this);return t.data("id")==="utcw-__i__"?!1:(t.parent().find(".utcw-tab-button").removeClass("utcw-active"),t.addClass("utcw-active"),t.parent().find("fieldset.utcw").addClass("hidden"),e("#"+t.data("tab")).removeClass("hidden"),n.activeTab[t.data("id")]=t.data("tab"),!1)},colorClickHandler:function(){var t=e('div[id$="set_chooser"]'),n=e('div[id$="span_chooser"]'),r=e(this).val();t.addClass("utcw-hidden"),n.addClass("utcw-hidden"),r==="set"?t.removeClass("utcw-hidden"):r==="span"&&n.removeClass("utcw-hidden")},findWidgetParent:function(e){return e.parents(".widget-content")},taxonomyClickHandler:function(){var t=e(this),r=t.val(),i=t.is(":checked"),s=n.findWidgetParent(t),o=s.find("#"+r+"-terms");i?o.removeClass("hidden"):o.addClass("hidden")},ajaxSuccessHandler:function(e,t,r){n.setCurrentTab.apply(n,[r.data]),n.initTooltip.apply(n)},setCurrentTab:function(t){var n=new Uri,r;n.setQuery(decodeURI(t)),n.getQueryParamValue("action")==="save-widget"&&n.getQueryParamValue("id_base")==="utcw"&&(r=n.getQueryParamValue("widget-id"),this.activeTab[r]&&e('button[data-tab="'+this.activeTab[r]+'"]').trigger("click"))}};n.init()}(jQuery);
|
1 |
+
/*! Ultimate Tag Cloud Widget - v2.2.3 - 2013-05-06
|
2 |
* https://0x539.se/wordpress/ultimate-tag-cloud-widget/
|
3 |
* Copyright (c) 2013 Rickard Andersson; Licensed GPLv2 */
|
4 |
var Query=function(e){"use strict";var t=function(e){var t=[],n,r,i,s;if(typeof e=="undefined"||e===null||e==="")return t;e.indexOf("?")===0&&(e=e.substring(1)),r=e.toString().split(/[&;]/);for(n=0;n<r.length;n++)i=r[n],s=i.split("="),t.push([s[0],s[1]]);return t},n=t(e),r=function(){var e="",t,r;for(t=0;t<n.length;t++)r=n[t],e.length>0&&(e+="&"),e+=r.join("=");return e.length>0?"?"+e:e},i=function(e){return e=decodeURIComponent(e),e=e.replace("+"," "),e},s=function(e){var t,r;for(r=0;r<n.length;r++){t=n[r];if(i(e)===i(t[0]))return t[1]}},o=function(e){var t=[],r,s;for(r=0;r<n.length;r++)s=n[r],i(e)===i(s[0])&&t.push(s[1]);return t},u=function(e,t){var r=[],s,o,u,a;for(s=0;s<n.length;s++)o=n[s],u=i(o[0])===i(e),a=i(o[1])===i(t),(arguments.length===1&&!u||arguments.length===2&&!u&&!a)&&r.push(o);return n=r,this},a=function(e,t,r){return arguments.length===3&&r!==-1?(r=Math.min(r,n.length),n.splice(r,0,[e,t])):arguments.length>0&&n.push([e,t]),this},f=function(e,t,r){var s=-1,o,f;if(arguments.length===3){for(o=0;o<n.length;o++){f=n[o];if(i(f[0])===i(e)&&decodeURIComponent(f[1])===i(r)){s=o;break}}u(e,r).addParam(e,t,s)}else{for(o=0;o<n.length;o++){f=n[o];if(i(f[0])===i(e)){s=o;break}}u(e),a(e,t,s)}return this};return{getParamValue:s,getParamValues:o,deleteParam:u,addParam:a,replaceParam:f,toString:r}},Uri=function(e){"use strict";var t=!1,n=function(e){var n={strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/},r=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],i={name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},s=n[t?"strict":"loose"].exec(e),o={},u=14;while(u--)o[r[u]]=s[u]||"";return o[i.name]={},o[r[12]].replace(i.parser,function(e,t,n){t&&(o[i.name][t]=n)}),o},r=n(e||""),i=new Query(r.query),s=function(e){return typeof e!="undefined"&&(r.protocol=e),r.protocol},o=null,u=function(e){return typeof e!="undefined"&&(o=e),o===null?r.source.indexOf("//")!==-1:o},a=function(e){return typeof e!="undefined"&&(r.userInfo=e),r.userInfo},f=function(e){return typeof e!="undefined"&&(r.host=e),r.host},l=function(e){return typeof e!="undefined"&&(r.port=e),r.port},c=function(e){return typeof e!="undefined"&&(r.path=e),r.path},h=function(e){return typeof e!="undefined"&&(i=new Query(e)),i},p=function(e){return typeof e!="undefined"&&(r.anchor=e),r.anchor},d=function(e){return s(e),this},v=function(e){return u(e),this},m=function(e){return a(e),this},g=function(e){return f(e),this},y=function(e){return l(e),this},b=function(e){return c(e),this},w=function(e){return h(e),this},E=function(e){return p(e),this},S=function(e){return h().getParamValue(e)},x=function(e){return h().getParamValues(e)},T=function(e,t){return arguments.length===2?h().deleteParam(e,t):h().deleteParam(e),this},N=function(e,t,n){return arguments.length===3?h().addParam(e,t,n):h().addParam(e,t),this},C=function(e,t,n){return arguments.length===3?h().replaceParam(e,t,n):h().replaceParam(e,t),this},k=function(){var e="",t=function(e){return e!==null&&e!==""};return t(s())?(e+=s(),s().indexOf(":")!==s().length-1&&(e+=":"),e+="//"):u()&&t(f())&&(e+="//"),t(a())&&t(f())&&(e+=a(),a().indexOf("@")!==a().length-1&&(e+="@")),t(f())&&(e+=f(),t(l())&&(e+=":"+l())),t(c())?e+=c():t(f())&&(t(h().toString())||t(p()))&&(e+="/"),t(h().toString())&&(h().toString().indexOf("?")!==0&&(e+="?"),e+=h().toString()),t(p())&&(p().indexOf("#")!==0&&(e+="#"),e+=p()),e},L=function(){return new Uri(k())};return{protocol:s,hasAuthorityPrefix:u,userInfo:a,host:f,port:l,path:c,query:h,anchor:p,setProtocol:d,setHasAuthorityPrefix:v,setUserInfo:m,setHost:g,setPort:y,setPath:b,setQuery:w,setAnchor:E,getQueryParamValue:S,getQueryParamValues:x,deleteQueryParam:T,addQueryParam:N,replaceQueryParam:C,toString:k,clone:L}},jsUri=Uri;(function(e){e.fn.wTooltip=function(t,n){function m(n){n&&(t.degrade?e(h).html(t.content.replace(/<\/?[^>]+>/gi,"")):e(h).html(t.content))}function g(n){function i(e){r&&!t.content&&(r="")}function u(){!l&&t.auto&&(clearInterval(o),t.fadeOut?e(h).fadeOut(t.fadeOut,function(){i(n)}):(i(n),h.style.display="none")),typeof t.callAfter=="function"&&t.callAfter(h,n,t),d&&(t=e.listen(t))}t.timeout>0?s=setTimeout(function(){u()},t.timeout):u()}t=e.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(e,t,n){},callAfter:function(e,t,n){},clickAction:function(t,n){e(t).hide()},delay:0,timeout:0},t||{}),!t.style&&typeof t.style!="object"?(t.style={},t.style.zIndex="1000"):t.style=e.extend({border:"1px solid gray",background:"#edeef0",color:"#000",padding:"10px",zIndex:"1000",textAlign:"left"},t.style||{}),typeof n=="function"&&(t.callAfter=n||t.callAfter),t.style.display="none",t.style.position="absolute";var r,i,s,o,u={},f=!0,l=!1,c=!1,h=document.createElement("div"),p=typeof document.body.style.maxWidth=="undefined"?!0:!1,d=typeof e.talk=="function"&&typeof e.listen=="function"?!0:!1;t.id&&(h.id=t.id),t.className&&(h.className=t.className),t.degrade=t.degrade&&p?!0:!1;for(var v in t.style)h.style[v]=t.style[v];return t.ajax&&e.get(t.ajax,function(e){e&&(t.content=e),m(t.content)}),e(h).hover(function(){l=!0},function(){l=!1,g(u)}),d&&(t.key=h,t.plugin="wTooltip",t.channel="wayfarer",e.talk(t)),m(t.content&&!t.ajax),e(h).appendTo(t.appendTip),this.each(function(){e(this).hover(function(){function o(){typeof t.callBefore=="function"&&t.callBefore(h,n,t),d&&(t=e.listen(t));var i;t.content?t.degrade||(i="block"):r&&!t.degrade?(e(h).html(unescape(r)),i="block",r=""):i="none",t.auto&&(i=="block"&&t.fadeIn?e(h).fadeIn(t.fadeIn):h.style.display=i)}var n=this;clearTimeout(s),(this.title||this.titleMemKeep)&&!t.degrade&&!t.content&&(r=this.title||this.titleMemKeep,this.title&&(this.titleMemKeep=this.title,this.title="")),t.content&&t.degrade&&(this.title=h.innerHTML),t.delay>0?i=setTimeout(function(){o()},t.delay):o()},function(){clearTimeout(i);var n=this;f=!0,!t.follow||c||t.offsetX<0&&0-t.offsetX<e(h).outerWidth()&&t.offsetY>0&&0-t.offsetY<e(h).outerHeight()?setTimeout(function(){o=setInterval(function(){g(n)},1)},1):g(this)}),e(this).mousemove(function(n){u=this;if(t.follow||f){var r=e(window).scrollTop(),i=e(window).scrollLeft(),s=n.clientY+r+t.offsetY,o=n.clientX+i+t.offsetX,l=e(t.appendTip).outerHeight(),p=e(t.appendTip).innerHeight(),d=e(window).width()+i-e(h).outerWidth(),v=e(window).height()+r-e(h).outerHeight();s=l>p?s-(l-p):s,c=s>v||o>d?!0:!1,o-i<=0&&t.offsetX<0?o=i:o>d&&(o=d),s-r<=0&&t.offsetY<0?s=r:s>v&&(s=v),h.style.top=s+"px",h.style.left=o+"px",f=!1}}),typeof t.clickAction=="function"&&e(this).click(function(){t.clickAction(h,this)})})}})(jQuery),function(e){"use strict";var t={border:"solid 1px #6295fb",background:"#fff",color:"#000",padding:"5px",zIndex:1e3},n={activeTab:{},init:function(){e("input[id$=-color_none], input[id$=-color_random], input[id$=-color_set], input[id$=-color_span]").live("click",this.colorClickHandler),e(".utcw-tab-button").live("click",this.tabClickHandler),e(".utcw-input-taxonomy").live("click",this.taxonomyClickHandler),e(".utcw-all-authors").live("click",this.allAuthorsClickHandler),e(".utcw-selected-authors").live("click",this.selectedAuthorsClickHandler),e(".utcw-remove-config").live("click",this.removeConfigClickHandler),e(document).ready(this.initTooltip),e(document).ajaxSuccess(this.ajaxSuccessHandler)},initTooltip:function(){e(".utcw-help").wTooltip({style:t,className:"utcw-tooltip"})},removeConfigClickHandler:function(){var t=e(this),r=n.findWidgetParent(t),i=r.find(".utcw-load-config"),s=i.val(),o=t.data("input-name")+"[]",u=e(document.createElement("input"));u.attr("type","hidden"),u.attr("name",o),u.attr("value",s),t.after(u),i.find(":selected").remove()},allAuthorsClickHandler:function(){var t=e(this),r=n.findWidgetParent(t);r.find(".utcw-authors").addClass("hidden"),r.find(".utcw-author-field").attr("checked",!1)},selectedAuthorsClickHandler:function(){var t=e(this),r=n.findWidgetParent(t);r.find(".utcw-authors").removeClass("hidden")},tabClickHandler:function(){var t=e(this);return t.data("id")==="utcw-__i__"?!1:(t.parent().find(".utcw-tab-button").removeClass("utcw-active"),t.addClass("utcw-active"),t.parent().find("fieldset.utcw").addClass("hidden"),e("#"+t.data("tab")).removeClass("hidden"),n.activeTab[t.data("id")]=t.data("tab"),!1)},colorClickHandler:function(){var t=e('div[id$="set_chooser"]'),n=e('div[id$="span_chooser"]'),r=e(this).val();t.addClass("utcw-hidden"),n.addClass("utcw-hidden"),r==="set"?t.removeClass("utcw-hidden"):r==="span"&&n.removeClass("utcw-hidden")},findWidgetParent:function(e){return e.parents(".widget-content")},taxonomyClickHandler:function(){var t=e(this),r=t.val(),i=t.is(":checked"),s=n.findWidgetParent(t),o=s.find("#"+r+"-terms");i?o.removeClass("hidden"):o.addClass("hidden")},ajaxSuccessHandler:function(e,t,r){n.setCurrentTab.apply(n,[r.data]),n.initTooltip.apply(n)},setCurrentTab:function(t){var n=new Uri,r;n.setQuery(decodeURI(t)),n.getQueryParamValue("action")==="save-widget"&&n.getQueryParamValue("id_base")==="utcw"&&(r=n.getQueryParamValue("widget-id"),this.activeTab[r]&&e('button[data-tab="'+this.activeTab[r]+'"]').trigger("click"))}};n.init()}(jQuery);
|
pages/settings.php
CHANGED
@@ -2,18 +2,18 @@
|
|
2 |
/**
|
3 |
* Ultimate Tag Cloud Widget
|
4 |
* @author Rickard Andersson <rickard@0x539.se>
|
5 |
-
* @version 2.2.
|
6 |
* @license GPLv2
|
7 |
* @package utcw
|
8 |
* @subpackage pages
|
9 |
*
|
10 |
-
* @var
|
11 |
* @var array $available_taxonomies
|
12 |
* @var array $available_post_types
|
13 |
* @var array $configurations
|
14 |
* @var array $terms
|
15 |
* @var array $users
|
16 |
-
* @var
|
17 |
*/
|
18 |
if ( ! defined( 'ABSPATH' ) ) die();
|
19 |
|
2 |
/**
|
3 |
* Ultimate Tag Cloud Widget
|
4 |
* @author Rickard Andersson <rickard@0x539.se>
|
5 |
+
* @version 2.2.3
|
6 |
* @license GPLv2
|
7 |
* @package utcw
|
8 |
* @subpackage pages
|
9 |
*
|
10 |
+
* @var UTCW_Config $config
|
11 |
* @var array $available_taxonomies
|
12 |
* @var array $available_post_types
|
13 |
* @var array $configurations
|
14 |
* @var array $terms
|
15 |
* @var array $users
|
16 |
+
* @var UTCW_Widget $this
|
17 |
*/
|
18 |
if ( ! defined( 'ABSPATH' ) ) die();
|
19 |
|
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.6-beta2
|
6 |
-
Stable tag: 2.2.
|
7 |
Donate link: https://flattr.com/thing/112193/Ultimate-Tag-Cloud-Widget
|
8 |
License: GPLv2 or later
|
9 |
|
@@ -47,6 +47,10 @@ If you have questions, please post them in the forums.
|
|
47 |
|
48 |
== Changelog ==
|
49 |
|
|
|
|
|
|
|
|
|
50 |
= 2.2.2 =
|
51 |
|
52 |
* Fixed widget initialization issue
|
@@ -86,6 +90,10 @@ The upgrade notice history for the 1.x branch is available on [GitHub](https://g
|
|
86 |
|
87 |
== Upgrade Notice ==
|
88 |
|
|
|
|
|
|
|
|
|
89 |
= 2.2.2 =
|
90 |
|
91 |
* Fixed widget initialization issue
|
3 |
Tags: widget, tags, configurable, tag cloud
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 3.6-beta2
|
6 |
+
Stable tag: 2.2.3
|
7 |
Donate link: https://flattr.com/thing/112193/Ultimate-Tag-Cloud-Widget
|
8 |
License: GPLv2 or later
|
9 |
|
47 |
|
48 |
== Changelog ==
|
49 |
|
50 |
+
= 2.2.3 =
|
51 |
+
|
52 |
+
* Fixed naming collision issue with other plugins
|
53 |
+
|
54 |
= 2.2.2 =
|
55 |
|
56 |
* Fixed widget initialization issue
|
90 |
|
91 |
== Upgrade Notice ==
|
92 |
|
93 |
+
= 2.2.3 =
|
94 |
+
|
95 |
+
* Fixed naming collision issue with other plugins
|
96 |
+
|
97 |
= 2.2.2 =
|
98 |
|
99 |
* Fixed widget initialization issue
|
src/Config.php
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
* Ultimate Tag Cloud Widget
|
7 |
*
|
8 |
* @author Rickard Andersson <rickard@0x539.se>
|
9 |
-
* @version 2.2.
|
10 |
* @license GPLv2
|
11 |
* @package utcw
|
12 |
* @subpackage main
|
@@ -20,7 +20,7 @@
|
|
20 |
* @package utcw
|
21 |
* @subpackage main
|
22 |
*/
|
23 |
-
class
|
24 |
{
|
25 |
|
26 |
/**
|
@@ -650,11 +650,11 @@ class Config
|
|
650 |
* Loads a configuration instance array and parses the options
|
651 |
*
|
652 |
* @param array $input Array of key => value pairs of settings and values
|
653 |
-
* @param
|
654 |
*
|
655 |
* @since 2.0
|
656 |
*/
|
657 |
-
public function __construct(array $input,
|
658 |
{
|
659 |
$this->allowed_post_types = $plugin->getAllowedPostTypes();
|
660 |
$this->allowed_taxonomies = $plugin->getAllowedTaxonomies();
|
6 |
* Ultimate Tag Cloud Widget
|
7 |
*
|
8 |
* @author Rickard Andersson <rickard@0x539.se>
|
9 |
+
* @version 2.2.3
|
10 |
* @license GPLv2
|
11 |
* @package utcw
|
12 |
* @subpackage main
|
20 |
* @package utcw
|
21 |
* @subpackage main
|
22 |
*/
|
23 |
+
class UTCW_Config
|
24 |
{
|
25 |
|
26 |
/**
|
650 |
* Loads a configuration instance array and parses the options
|
651 |
*
|
652 |
* @param array $input Array of key => value pairs of settings and values
|
653 |
+
* @param UTCW_Plugin $plugin Reference to the main plugin instance
|
654 |
*
|
655 |
* @since 2.0
|
656 |
*/
|
657 |
+
public function __construct(array $input, UTCW_Plugin $plugin)
|
658 |
{
|
659 |
$this->allowed_post_types = $plugin->getAllowedPostTypes();
|
660 |
$this->allowed_taxonomies = $plugin->getAllowedTaxonomies();
|
src/Data.php
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
* Ultimate Tag Cloud Widget
|
7 |
*
|
8 |
* @author Rickard Andersson <rickard@0x539.se>
|
9 |
-
* @version 2.2.
|
10 |
* @license GPLv2
|
11 |
* @package utcw
|
12 |
* @subpackage main
|
@@ -26,13 +26,13 @@
|
|
26 |
* @package utcw
|
27 |
* @subpackage main
|
28 |
*/
|
29 |
-
class
|
30 |
{
|
31 |
|
32 |
/**
|
33 |
* Reference to the current configuration
|
34 |
*
|
35 |
-
* @var
|
36 |
* @since 2.0
|
37 |
*/
|
38 |
protected $config;
|
@@ -48,7 +48,7 @@ class Data
|
|
48 |
/**
|
49 |
* Reference to main plugin instance
|
50 |
*
|
51 |
-
* @var
|
52 |
* @since 2.0
|
53 |
*/
|
54 |
protected $plugin;
|
@@ -56,7 +56,7 @@ class Data
|
|
56 |
/**
|
57 |
* Reference to the selection strategy used
|
58 |
*
|
59 |
-
* @var
|
60 |
* @since 2.2
|
61 |
*/
|
62 |
protected $strategy;
|
@@ -64,13 +64,13 @@ class Data
|
|
64 |
/**
|
65 |
* Creates a new instance
|
66 |
*
|
67 |
-
* @param
|
68 |
-
* @param
|
69 |
* @param wpdb $db WordPress DB instance
|
70 |
*
|
71 |
* @since 2.0
|
72 |
*/
|
73 |
-
public function __construct(
|
74 |
{
|
75 |
$this->config = $config;
|
76 |
$this->db = $db;
|
@@ -78,10 +78,10 @@ class Data
|
|
78 |
|
79 |
switch ($this->config->strategy) {
|
80 |
case 'popularity':
|
81 |
-
$this->strategy = new
|
82 |
break;
|
83 |
case 'random':
|
84 |
-
$this->strategy = new
|
85 |
break;
|
86 |
}
|
87 |
}
|
@@ -89,7 +89,7 @@ class Data
|
|
89 |
/**
|
90 |
* Loads terms based on current configuration
|
91 |
*
|
92 |
-
* @return
|
93 |
* @since 2.0
|
94 |
*/
|
95 |
public function getTerms()
|
@@ -122,7 +122,7 @@ class Data
|
|
122 |
$terms[] = $term;
|
123 |
}
|
124 |
} else {
|
125 |
-
$terms[] = new
|
126 |
}
|
127 |
}
|
128 |
|
6 |
* Ultimate Tag Cloud Widget
|
7 |
*
|
8 |
* @author Rickard Andersson <rickard@0x539.se>
|
9 |
+
* @version 2.2.3
|
10 |
* @license GPLv2
|
11 |
* @package utcw
|
12 |
* @subpackage main
|
26 |
* @package utcw
|
27 |
* @subpackage main
|
28 |
*/
|
29 |
+
class UTCW_Data
|
30 |
{
|
31 |
|
32 |
/**
|
33 |
* Reference to the current configuration
|
34 |
*
|
35 |
+
* @var UTCW_Config
|
36 |
* @since 2.0
|
37 |
*/
|
38 |
protected $config;
|
48 |
/**
|
49 |
* Reference to main plugin instance
|
50 |
*
|
51 |
+
* @var UTCW_Plugin
|
52 |
* @since 2.0
|
53 |
*/
|
54 |
protected $plugin;
|
56 |
/**
|
57 |
* Reference to the selection strategy used
|
58 |
*
|
59 |
+
* @var UTCW_SelectionStrategy
|
60 |
* @since 2.2
|
61 |
*/
|
62 |
protected $strategy;
|
64 |
/**
|
65 |
* Creates a new instance
|
66 |
*
|
67 |
+
* @param UTCW_Config $config Current configuration
|
68 |
+
* @param UTCW_Plugin $plugin Main plugin instance
|
69 |
* @param wpdb $db WordPress DB instance
|
70 |
*
|
71 |
* @since 2.0
|
72 |
*/
|
73 |
+
public function __construct(UTCW_Config $config, UTCW_Plugin $plugin, wpdb $db)
|
74 |
{
|
75 |
$this->config = $config;
|
76 |
$this->db = $db;
|
78 |
|
79 |
switch ($this->config->strategy) {
|
80 |
case 'popularity':
|
81 |
+
$this->strategy = new UTCW_PopularityStrategy($this->config, $this->plugin, $this->db);
|
82 |
break;
|
83 |
case 'random':
|
84 |
+
$this->strategy = new UTCW_RandomStrategy($this->config, $this->plugin, $this->db);
|
85 |
break;
|
86 |
}
|
87 |
}
|
89 |
/**
|
90 |
* Loads terms based on current configuration
|
91 |
*
|
92 |
+
* @return UTCW_Term[]
|
93 |
* @since 2.0
|
94 |
*/
|
95 |
public function getTerms()
|
122 |
$terms[] = $term;
|
123 |
}
|
124 |
} else {
|
125 |
+
$terms[] = new UTCW_Term($item, $this->plugin);
|
126 |
}
|
127 |
}
|
128 |
|
src/Database/QueryBuilder.php
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
* Ultimate Tag Cloud Widget
|
7 |
*
|
8 |
* @author Rickard Andersson <rickard@0x539.se>
|
9 |
-
* @version 2.2.
|
10 |
* @license GPLv2
|
11 |
* @package utcw
|
12 |
* @subpackage language
|
@@ -23,7 +23,7 @@
|
|
23 |
* @package utcw
|
24 |
* @subpackage database
|
25 |
*/
|
26 |
-
class
|
27 |
{
|
28 |
|
29 |
/**
|
@@ -37,12 +37,12 @@ class QueryBuilder
|
|
37 |
/**
|
38 |
* Creates a new instance of the QueryBuilder
|
39 |
*
|
40 |
-
* @param
|
41 |
* @param wpdb $db
|
42 |
*
|
43 |
* @since 2.2
|
44 |
*/
|
45 |
-
public function __construct(
|
46 |
{
|
47 |
$this->db = $db;
|
48 |
$this->plugin = $plugin;
|
6 |
* Ultimate Tag Cloud Widget
|
7 |
*
|
8 |
* @author Rickard Andersson <rickard@0x539.se>
|
9 |
+
* @version 2.2.3
|
10 |
* @license GPLv2
|
11 |
* @package utcw
|
12 |
* @subpackage language
|
23 |
* @package utcw
|
24 |
* @subpackage database
|
25 |
*/
|
26 |
+
class UTCW_QueryBuilder
|
27 |
{
|
28 |
|
29 |
/**
|
37 |
/**
|
38 |
* Creates a new instance of the QueryBuilder
|
39 |
*
|
40 |
+
* @param UTCW_Plugin $plugin
|
41 |
* @param wpdb $db
|
42 |
*
|
43 |
* @since 2.2
|
44 |
*/
|
45 |
+
public function __construct(UTCW_Plugin $plugin, wpdb $db)
|
46 |
{
|
47 |
$this->db = $db;
|
48 |
$this->plugin = $plugin;
|
src/Language/QTranslateHandler.php
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
* Ultimate Tag Cloud Widget
|
7 |
*
|
8 |
* @author Rickard Andersson <rickard@0x539.se>
|
9 |
-
* @version 2.2.
|
10 |
* @license GPLv2
|
11 |
* @package utcw
|
12 |
* @subpackage language
|
@@ -24,7 +24,7 @@
|
|
24 |
* @package utcw
|
25 |
* @subpackage language
|
26 |
*/
|
27 |
-
class
|
28 |
{
|
29 |
/**
|
30 |
* An array of term names mapped to translated names
|
@@ -35,6 +35,8 @@ class QTranslateHandler extends TranslationHandler
|
|
35 |
protected $nameMap;
|
36 |
|
37 |
/**
|
|
|
|
|
38 |
* @param array $nameMap An array of term names mapped to translated names
|
39 |
*
|
40 |
* @since 2.2
|
@@ -69,17 +71,17 @@ class QTranslateHandler extends TranslationHandler
|
|
69 |
/**
|
70 |
* {@inheritdoc}
|
71 |
*
|
72 |
-
* @param stdClass
|
73 |
-
* @param
|
74 |
*
|
75 |
-
* @return null|
|
76 |
* @since 2.2
|
77 |
*/
|
78 |
-
public function createTerm(stdClass $input,
|
79 |
{
|
80 |
$input->name = $this->getTermName($input->name);
|
81 |
|
82 |
-
return new
|
83 |
}
|
84 |
|
85 |
/**
|
6 |
* Ultimate Tag Cloud Widget
|
7 |
*
|
8 |
* @author Rickard Andersson <rickard@0x539.se>
|
9 |
+
* @version 2.2.3
|
10 |
* @license GPLv2
|
11 |
* @package utcw
|
12 |
* @subpackage language
|
24 |
* @package utcw
|
25 |
* @subpackage language
|
26 |
*/
|
27 |
+
class UTCW_QTranslateHandler extends UTCW_TranslationHandler
|
28 |
{
|
29 |
/**
|
30 |
* An array of term names mapped to translated names
|
35 |
protected $nameMap;
|
36 |
|
37 |
/**
|
38 |
+
* Initializes the class with a map of term names
|
39 |
+
*
|
40 |
* @param array $nameMap An array of term names mapped to translated names
|
41 |
*
|
42 |
* @since 2.2
|
71 |
/**
|
72 |
* {@inheritdoc}
|
73 |
*
|
74 |
+
* @param stdClass $input
|
75 |
+
* @param UTCW_Plugin $plugin
|
76 |
*
|
77 |
+
* @return null|UTCW_Term
|
78 |
* @since 2.2
|
79 |
*/
|
80 |
+
public function createTerm(stdClass $input, UTCW_Plugin $plugin)
|
81 |
{
|
82 |
$input->name = $this->getTermName($input->name);
|
83 |
|
84 |
+
return new UTCW_Term($input, $plugin);
|
85 |
}
|
86 |
|
87 |
/**
|
src/Language/TranslationHandler.php
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
* Ultimate Tag Cloud Widget
|
7 |
*
|
8 |
* @author Rickard Andersson <rickard@0x539.se>
|
9 |
-
* @version 2.2.
|
10 |
* @license GPLv2
|
11 |
* @package utcw
|
12 |
* @subpackage language
|
@@ -24,7 +24,7 @@
|
|
24 |
* @package utcw
|
25 |
* @subpackage language
|
26 |
*/
|
27 |
-
abstract class
|
28 |
{
|
29 |
/**
|
30 |
* Returns true if this multi-language plugin is enabled
|
@@ -39,10 +39,10 @@ abstract class TranslationHandler
|
|
39 |
* The returned Term will have its name translated into the current language
|
40 |
*
|
41 |
* @param stdClass $input
|
42 |
-
* @param
|
43 |
*
|
44 |
-
* @return null|
|
45 |
* @since 2.2
|
46 |
*/
|
47 |
-
abstract public function createTerm(stdClass $input,
|
48 |
}
|
6 |
* Ultimate Tag Cloud Widget
|
7 |
*
|
8 |
* @author Rickard Andersson <rickard@0x539.se>
|
9 |
+
* @version 2.2.3
|
10 |
* @license GPLv2
|
11 |
* @package utcw
|
12 |
* @subpackage language
|
24 |
* @package utcw
|
25 |
* @subpackage language
|
26 |
*/
|
27 |
+
abstract class UTCW_TranslationHandler
|
28 |
{
|
29 |
/**
|
30 |
* Returns true if this multi-language plugin is enabled
|
39 |
* The returned Term will have its name translated into the current language
|
40 |
*
|
41 |
* @param stdClass $input
|
42 |
+
* @param UTCW_Plugin $plugin
|
43 |
*
|
44 |
+
* @return null|UTCW_Term
|
45 |
* @since 2.2
|
46 |
*/
|
47 |
+
abstract public function createTerm(stdClass $input, UTCW_Plugin $plugin);
|
48 |
}
|
src/Language/WPMLHandler.php
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
* Ultimate Tag Cloud Widget
|
7 |
*
|
8 |
* @author Rickard Andersson <rickard@0x539.se>
|
9 |
-
* @version 2.2.
|
10 |
* @license GPLv2
|
11 |
* @package utcw
|
12 |
* @subpackage language
|
@@ -24,7 +24,7 @@
|
|
24 |
* @package utcw
|
25 |
* @subpackage language
|
26 |
*/
|
27 |
-
class
|
28 |
{
|
29 |
/**
|
30 |
* Returns true if WPML is installed and active
|
@@ -108,18 +108,18 @@ class WPMLHandler extends TranslationHandler
|
|
108 |
* {@inheritdoc}
|
109 |
*
|
110 |
* @param stdClass $input
|
111 |
-
* @param
|
112 |
*
|
113 |
-
* @return null|
|
114 |
* @since 2.2
|
115 |
*/
|
116 |
-
public function createTerm(stdClass $input,
|
117 |
{
|
118 |
if ($this->isInCurrentLanguage($input)) {
|
119 |
|
120 |
$input->name = $this->getTermName($input->name);
|
121 |
|
122 |
-
return new
|
123 |
}
|
124 |
|
125 |
return null;
|
6 |
* Ultimate Tag Cloud Widget
|
7 |
*
|
8 |
* @author Rickard Andersson <rickard@0x539.se>
|
9 |
+
* @version 2.2.3
|
10 |
* @license GPLv2
|
11 |
* @package utcw
|
12 |
* @subpackage language
|
24 |
* @package utcw
|
25 |
* @subpackage language
|
26 |
*/
|
27 |
+
class UTCW_WPMLHandler extends UTCW_TranslationHandler
|
28 |
{
|
29 |
/**
|
30 |
* Returns true if WPML is installed and active
|
108 |
* {@inheritdoc}
|
109 |
*
|
110 |
* @param stdClass $input
|
111 |
+
* @param UTCW_Plugin $plugin
|
112 |
*
|
113 |
+
* @return null|UTCW_Term
|
114 |
* @since 2.2
|
115 |
*/
|
116 |
+
public function createTerm(stdClass $input, UTCW_Plugin $plugin)
|
117 |
{
|
118 |
if ($this->isInCurrentLanguage($input)) {
|
119 |
|
120 |
$input->name = $this->getTermName($input->name);
|
121 |
|
122 |
+
return new UTCW_Term($input, $plugin);
|
123 |
}
|
124 |
|
125 |
return null;
|
src/Plugin.php
CHANGED
@@ -17,13 +17,13 @@
|
|
17 |
* Ultimate Tag Cloud Widget
|
18 |
*
|
19 |
* @author Rickard Andersson <rickard@0x539.se>
|
20 |
-
* @version 2.2.
|
21 |
* @license GPLv2
|
22 |
* @package utcw
|
23 |
* @subpackage main
|
24 |
* @since 2.0
|
25 |
*/
|
26 |
-
class
|
27 |
{
|
28 |
|
29 |
/**
|
@@ -45,7 +45,7 @@ class Plugin
|
|
45 |
/**
|
46 |
* Singleton instance
|
47 |
*
|
48 |
-
* @var
|
49 |
* @since 2.0
|
50 |
*/
|
51 |
private static $instance;
|
@@ -60,7 +60,7 @@ class Plugin
|
|
60 |
{
|
61 |
add_action('admin_head-widgets.php', array($this, 'initAdminAssets'));
|
62 |
add_action('wp_loaded', array($this, 'wpLoaded'));
|
63 |
-
add_action('widgets_init', create_function('', 'return register_widget("
|
64 |
add_shortcode('utcw', array($this, 'shortcode'));
|
65 |
}
|
66 |
|
@@ -68,7 +68,7 @@ class Plugin
|
|
68 |
* Returns an instance of the plugin
|
69 |
*
|
70 |
* @static
|
71 |
-
* @return
|
72 |
* @since 2.0
|
73 |
*/
|
74 |
public static function getInstance()
|
@@ -112,9 +112,9 @@ class Plugin
|
|
112 |
}
|
113 |
}
|
114 |
|
115 |
-
$config = new
|
116 |
-
$data = new
|
117 |
-
$render = new
|
118 |
|
119 |
return $render->getCloud();
|
120 |
}
|
@@ -375,19 +375,19 @@ class Plugin
|
|
375 |
/**
|
376 |
* Returns a new instance of the QTranslate Handler class
|
377 |
*
|
378 |
-
* @return null|
|
379 |
*/
|
380 |
public function getTranslationHandler()
|
381 |
{
|
382 |
$names = get_option('qtranslate_term_name');
|
383 |
$names = $names ? $names : array();
|
384 |
-
$qTranslate = new
|
385 |
|
386 |
if ($qTranslate->isEnabled()) {
|
387 |
return $qTranslate;
|
388 |
}
|
389 |
|
390 |
-
$WPML = new
|
391 |
|
392 |
if ($WPML->isEnabled()) {
|
393 |
return $WPML;
|
17 |
* Ultimate Tag Cloud Widget
|
18 |
*
|
19 |
* @author Rickard Andersson <rickard@0x539.se>
|
20 |
+
* @version 2.2.3
|
21 |
* @license GPLv2
|
22 |
* @package utcw
|
23 |
* @subpackage main
|
24 |
* @since 2.0
|
25 |
*/
|
26 |
+
class UTCW_Plugin
|
27 |
{
|
28 |
|
29 |
/**
|
45 |
/**
|
46 |
* Singleton instance
|
47 |
*
|
48 |
+
* @var UTCW_Plugin
|
49 |
* @since 2.0
|
50 |
*/
|
51 |
private static $instance;
|
60 |
{
|
61 |
add_action('admin_head-widgets.php', array($this, 'initAdminAssets'));
|
62 |
add_action('wp_loaded', array($this, 'wpLoaded'));
|
63 |
+
add_action('widgets_init', create_function('', 'return register_widget("UTCW_Widget");'));
|
64 |
add_shortcode('utcw', array($this, 'shortcode'));
|
65 |
}
|
66 |
|
68 |
* Returns an instance of the plugin
|
69 |
*
|
70 |
* @static
|
71 |
+
* @return UTCW_Plugin
|
72 |
* @since 2.0
|
73 |
*/
|
74 |
public static function getInstance()
|
112 |
}
|
113 |
}
|
114 |
|
115 |
+
$config = new UTCW_Config($args, $this);
|
116 |
+
$data = new UTCW_Data($config, $this, $wpdb);
|
117 |
+
$render = new UTCW_Render($config, $data, $this);
|
118 |
|
119 |
return $render->getCloud();
|
120 |
}
|
375 |
/**
|
376 |
* Returns a new instance of the QTranslate Handler class
|
377 |
*
|
378 |
+
* @return null|UTCW_TranslationHandler
|
379 |
*/
|
380 |
public function getTranslationHandler()
|
381 |
{
|
382 |
$names = get_option('qtranslate_term_name');
|
383 |
$names = $names ? $names : array();
|
384 |
+
$qTranslate = new UTCW_QTranslateHandler($names);
|
385 |
|
386 |
if ($qTranslate->isEnabled()) {
|
387 |
return $qTranslate;
|
388 |
}
|
389 |
|
390 |
+
$WPML = new UTCW_WPMLHandler();
|
391 |
|
392 |
if ($WPML->isEnabled()) {
|
393 |
return $WPML;
|
src/Render.php
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
* Ultimate Tag Cloud Widget
|
7 |
*
|
8 |
* @author Rickard Andersson <rickard@0x539.se>
|
9 |
-
* @version 2.2.
|
10 |
* @license GPLv2
|
11 |
* @package utcw
|
12 |
* @subpackage main
|
@@ -20,13 +20,13 @@
|
|
20 |
* @package utcw
|
21 |
* @subpackage main
|
22 |
*/
|
23 |
-
class
|
24 |
{
|
25 |
|
26 |
/**
|
27 |
* Reference to the Data class which contains the data to be rendered
|
28 |
*
|
29 |
-
* @var
|
30 |
* @since 2.0
|
31 |
*/
|
32 |
private $data;
|
@@ -34,7 +34,7 @@ class Render
|
|
34 |
/**
|
35 |
* Reference to the current configuration
|
36 |
*
|
37 |
-
* @var
|
38 |
* @since 2.0
|
39 |
*/
|
40 |
private $config;
|
@@ -42,7 +42,7 @@ class Render
|
|
42 |
/**
|
43 |
* Reference to the main plugin instance
|
44 |
*
|
45 |
-
* @var
|
46 |
* @since 2.0
|
47 |
*/
|
48 |
private $plugin;
|
@@ -66,13 +66,13 @@ class Render
|
|
66 |
/**
|
67 |
* Creates a new instance of the renderer
|
68 |
*
|
69 |
-
* @param
|
70 |
-
* @param
|
71 |
-
* @param
|
72 |
*
|
73 |
* @since 2.0
|
74 |
*/
|
75 |
-
public function __construct(
|
76 |
{
|
77 |
$this->data = $data;
|
78 |
$this->config = $config;
|
6 |
* Ultimate Tag Cloud Widget
|
7 |
*
|
8 |
* @author Rickard Andersson <rickard@0x539.se>
|
9 |
+
* @version 2.2.3
|
10 |
* @license GPLv2
|
11 |
* @package utcw
|
12 |
* @subpackage main
|
20 |
* @package utcw
|
21 |
* @subpackage main
|
22 |
*/
|
23 |
+
class UTCW_Render
|
24 |
{
|
25 |
|
26 |
/**
|
27 |
* Reference to the Data class which contains the data to be rendered
|
28 |
*
|
29 |
+
* @var UTCW_Data
|
30 |
* @since 2.0
|
31 |
*/
|
32 |
private $data;
|
34 |
/**
|
35 |
* Reference to the current configuration
|
36 |
*
|
37 |
+
* @var UTCW_Config
|
38 |
* @since 2.0
|
39 |
*/
|
40 |
private $config;
|
42 |
/**
|
43 |
* Reference to the main plugin instance
|
44 |
*
|
45 |
+
* @var UTCW_Plugin
|
46 |
* @since 2.0
|
47 |
*/
|
48 |
private $plugin;
|
66 |
/**
|
67 |
* Creates a new instance of the renderer
|
68 |
*
|
69 |
+
* @param UTCW_Config $config Configuration
|
70 |
+
* @param UTCW_Data $data Term data
|
71 |
+
* @param UTCW_Plugin $plugin Main plugin instance
|
72 |
*
|
73 |
* @since 2.0
|
74 |
*/
|
75 |
+
public function __construct(UTCW_Config $config, UTCW_Data $data, UTCW_Plugin $plugin)
|
76 |
{
|
77 |
$this->data = $data;
|
78 |
$this->config = $config;
|
src/Selection/PopularityStrategy.php
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
* Ultimate Tag Cloud Widget
|
7 |
*
|
8 |
* @author Rickard Andersson <rickard@0x539.se>
|
9 |
-
* @version 2.2.
|
10 |
* @license GPLv2
|
11 |
* @package utcw
|
12 |
* @subpackage language
|
@@ -26,21 +26,27 @@
|
|
26 |
* @package utcw
|
27 |
* @subpackage selection
|
28 |
*/
|
29 |
-
class
|
30 |
{
|
31 |
/**
|
32 |
-
*
|
|
|
|
|
33 |
* @since 2.2
|
34 |
*/
|
35 |
protected $config;
|
36 |
|
37 |
/**
|
38 |
-
*
|
|
|
|
|
39 |
* @since 2.2
|
40 |
*/
|
41 |
protected $plugin;
|
42 |
|
43 |
/**
|
|
|
|
|
44 |
* @var wpdb
|
45 |
* @since 2.2
|
46 |
*/
|
@@ -57,13 +63,13 @@ class PopularityStrategy extends SelectionStrategy
|
|
57 |
/**
|
58 |
* Creates a new instance
|
59 |
*
|
60 |
-
* @param
|
61 |
-
* @param
|
62 |
-
* @param wpdb
|
63 |
*
|
64 |
* @since 2.2
|
65 |
*/
|
66 |
-
public function __construct(
|
67 |
{
|
68 |
$this->config = $config;
|
69 |
$this->plugin = $plugin;
|
@@ -78,7 +84,7 @@ class PopularityStrategy extends SelectionStrategy
|
|
78 |
*/
|
79 |
public function getData()
|
80 |
{
|
81 |
-
$builder = new
|
82 |
|
83 |
$builder->addAuthorConstraint($this->config->authors);
|
84 |
$builder->addPostTypeConstraint($this->config->post_type);
|
@@ -107,6 +113,8 @@ class PopularityStrategy extends SelectionStrategy
|
|
107 |
}
|
108 |
|
109 |
/**
|
|
|
|
|
110 |
* @return void
|
111 |
* @since 2.2
|
112 |
*/
|
6 |
* Ultimate Tag Cloud Widget
|
7 |
*
|
8 |
* @author Rickard Andersson <rickard@0x539.se>
|
9 |
+
* @version 2.2.3
|
10 |
* @license GPLv2
|
11 |
* @package utcw
|
12 |
* @subpackage language
|
26 |
* @package utcw
|
27 |
* @subpackage selection
|
28 |
*/
|
29 |
+
class UTCW_PopularityStrategy extends UTCW_SelectionStrategy
|
30 |
{
|
31 |
/**
|
32 |
+
* Config class instance
|
33 |
+
*
|
34 |
+
* @var UTCW_Config
|
35 |
* @since 2.2
|
36 |
*/
|
37 |
protected $config;
|
38 |
|
39 |
/**
|
40 |
+
* Plugin class instance
|
41 |
+
*
|
42 |
+
* @var UTCW_Plugin
|
43 |
* @since 2.2
|
44 |
*/
|
45 |
protected $plugin;
|
46 |
|
47 |
/**
|
48 |
+
* WP Database class instance
|
49 |
+
*
|
50 |
* @var wpdb
|
51 |
* @since 2.2
|
52 |
*/
|
63 |
/**
|
64 |
* Creates a new instance
|
65 |
*
|
66 |
+
* @param UTCW_Config $config Current configuration
|
67 |
+
* @param UTCW_Plugin $plugin Main plugin instance
|
68 |
+
* @param wpdb $db WordPress DB instance
|
69 |
*
|
70 |
* @since 2.2
|
71 |
*/
|
72 |
+
public function __construct(UTCW_Config $config, UTCW_Plugin $plugin, wpdb $db)
|
73 |
{
|
74 |
$this->config = $config;
|
75 |
$this->plugin = $plugin;
|
84 |
*/
|
85 |
public function getData()
|
86 |
{
|
87 |
+
$builder = new UTCW_QueryBuilder($this->plugin, $this->db);
|
88 |
|
89 |
$builder->addAuthorConstraint($this->config->authors);
|
90 |
$builder->addPostTypeConstraint($this->config->post_type);
|
113 |
}
|
114 |
|
115 |
/**
|
116 |
+
* Clean up the internal members for debug output
|
117 |
+
*
|
118 |
* @return void
|
119 |
* @since 2.2
|
120 |
*/
|
src/Selection/RandomStrategy.php
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
* Ultimate Tag Cloud Widget
|
7 |
*
|
8 |
* @author Rickard Andersson <rickard@0x539.se>
|
9 |
-
* @version 2.2.
|
10 |
* @license GPLv2
|
11 |
* @package utcw
|
12 |
* @subpackage language
|
@@ -26,21 +26,27 @@
|
|
26 |
* @package utcw
|
27 |
* @subpackage selection
|
28 |
*/
|
29 |
-
class
|
30 |
{
|
31 |
/**
|
32 |
-
*
|
|
|
|
|
33 |
* @since 2.2
|
34 |
*/
|
35 |
protected $config;
|
36 |
|
37 |
/**
|
38 |
-
*
|
|
|
|
|
39 |
* @since 2.2
|
40 |
*/
|
41 |
protected $plugin;
|
42 |
|
43 |
/**
|
|
|
|
|
44 |
* @var wpdb
|
45 |
* @since 2.2
|
46 |
*/
|
@@ -57,13 +63,13 @@ class RandomStrategy extends SelectionStrategy
|
|
57 |
/**
|
58 |
* Creates a new instance
|
59 |
*
|
60 |
-
* @param
|
61 |
-
* @param
|
62 |
-
* @param wpdb
|
63 |
*
|
64 |
* @since 2.2
|
65 |
*/
|
66 |
-
public function __construct(
|
67 |
{
|
68 |
$this->config = $config;
|
69 |
$this->plugin = $plugin;
|
@@ -78,7 +84,7 @@ class RandomStrategy extends SelectionStrategy
|
|
78 |
*/
|
79 |
public function getData()
|
80 |
{
|
81 |
-
$builder = new
|
82 |
|
83 |
$builder->addAuthorConstraint($this->config->authors);
|
84 |
$builder->addPostTypeConstraint($this->config->post_type);
|
@@ -107,6 +113,8 @@ class RandomStrategy extends SelectionStrategy
|
|
107 |
}
|
108 |
|
109 |
/**
|
|
|
|
|
110 |
* @return void
|
111 |
* @since 2.2
|
112 |
*/
|
6 |
* Ultimate Tag Cloud Widget
|
7 |
*
|
8 |
* @author Rickard Andersson <rickard@0x539.se>
|
9 |
+
* @version 2.2.3
|
10 |
* @license GPLv2
|
11 |
* @package utcw
|
12 |
* @subpackage language
|
26 |
* @package utcw
|
27 |
* @subpackage selection
|
28 |
*/
|
29 |
+
class UTCW_RandomStrategy extends UTCW_SelectionStrategy
|
30 |
{
|
31 |
/**
|
32 |
+
* Config class instance
|
33 |
+
*
|
34 |
+
* @var UTCW_Config
|
35 |
* @since 2.2
|
36 |
*/
|
37 |
protected $config;
|
38 |
|
39 |
/**
|
40 |
+
* Plugin class instance
|
41 |
+
*
|
42 |
+
* @var UTCW_Plugin
|
43 |
* @since 2.2
|
44 |
*/
|
45 |
protected $plugin;
|
46 |
|
47 |
/**
|
48 |
+
* WP Database class instance
|
49 |
+
*
|
50 |
* @var wpdb
|
51 |
* @since 2.2
|
52 |
*/
|
63 |
/**
|
64 |
* Creates a new instance
|
65 |
*
|
66 |
+
* @param UTCW_Config $config Current configuration
|
67 |
+
* @param UTCW_Plugin $plugin Main plugin instance
|
68 |
+
* @param wpdb $db WordPress DB instance
|
69 |
*
|
70 |
* @since 2.2
|
71 |
*/
|
72 |
+
public function __construct(UTCW_Config $config, UTCW_Plugin $plugin, wpdb $db)
|
73 |
{
|
74 |
$this->config = $config;
|
75 |
$this->plugin = $plugin;
|
84 |
*/
|
85 |
public function getData()
|
86 |
{
|
87 |
+
$builder = new UTCW_QueryBuilder($this->plugin, $this->db);
|
88 |
|
89 |
$builder->addAuthorConstraint($this->config->authors);
|
90 |
$builder->addPostTypeConstraint($this->config->post_type);
|
113 |
}
|
114 |
|
115 |
/**
|
116 |
+
* Clean up the internal members for debug output
|
117 |
+
*
|
118 |
* @return void
|
119 |
* @since 2.2
|
120 |
*/
|
src/Selection/SelectionStrategy.php
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
* Ultimate Tag Cloud Widget
|
7 |
*
|
8 |
* @author Rickard Andersson <rickard@0x539.se>
|
9 |
-
* @version 2.2.
|
10 |
* @license GPLv2
|
11 |
* @package utcw
|
12 |
* @subpackage selection
|
@@ -25,18 +25,18 @@
|
|
25 |
* @package utcw
|
26 |
* @subpackage language
|
27 |
*/
|
28 |
-
abstract class
|
29 |
{
|
30 |
/**
|
31 |
* Creates a new instance
|
32 |
*
|
33 |
-
* @param
|
34 |
-
* @param
|
35 |
-
* @param wpdb
|
36 |
*
|
37 |
* @since 2.0
|
38 |
*/
|
39 |
-
abstract public function __construct(
|
40 |
|
41 |
/**
|
42 |
* Loads terms based on current configuration
|
@@ -47,6 +47,8 @@ abstract class SelectionStrategy
|
|
47 |
abstract public function getData();
|
48 |
|
49 |
/**
|
|
|
|
|
50 |
* @return void
|
51 |
*/
|
52 |
abstract public function cleanupForDebug();
|
6 |
* Ultimate Tag Cloud Widget
|
7 |
*
|
8 |
* @author Rickard Andersson <rickard@0x539.se>
|
9 |
+
* @version 2.2.3
|
10 |
* @license GPLv2
|
11 |
* @package utcw
|
12 |
* @subpackage selection
|
25 |
* @package utcw
|
26 |
* @subpackage language
|
27 |
*/
|
28 |
+
abstract class UTCW_SelectionStrategy
|
29 |
{
|
30 |
/**
|
31 |
* Creates a new instance
|
32 |
*
|
33 |
+
* @param UTCW_Config $config Current configuration
|
34 |
+
* @param UTCW_Plugin $plugin Main plugin instance
|
35 |
+
* @param wpdb $db WordPress DB instance
|
36 |
*
|
37 |
* @since 2.0
|
38 |
*/
|
39 |
+
abstract public function __construct(UTCW_Config $config, UTCW_Plugin $plugin, wpdb $db);
|
40 |
|
41 |
/**
|
42 |
* Loads terms based on current configuration
|
47 |
abstract public function getData();
|
48 |
|
49 |
/**
|
50 |
+
* Clean up the internal members for debug output
|
51 |
+
*
|
52 |
* @return void
|
53 |
*/
|
54 |
abstract public function cleanupForDebug();
|
src/Term.php
CHANGED
@@ -8,7 +8,7 @@
|
|
8 |
* Ultimate Tag Cloud Widget
|
9 |
*
|
10 |
* @author Rickard Andersson <rickard@0x539.se>
|
11 |
-
* @version 2.2.
|
12 |
* @license GPLv2
|
13 |
* @package utcw
|
14 |
* @subpackage main
|
@@ -22,7 +22,7 @@
|
|
22 |
* @package utcw
|
23 |
* @subpackage main
|
24 |
*/
|
25 |
-
class
|
26 |
{
|
27 |
|
28 |
/**
|
@@ -93,11 +93,11 @@ class Term
|
|
93 |
* Creates a new term
|
94 |
*
|
95 |
* @param stdClass $input Object with properties term_id, count, slug, name, color and taxonomy
|
96 |
-
* @param
|
97 |
*
|
98 |
* @since 2.0
|
99 |
*/
|
100 |
-
public function __construct(stdClass $input,
|
101 |
{
|
102 |
|
103 |
if (isset($input->term_id) && filter_var($input->term_id, FILTER_VALIDATE_INT)) {
|
8 |
* Ultimate Tag Cloud Widget
|
9 |
*
|
10 |
* @author Rickard Andersson <rickard@0x539.se>
|
11 |
+
* @version 2.2.3
|
12 |
* @license GPLv2
|
13 |
* @package utcw
|
14 |
* @subpackage main
|
22 |
* @package utcw
|
23 |
* @subpackage main
|
24 |
*/
|
25 |
+
class UTCW_Term
|
26 |
{
|
27 |
|
28 |
/**
|
93 |
* Creates a new term
|
94 |
*
|
95 |
* @param stdClass $input Object with properties term_id, count, slug, name, color and taxonomy
|
96 |
+
* @param UTCW_Plugin $plugin Reference to the plugin instance
|
97 |
*
|
98 |
* @since 2.0
|
99 |
*/
|
100 |
+
public function __construct(stdClass $input, UTCW_Plugin $plugin)
|
101 |
{
|
102 |
|
103 |
if (isset($input->term_id) && filter_var($input->term_id, FILTER_VALIDATE_INT)) {
|
src/Widget.php
CHANGED
@@ -8,7 +8,7 @@
|
|
8 |
* Ultimate Tag Cloud Widget
|
9 |
*
|
10 |
* @author Rickard Andersson <rickard@0x539.se>
|
11 |
-
* @version 2.2.
|
12 |
* @license GPLv2
|
13 |
* @package utcw
|
14 |
* @subpackage main
|
@@ -22,13 +22,13 @@
|
|
22 |
* @package utcw
|
23 |
* @subpackage main
|
24 |
*/
|
25 |
-
class
|
26 |
{
|
27 |
|
28 |
/**
|
29 |
* Reference to the main plugin instance
|
30 |
*
|
31 |
-
* @var
|
32 |
* @since 2.0
|
33 |
*/
|
34 |
private $plugin;
|
@@ -36,17 +36,17 @@ class Widget extends WP_Widget
|
|
36 |
/**
|
37 |
* Constructor
|
38 |
*
|
39 |
-
* @param
|
40 |
*
|
41 |
-
* @return
|
42 |
* @since 1.0
|
43 |
*/
|
44 |
-
public function __construct(
|
45 |
{
|
46 |
$options = array('description' => __('Highly configurable tag cloud', 'utcw'));
|
47 |
parent::__construct('utcw', __('Ultimate Tag Cloud', 'utcw'), $options);
|
48 |
|
49 |
-
$this->plugin = $plugin ? $plugin :
|
50 |
}
|
51 |
|
52 |
/**
|
@@ -86,7 +86,7 @@ class Widget extends WP_Widget
|
|
86 |
}
|
87 |
}
|
88 |
|
89 |
-
$config = new
|
90 |
|
91 |
if ($save_config) {
|
92 |
$this->plugin->saveConfiguration($new_instance['save_config_name'], $config->getInstance());
|
@@ -112,7 +112,7 @@ class Widget extends WP_Widget
|
|
112 |
public function form(array $instance)
|
113 |
{
|
114 |
/** @noinspection PhpUnusedLocalVariableInspection */
|
115 |
-
$config = new
|
116 |
/** @noinspection PhpUnusedLocalVariableInspection */
|
117 |
$configurations = $this->plugin->getConfigurations();
|
118 |
/** @noinspection PhpUnusedLocalVariableInspection */
|
@@ -141,9 +141,9 @@ class Widget extends WP_Widget
|
|
141 |
|
142 |
$input = array_merge($instance, $args);
|
143 |
|
144 |
-
$config = new
|
145 |
-
$data = new
|
146 |
-
$render = new
|
147 |
|
148 |
$render->render();
|
149 |
}
|
8 |
* Ultimate Tag Cloud Widget
|
9 |
*
|
10 |
* @author Rickard Andersson <rickard@0x539.se>
|
11 |
+
* @version 2.2.3
|
12 |
* @license GPLv2
|
13 |
* @package utcw
|
14 |
* @subpackage main
|
22 |
* @package utcw
|
23 |
* @subpackage main
|
24 |
*/
|
25 |
+
class UTCW_Widget extends WP_Widget
|
26 |
{
|
27 |
|
28 |
/**
|
29 |
* Reference to the main plugin instance
|
30 |
*
|
31 |
+
* @var UTCW_Plugin
|
32 |
* @since 2.0
|
33 |
*/
|
34 |
private $plugin;
|
36 |
/**
|
37 |
* Constructor
|
38 |
*
|
39 |
+
* @param UTCW_Plugin $plugin Optional. UTCW_Plugin instance for dependency injection
|
40 |
*
|
41 |
+
* @return UTCW_Widget
|
42 |
* @since 1.0
|
43 |
*/
|
44 |
+
public function __construct(UTCW_Plugin $plugin = null)
|
45 |
{
|
46 |
$options = array('description' => __('Highly configurable tag cloud', 'utcw'));
|
47 |
parent::__construct('utcw', __('Ultimate Tag Cloud', 'utcw'), $options);
|
48 |
|
49 |
+
$this->plugin = $plugin ? $plugin : UTCW_Plugin::getInstance();
|
50 |
}
|
51 |
|
52 |
/**
|
86 |
}
|
87 |
}
|
88 |
|
89 |
+
$config = new UTCW_Config($new_instance, $this->plugin);
|
90 |
|
91 |
if ($save_config) {
|
92 |
$this->plugin->saveConfiguration($new_instance['save_config_name'], $config->getInstance());
|
112 |
public function form(array $instance)
|
113 |
{
|
114 |
/** @noinspection PhpUnusedLocalVariableInspection */
|
115 |
+
$config = new UTCW_Config($instance, $this->plugin);
|
116 |
/** @noinspection PhpUnusedLocalVariableInspection */
|
117 |
$configurations = $this->plugin->getConfigurations();
|
118 |
/** @noinspection PhpUnusedLocalVariableInspection */
|
141 |
|
142 |
$input = array_merge($instance, $args);
|
143 |
|
144 |
+
$config = new UTCW_Config($input, $this->plugin);
|
145 |
+
$data = new UTCW_Data($config, $this->plugin, $wpdb);
|
146 |
+
$render = new UTCW_Render($config, $data, $this->plugin);
|
147 |
|
148 |
$render->render();
|
149 |
}
|
ultimate-tag-cloud-widget.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
Plugin Name: Ultimate tag cloud widget
|
6 |
Plugin URI: https://www.0x539.se/wordpress/ultimate-tag-cloud-widget/
|
7 |
Description: This plugin aims to be the most configurable tag cloud widget out there.
|
8 |
-
Version: 2.2.
|
9 |
Author: Rickard Andersson
|
10 |
Author URI: https://www.0x539.se
|
11 |
License: GPLv2
|
@@ -17,7 +17,7 @@ License: GPLv2
|
|
17 |
* @var string
|
18 |
* @since 2.0
|
19 |
*/
|
20 |
-
define('UTCW_VERSION', '2.2.
|
21 |
|
22 |
/**
|
23 |
* If development mode is currently enabled
|
@@ -82,7 +82,7 @@ if (UTCW_DEV) {
|
|
82 |
}
|
83 |
|
84 |
// Instantiates the plugin
|
85 |
-
|
86 |
|
87 |
/**
|
88 |
* Function for theme integration
|
@@ -93,6 +93,6 @@ Plugin::getInstance();
|
|
93 |
*/
|
94 |
function do_utcw(array $args)
|
95 |
{
|
96 |
-
$plugin =
|
97 |
echo $plugin->shortcode($args);
|
98 |
}
|
5 |
Plugin Name: Ultimate tag cloud widget
|
6 |
Plugin URI: https://www.0x539.se/wordpress/ultimate-tag-cloud-widget/
|
7 |
Description: This plugin aims to be the most configurable tag cloud widget out there.
|
8 |
+
Version: 2.2.3
|
9 |
Author: Rickard Andersson
|
10 |
Author URI: https://www.0x539.se
|
11 |
License: GPLv2
|
17 |
* @var string
|
18 |
* @since 2.0
|
19 |
*/
|
20 |
+
define('UTCW_VERSION', '2.2.3');
|
21 |
|
22 |
/**
|
23 |
* If development mode is currently enabled
|
82 |
}
|
83 |
|
84 |
// Instantiates the plugin
|
85 |
+
UTCW_Plugin::getInstance();
|
86 |
|
87 |
/**
|
88 |
* Function for theme integration
|
93 |
*/
|
94 |
function do_utcw(array $args)
|
95 |
{
|
96 |
+
$plugin = UTCW_Plugin::getInstance();
|
97 |
echo $plugin->shortcode($args);
|
98 |
}
|