Happy Addons for Elementor (Mega Menu, Post Grid, Woocommerce Product Grid, Table, Event Calendar, Slider Elementor Widget) - Version 2.12.3

Version Description

  • 13 July 2020 =

  • Tweak: Twitter feed widget icon updated

  • Tweak: Twitter feed cache cleaner added

  • Tweak: Twitter feed Error handling updated

  • Tweak: Social link widget default value

  • Fix: Fun factor animation issue

  • Fix: Card widget default text spelling error

  • Fix: Empty button rendering issue

Download this release

Release Info

Developer thehappymonster
Plugin Icon 128x128 Happy Addons for Elementor (Mega Menu, Post Grid, Woocommerce Product Grid, Table, Event Calendar, Slider Elementor Widget)
Version 2.12.3
Comparing to
See all releases

Code changes from version 2.12.2 to 2.12.3

assets/admin/js/editor.min.js CHANGED
@@ -1 +1 @@
1
- !function(e){"use strict";function t(){var t=e("#happy-addons-editor-dark-css");t.length||(t=e("<link>",{id:"happy-addons-editor-dark-css",rel:"stylesheet",href:HappyAddonsEditor.darkStylesheetURL})),elementor.settings.editorPreferences.model.on("change:ui_theme",function(e,n){if("light"===n)return void t.remove();t.attr("media","auto"===n?"(prefers-color-scheme: dark)":"").appendTo(elementorCommon.elements.$body)})}function n(){return{translate:["x","y","x_tablet","y_tablet","x_mobile","y_mobile"],skew:["x","y","x_tablet","y_tablet","x_mobile","y_mobile"],scale:["x","y","x_tablet","y_tablet","x_mobile","y_mobile"],rotate:["x","y","z","x_tablet","y_tablet","z_tablet","x_mobile","y_mobile","z_mobile"]}}function o(e,t,n){e="ha_transform_fx_"+e,t="ha_transform_fx_"+t,n.on("change:"+e,function(e,o){if(!o){var a=elementor.getPanelView().getCurrentPageView().children.find(function(e){return e.model.get("name")===t});n.set(t,_.extend({},n.defaults[t])),a&&a.render()}})}function a(e){var t=elementorFrontend.config.elements.data[e.cid];_.each(n(),function(e,n){_.each(e,function(e){o(n+"_toggle",n+"_"+e,t)})}),elementor.getPanelView().getCurrentPageView().model.on("editor:close",function(){_.each(n(),function(e,n){t.off("change:ha_transform_fx_"+n+"_toggle")})})}if(window.ha=window.ha||{},ha.hasIconLibrary=function(){return elementor.helpers&&elementor.helpers.renderIcon},ha.getFeatureLabel=function(e){var t=document.createElement("DIV");return t.innerHTML=e,e=t.textContent||t.innerText||e,e.length>20?e.substring(0,20)+"...":e},ha.translate=function(e,t){return elementorCommon.translate(e,null,t,HappyAddonsEditor.i18n)},window.ha_get_feature_label=ha.getFeatureLabel,window.ha_has_icon_library=ha.hasIconLibrary,window.ha_translate=ha.translate,ha.getButtonWithIcon=function(e,t){var n,o,a,i,r,s=[],l={};return t=t||{},t=_.defaults(t,{oldIcon:"button_icon",iconPos:"button_icon_position",newIcon:"button_selected_icon",text:"button_text",link:"button_link",class:"ha-btn ha-btn--link",textClass:"ha-btn-text"}),!_.isObject(e)||_.isUndefined(e.getContainer)?"":(l=e.getContainer().settings.toJSON(),ha.hasIconLibrary()&&(n=elementor.helpers.renderIcon(e,l[t.newIcon],{"aria-hidden":!0,class:"ha-btn-icon"},"i","object"),o=elementor.helpers.isIconMigrated(l,t.newIcon)),e.addInlineEditingAttributes(t.text,"none"),e.addRenderAttribute(t.text,"class",t.textClass),e.addRenderAttribute("button","class",t.class),e.addRenderAttribute("button","href",l[t.link].url),(l[t.newIcon]&&l[t.newIcon].value||l[t.oldIcon])&&(ha.hasIconLibrary()&&n&&n.rendered&&(!l[t.oldIcon]||o)?a="svg"===l[t.newIcon].library?'<span class="ha-btn-icon ha-btn-icon--svg">'+n.value+"</span>":n.value:l[t.oldIcon]&&(a='<i class="ha-btn-icon '+t.oldIcon+'" aria-hidden="true"></i>')),!l[t.text]||l[t.newIcon]||l[t.oldIcon]?l[t.text]||!l[t.newIcon]&&!l[t.oldIcon]?l[t.text]&&(l[t.newIcon]||l[t.oldIcon])&&("before"===l[t.iconPos]?(e.addRenderAttribute("button","class","ha-btn--icon-before"),i=a,r="<span "+e.getRenderAttributeString(t.text)+">"+l[t.text]+"</span>"):(e.addRenderAttribute("button","class","ha-btn--icon-after"),r=a,i="<span "+e.getRenderAttributeString(t.text)+">"+l[t.text]+"</span>"),s=["<a "+e.getRenderAttributeString("button")+">",i,r,"</a>"]):s=["<a "+e.getRenderAttributeString("button")+">",a,"</a>"]:s=["<a "+e.getRenderAttributeString("button")+">","<span "+e.getRenderAttributeString(t.text)+">",l[t.text],"</span>","</a>"],s.join(""))},elementor.on("panel:init",function(){if(e("#elementor-panel-elements-search-input").on("keyup",_.debounce(function(){e("#elementor-panel-elements").find(".hm").parents(".elementor-element").addClass("is-ha-widget")},100)),"undefined"!=typeof $e||null!==$e){var n={callback:function(){var e=elementor.settings.page.model.attributes.ha_grid;""===e?elementor.settings.page.model.setExternalChange("ha_grid","yes"):"yes"===e&&elementor.settings.page.model.setExternalChange("ha_grid","")}};$e.shortcuts.register("ctrl+shift+g",n),$e.shortcuts.register("cmd+shift+g",n)}t()}),elementor.hooks.addAction("panel/open_editor/widget",function(e,t){a(t)}),elementor.modules.controls.Icons){var i=elementor.modules.controls.Icons.extend({getControlValue:function(){var e=this.constructor.__super__.getControlValue.call(this),t=this.model,n=this.getValueToMigrate(),o={value:"",library:"happy-icons"},a=this.container&&this.container.settings||this.elementSettingsModel;if(_.isObject(e)&&!_.isEmpty(e)&&"svg"!==e.library&&0===e.value.indexOf("fashm"))return o.value=e.value.substr(e.value.indexOf("hm hm-")),a.set(t.get("name"),o),o;if(!_.isObject(e)&&n&&0===n.indexOf("hm hm-"))return o.value=n,a.set(t.get("name"),o),o;if(!this.isMigrationAllowed())return n;if(!n)return e;var i=a.get(this.dataKeys.migratedKey),r=t.get("name");return this.cache.migratedFlag[r]?this.cache.migratedFlag[r]:i&&i[r]?e:this.migrateFa4toFa5(n)}});elementor.addControlView("icons",i)}elementor.modules.layouts.panel.pages.menu.Menu.addItem({name:"happyaddons-home",icon:"hm hm-happyaddons",title:ha.translate("editorPanelHomeLinkTitle"),type:"link",link:HappyAddonsEditor.editorPanelHomeLinkURL,newTab:!0},"settings"),elementor.modules.layouts.panel.pages.menu.Menu.addItem({name:"happyaddons-widgets",icon:"hm hm-cross-game",title:ha.translate("editorPanelWidgetsLinkTitle"),type:"link",link:HappyAddonsEditor.editorPanelWidgetsLinkURL,newTab:!0},"settings"),elementor.hooks.addFilter("panel/elements/regionViews",function(e){if(HappyAddonsEditor.hasPro||_.isEmpty(HappyAddonsEditor.proWidgets))return e;var t,n,o=e.elements.view,a=e.categories.view,i=e.elements.options.collection,r=e.categories.options.collection,s=[];return _.each(HappyAddonsEditor.proWidgets,function(e,t){i.add({name:"ha-"+t,title:e.title,icon:e.icon,categories:["happy_addons_pro"],editable:!1})}),i.each(function(e){"happy_addons_pro"===e.get("categories")[0]&&s.push(e)}),n=r.findIndex({name:"happy_addons_category"}),n&&r.add({name:"happy_addons_pro_category",title:"Happy Addons Pro",icon:"hm hm-happyaddons",defaultActive:!1,items:s},{at:n+1}),t={className:function(){var e=this.constructor.__super__.className.call(this);return!this.isEditable()&&this.isHappyWidget()&&(e+=" ha-element--promotion"),e},isHappyWidget:function(){return 0===this.model.get("name").indexOf("ha-")},onMouseDown:function(){if(!this.isHappyWidget())return elementor.promotion.dialog.buttons[0].removeClass("ha-btn--promotion"),void this.constructor.__super__.onMouseDown.call(this);elementor.promotion.dialog.buttons[0].addClass("ha-btn--promotion"),elementor.promotion.showDialog({headerMessage:ha.translate("promotionDialogHeader",[this.model.get("title")]),message:ha.translate("promotionDialogMessage",[this.model.get("title")]),top:"-7",element:this.el,actionURL:"https://demo.happyaddons.com/"})}},e.elements.view=o.extend({childView:o.prototype.childView.extend(t)}),e.categories.view=a.extend({childView:a.prototype.childView.extend({childView:a.prototype.childView.prototype.childView.extend(t)})}),e})}(jQuery);
1
+ !function(e){"use strict";function t(){var t=e("#happy-addons-editor-dark-css");t.length||(t=e("<link>",{id:"happy-addons-editor-dark-css",rel:"stylesheet",href:HappyAddonsEditor.darkStylesheetURL})),elementor.settings.editorPreferences.model.on("change:ui_theme",function(e,n){if("light"===n)return void t.remove();t.attr("media","auto"===n?"(prefers-color-scheme: dark)":"").appendTo(elementorCommon.elements.$body)})}function n(){return{translate:["x","y","x_tablet","y_tablet","x_mobile","y_mobile"],skew:["x","y","x_tablet","y_tablet","x_mobile","y_mobile"],scale:["x","y","x_tablet","y_tablet","x_mobile","y_mobile"],rotate:["x","y","z","x_tablet","y_tablet","z_tablet","x_mobile","y_mobile","z_mobile"]}}function o(e,t,n){e="ha_transform_fx_"+e,t="ha_transform_fx_"+t,n.on("change:"+e,function(e,o){if(!o){var a=elementor.getPanelView().getCurrentPageView().children.find(function(e){return e.model.get("name")===t});n.set(t,_.extend({},n.defaults[t])),a&&a.render()}})}function a(e){var t=elementorFrontend.config.elements.data[e.cid];_.each(n(),function(e,n){_.each(e,function(e){o(n+"_toggle",n+"_"+e,t)})}),elementor.getPanelView().getCurrentPageView().model.on("editor:close",function(){_.each(n(),function(e,n){t.off("change:ha_transform_fx_"+n+"_toggle")})})}if(window.ha=window.ha||{},ha.hasIconLibrary=function(){return elementor.helpers&&elementor.helpers.renderIcon},ha.getFeatureLabel=function(e){var t=document.createElement("DIV");return t.innerHTML=e,e=t.textContent||t.innerText||e,e.length>20?e.substring(0,20)+"...":e},ha.translate=function(e,t){return elementorCommon.translate(e,null,t,HappyAddonsEditor.i18n)},window.ha_get_feature_label=ha.getFeatureLabel,window.ha_has_icon_library=ha.hasIconLibrary,window.ha_translate=ha.translate,ha.getButtonWithIcon=function(e,t){var n,o,a,i,r,s=[],l={};if(t=t||{},t=_.defaults(t,{oldIcon:"button_icon",iconPos:"button_icon_position",newIcon:"button_selected_icon",text:"button_text",link:"button_link",class:"ha-btn ha-btn--link",textClass:"ha-btn-text"}),!_.isObject(e)||_.isUndefined(e.getContainer))return"";l=e.getContainer().settings.toJSON();var d=_.isUndefined(l[t.text])?"":l[t.text],c=!(_.isUndefined(l[t.oldIcon])||!l[t.oldIcon]),h=!(_.isUndefined(l[t.newIcon])||!_.isObject(l[t.newIcon])||!l[t.newIcon].value);return d||h||c?(ha.hasIconLibrary()&&(n=elementor.helpers.renderIcon(e,l[t.newIcon],{"aria-hidden":!0,class:"ha-btn-icon"},"i","object"),o=elementor.helpers.isIconMigrated(l,t.newIcon)),e.addInlineEditingAttributes(t.text,"none"),e.addRenderAttribute(t.text,"class",t.textClass),e.addRenderAttribute("button","class",t.class),e.addRenderAttribute("button","href",l[t.link].url),(h||c)&&(ha.hasIconLibrary()&&n&&n.rendered&&(!c||o)?a="svg"===l[t.newIcon].library?'<span class="ha-btn-icon ha-btn-icon--svg">'+n.value+"</span>":n.value:c&&(a='<i class="ha-btn-icon '+t.oldIcon+'" aria-hidden="true"></i>')),!d||h||c?d||!h&&!c?d&&(h||c)&&("before"===l[t.iconPos]?(e.addRenderAttribute("button","class","ha-btn--icon-before"),i=a,r="<span "+e.getRenderAttributeString(t.text)+">"+d+"</span>"):(e.addRenderAttribute("button","class","ha-btn--icon-after"),r=a,i="<span "+e.getRenderAttributeString(t.text)+">"+d+"</span>"),s=["<a "+e.getRenderAttributeString("button")+">",i,r,"</a>"]):s=["<a "+e.getRenderAttributeString("button")+">",a,"</a>"]:s=["<a "+e.getRenderAttributeString("button")+">","<span "+e.getRenderAttributeString(t.text)+">",d,"</span>","</a>"],s.join("")):void 0},elementor.on("panel:init",function(){if(e("#elementor-panel-elements-search-input").on("keyup",_.debounce(function(){e("#elementor-panel-elements").find(".hm").parents(".elementor-element").addClass("is-ha-widget")},100)),"undefined"!=typeof $e||null!==$e){var n={callback:function(){var e=elementor.settings.page.model.attributes.ha_grid;""===e?elementor.settings.page.model.setExternalChange("ha_grid","yes"):"yes"===e&&elementor.settings.page.model.setExternalChange("ha_grid","")}};$e.shortcuts.register("ctrl+shift+g",n),$e.shortcuts.register("cmd+shift+g",n)}t()}),elementor.hooks.addAction("panel/open_editor/widget",function(e,t){a(t)}),elementor.modules.controls.Icons){var i=elementor.modules.controls.Icons.extend({getControlValue:function(){var e=this.constructor.__super__.getControlValue.call(this),t=this.model,n=this.getValueToMigrate(),o={value:"",library:"happy-icons"},a=this.container&&this.container.settings||this.elementSettingsModel;if(_.isObject(e)&&!_.isEmpty(e)&&"svg"!==e.library&&0===e.value.indexOf("fashm"))return o.value=e.value.substr(e.value.indexOf("hm hm-")),a.set(t.get("name"),o),o;if(!_.isObject(e)&&n&&0===n.indexOf("hm hm-"))return o.value=n,a.set(t.get("name"),o),o;if(!this.isMigrationAllowed())return n;if(!n)return e;var i=a.get(this.dataKeys.migratedKey),r=t.get("name");return this.cache.migratedFlag[r]?this.cache.migratedFlag[r]:i&&i[r]?e:this.migrateFa4toFa5(n)}});elementor.addControlView("icons",i)}elementor.modules.layouts.panel.pages.menu.Menu.addItem({name:"happyaddons-home",icon:"hm hm-happyaddons",title:ha.translate("editorPanelHomeLinkTitle"),type:"link",link:HappyAddonsEditor.editorPanelHomeLinkURL,newTab:!0},"settings"),elementor.modules.layouts.panel.pages.menu.Menu.addItem({name:"happyaddons-widgets",icon:"hm hm-cross-game",title:ha.translate("editorPanelWidgetsLinkTitle"),type:"link",link:HappyAddonsEditor.editorPanelWidgetsLinkURL,newTab:!0},"settings"),elementor.hooks.addFilter("panel/elements/regionViews",function(e){if(HappyAddonsEditor.hasPro||_.isEmpty(HappyAddonsEditor.proWidgets))return e;var t,n,o=e.elements.view,a=e.categories.view,i=e.elements.options.collection,r=e.categories.options.collection,s=[];return _.each(HappyAddonsEditor.proWidgets,function(e,t){i.add({name:"ha-"+t,title:e.title,icon:e.icon,categories:["happy_addons_pro"],editable:!1})}),i.each(function(e){"happy_addons_pro"===e.get("categories")[0]&&s.push(e)}),n=r.findIndex({name:"happy_addons_category"}),n&&r.add({name:"happy_addons_pro_category",title:"Happy Addons Pro",icon:"hm hm-happyaddons",defaultActive:!1,items:s},{at:n+1}),t={className:function(){var e=this.constructor.__super__.className.call(this);return!this.isEditable()&&this.isHappyWidget()&&(e+=" ha-element--promotion"),e},isHappyWidget:function(){return 0===this.model.get("name").indexOf("ha-")},onMouseDown:function(){if(!this.isHappyWidget())return elementor.promotion.dialog.buttons[0].removeClass("ha-btn--promotion"),void this.constructor.__super__.onMouseDown.call(this);elementor.promotion.dialog.buttons[0].addClass("ha-btn--promotion"),elementor.promotion.showDialog({headerMessage:ha.translate("promotionDialogHeader",[this.model.get("title")]),message:ha.translate("promotionDialogMessage",[this.model.get("title")]),top:"-7",element:this.el,actionURL:"https://demo.happyaddons.com/"})}},e.elements.view=o.extend({childView:o.prototype.childView.extend(t)}),e.categories.view=a.extend({childView:a.prototype.childView.extend({childView:a.prototype.childView.prototype.childView.extend(t)})}),e})}(jQuery);
assets/imgs/placeholder.jpg ADDED
Binary file
assets/js/happy-addons.js CHANGED
@@ -446,7 +446,7 @@
446
  // fun-factor
447
  var FunFactor = function ($scope) {
448
  EF.waypoint($scope, function () {
449
- var $fun_factor = $scope.find('.ha-fun-factor-content-number');
450
  $fun_factor.numerator($fun_factor.data('animation'));
451
  });
452
  };
446
  // fun-factor
447
  var FunFactor = function ($scope) {
448
  EF.waypoint($scope, function () {
449
+ var $fun_factor = $scope.find('.ha-fun-factor__content-number');
450
  $fun_factor.numerator($fun_factor.data('animation'));
451
  });
452
  };
assets/js/happy-addons.min.js CHANGED
@@ -1 +1 @@
1
- "use strict";!function(t,e){function i(t,e,i){var n;return function(){var a=this,o=arguments,s=function(){n=null,i||t.apply(a,o)},r=i&&!n;clearTimeout(n),n=setTimeout(s,e),r&&t.apply(a,o)}}function n(e,i){var n=e.find(".hajs-gallery-filter");n.length&&n.on("click","button",function(e){e.stopPropagation();var n=t(this);n.parent().addClass("ha-filter-active").siblings().removeClass("ha-filter-active"),i(n.data("filter"))})}function a(e,i,n,a){if(t.fn.magnificPopup){if(!n)return void t.magnificPopup.close();e.on("click",i,function(t){t.stopPropagation()}),e.find(i).magnificPopup({key:a,type:"image",image:{titleSrc:function(t){return t.el.attr("title")?t.el.attr("title"):t.el.find("img").attr("alt")}},gallery:{enabled:!0,preload:[1,2]},zoom:{enabled:!0,duration:300,easing:"ease-in-out",opener:function(t){return t.is("img")?t:t.find("img")}}})}}var o=t(e);t.fn.getHappySettings=function(){return this.data("happy-settings")};var s=function(t){var e=t.find(".hajs-image-comparison"),i=e.getHappySettings();i[{on_hover:"move_slider_on_hover",on_swipe:"move_with_handle_only",on_click:"click_to_move"}[i.move_handle||"on_swipe"]]=!0,delete i.move_handle,e.imagesLoaded().done(function(){e.twentytwenty(i);var t=setTimeout(function(){o.trigger("resize.twentytwenty"),clearTimeout(t)},400)})},r=function(e){var i=e.find(".hajs-justified-gallery"),o=i.getHappySettings(),s=o.enable_popup;i.justifiedGallery(t.extend({},{rowHeight:150,lastRow:"justify",margins:10},o)),a(e,".ha-js-popup",s,"justifiedgallery"),n(e,function(t){i.justifiedGallery({lastRow:"*"===t?o.lastRow:"nojustify",filter:t}),a(e,"*"!==t?t:".ha-js-popup",s,"justifiedgallery")})};o.on("elementor/frontend/init",function(){var e=elementorFrontend,o=elementorModules,l=o.frontend.handlers.Base.extend({onInit:function(){o.frontend.handlers.Base.prototype.onInit.apply(this,arguments),this.widgetContainer=this.$element.find(".elementor-widget-container")[0],this.initFloatingEffects(),this.initBackgroundOverlay()},initBackgroundOverlay:function(){this.isEdit&&this.$element.addClass("ha-has-background-overlay")},getDefaultSettings:function(){return{targets:this.widgetContainer,loop:!0,direction:"alternate",easing:"easeInOutSine"}},onElementChange:function(t){-1!==t.indexOf("ha_floating")&&this.runOnElementChange()},runOnElementChange:i(function(){this.animation&&this.animation.restart(),this.initFloatingEffects()},200),getConfig:function(t){return this.getElementSettings("ha_floating_fx_"+t)},initFloatingEffects:function(){var t=this.getDefaultSettings();this.getConfig("translate_toggle")&&((this.getConfig("translate_x.size")||this.getConfig("translate_x.sizes.to"))&&(t.translateX={value:[this.getConfig("translate_x.sizes.from")||0,this.getConfig("translate_x.size")||this.getConfig("translate_x.sizes.to")],duration:this.getConfig("translate_duration.size"),delay:this.getConfig("translate_delay.size")||0}),(this.getConfig("translate_y.size")||this.getConfig("translate_y.sizes.to"))&&(t.translateY={value:[this.getConfig("translate_y.sizes.from")||0,this.getConfig("translate_y.size")||this.getConfig("translate_y.sizes.to")],duration:this.getConfig("translate_duration.size"),delay:this.getConfig("translate_delay.size")||0})),this.getConfig("rotate_toggle")&&((this.getConfig("rotate_x.size")||this.getConfig("rotate_x.sizes.to"))&&(t.rotateX={value:[this.getConfig("rotate_x.sizes.from")||0,this.getConfig("rotate_x.size")||this.getConfig("rotate_x.sizes.to")],duration:this.getConfig("rotate_duration.size"),delay:this.getConfig("rotate_delay.size")||0}),(this.getConfig("rotate_y.size")||this.getConfig("rotate_y.sizes.to"))&&(t.rotateY={value:[this.getConfig("rotate_y.sizes.from")||0,this.getConfig("rotate_y.size")||this.getConfig("rotate_y.sizes.to")],duration:this.getConfig("rotate_duration.size"),delay:this.getConfig("rotate_delay.size")||0}),(this.getConfig("rotate_z.size")||this.getConfig("rotate_z.sizes.to"))&&(t.rotateZ={value:[this.getConfig("rotate_z.sizes.from")||0,this.getConfig("rotate_z.size")||this.getConfig("rotate_z.sizes.to")],duration:this.getConfig("rotate_duration.size"),delay:this.getConfig("rotate_delay.size")||0})),this.getConfig("scale_toggle")&&((this.getConfig("scale_x.size")||this.getConfig("scale_x.sizes.to"))&&(t.scaleX={value:[this.getConfig("scale_x.sizes.from")||0,this.getConfig("scale_x.size")||this.getConfig("scale_x.sizes.to")],duration:this.getConfig("scale_duration.size"),delay:this.getConfig("scale_delay.size")||0}),(this.getConfig("scale_y.size")||this.getConfig("scale_y.sizes.to"))&&(t.scaleY={value:[this.getConfig("scale_y.sizes.from")||0,this.getConfig("scale_y.size")||this.getConfig("scale_y.sizes.to")],duration:this.getConfig("scale_duration.size"),delay:this.getConfig("scale_delay.size")||0})),(this.getConfig("translate_toggle")||this.getConfig("rotate_toggle")||this.getConfig("scale_toggle"))&&(this.widgetContainer.style.setProperty("will-change","transform"),this.animation=anime(t))}}),h=o.frontend.handlers.Base.extend({onInit:function(){o.frontend.handlers.Base.prototype.onInit.apply(this,arguments),this.$container=this.$element.find(".hajs-slick"),this.run()},isCarousel:function(){return this.$element.hasClass("ha-carousel")},getDefaultSettings:function(){return{arrows:!1,dots:!1,checkVisible:!1,infinite:!0,slidesToShow:this.isCarousel()?3:1,rows:0,prevArrow:'<button type="button" class="slick-prev"><i class="fa fa-chevron-left"></i></button>',nextArrow:'<button type="button" class="slick-next"><i class="fa fa-chevron-right"></i></button>'}},onElementChange:function(){this.$container.slick("unslick"),this.run()},getReadySettings:function(){var i={infinite:!!this.getElementSettings("loop"),autoplay:!!this.getElementSettings("autoplay"),autoplaySpeed:this.getElementSettings("autoplay_speed"),speed:this.getElementSettings("animation_speed"),centerMode:!!this.getElementSettings("center"),vertical:!!this.getElementSettings("vertical"),slidesToScroll:1};switch(this.getElementSettings("navigation")){case"arrow":i.arrows=!0;break;case"dots":i.dots=!0;break;case"both":i.arrows=!0,i.dots=!0}return this.isCarousel()&&(i.slidesToShow=this.getElementSettings("slides_to_show")||3,i.responsive=[{breakpoint:e.config.breakpoints.lg,settings:{slidesToShow:this.getElementSettings("slides_to_show_tablet")||i.slidesToShow}},{breakpoint:e.config.breakpoints.md,settings:{slidesToShow:this.getElementSettings("slides_to_show_mobile")||this.getElementSettings("slides_to_show_tablet")||i.slidesToShow}}]),t.extend({},this.getDefaultSettings(),i)},run:function(){this.$container.slick(this.getReadySettings())}}),f=function(t){e.waypoint(t,function(){var e=t.find(".ha-number-text");e.numerator(e.data("animation"))})},g=function(i){e.waypoint(i,function(){i.find(".ha-skill-level").each(function(){var e=t(this),i=e.find(".ha-skill-level-text"),n=e.data("level");e.animate({width:n+"%"},500),i.numerator({toValue:n+"%",duration:1300,onStep:function(){i.append("%")}})})})},d=o.frontend.handlers.Base.extend({onInit:function(){o.frontend.handlers.Base.prototype.onInit.apply(this,arguments),this.$container=this.$element.find(".hajs-isotope"),this.run(),this.runFilter()},getLayoutMode:function(){var t=this.getElementSettings("layout");return"even"===t?"masonry":t},getDefaultSettings:function(){return{itemSelector:".ha-image-grid-item",percentPosition:!0,layoutMode:this.getLayoutMode()}},runFilter:function(){var t=this;n(this.$element,function(e){t.$container.isotope({filter:e});var i="*"!==e?e:".ha-js-popup";a(t.$element,i,t.getElementSettings("enable_popup"),"imagegrid")})},onElementChange:function(t){-1!==["layout","image_height","columns","image_margin","enable_popup"].indexOf(t)&&this.run()},run:function(){var t=this;this.$container.isotope(t.getDefaultSettings()),this.$container.imagesLoaded().progress(function(){t.$container.isotope("layout")}),a(this.$element,".ha-js-popup",this.getElementSettings("enable_popup"),"imagegrid")}}),u=o.frontend.handlers.Base.extend({onInit:function(){o.frontend.handlers.Base.prototype.onInit.apply(this,arguments),this.wrapper=this.$element.find(".ha-news-ticker-wrapper"),this.run()},onElementChange:function(t){"item_space"!==t&&"title_typography_font_size"!==t||this.run()},run:function(){var e=this.wrapper.innerHeight(),i=this.wrapper.innerWidth(),n=this.wrapper.find(".ha-news-ticker-container"),a=n.find(".ha-news-ticker-item"),o=this.wrapper.data("scroll-direction"),s="scroll"+o+e+i,r=this.wrapper.data("duration"),l="normal",h=10,f={transform:"translateX(0"+i+"px)"},g={transform:"translateX(-101%)"};"right"===o&&(l="reverse"),a.each(function(){h+=t(this).outerWidth(!0)}),n.css({width:h,display:"flex"}),t.keyframe.define([{name:s,"0%":f,"100%":g}]),n.playKeyframe({name:s,duration:r+"ms",timingFunction:"linear",delay:"0s",iterationCount:"infinite",direction:l,fillMode:"none",complete:function(){}})}}),c=function(t){e.waypoint(t,function(){var e=t.find(".ha-fun-factor-content-number");e.numerator(e.data("animation"))})},p=function(i){e.waypoint(i,function(){var e=t(this),i=e.find(".ha-bar-chart-container"),n=e.find("#ha-bar-chart"),a=i.data("settings");i.length&&new Chart(n,a)})},m=function(e){var i=e.find(".ha-twitter-load-more"),n=e.find(".ha-tweet-items");i.on("click",function(i){i.preventDefault();var a=t(this),o=a.data("settings"),s=a.data("total"),r=e.find(".ha-tweet-item").length;t.ajax({url:HappyLocalize.ajax_url,type:"POST",data:{action:"ha_twitter_feed_action",security:HappyLocalize.nonce,query_settings:o,loaded_item:r},success:function(e){s>r?t(e).appendTo(n):(a.text("All Loaded").addClass("loaded"),setTimeout(function(){a.css({display:"none"})},800))},error:function(t){}})})},y=o.frontend.handlers.Base.extend({onInit:function(){o.frontend.handlers.Base.prototype.onInit.apply(this,arguments),this.wrapper=this.$element.find(".ha-post-tab"),this.run()},run:function(){var e=this.wrapper.find(".ha-post-tab-filter"),n=e.find("li"),a=this.wrapper.data("event"),o=this.wrapper.data("query-args");n.on(a,i(function(e){e.preventDefault();var i=t(this),a=i.data("term"),s=i.closest(".ha-post-tab"),r=s.find(".ha-post-tab-content"),l=r.find(".ha-post-tab-loading"),h=r.find(".ha-post-tab-item-wrapper"),f=!1;0===l.length&&(n.removeClass("active"),h.removeClass("active"),i.addClass("active"),h.each(function(){var e=t(this),i=e.data("term");a===i&&(e.addClass("active"),f=!0)}),!1===f&&t.ajax({url:HappyLocalize.ajax_url,type:"POST",data:{action:"ha_post_tab_action",security:HappyLocalize.nonce,post_tab_query:o,term_id:a},beforeSend:function(){r.append('<span class="ha-post-tab-loading"><i class="eicon-spinner eicon-animation-spin"></i></span>')},success:function(t){r.find(".ha-post-tab-loading").remove(),r.append(t)},error:function(t){}}))},200))}}),_=function(e){var i=e.find(".ha-threesixty-rotation-inner"),n=i.data("selector"),a=i.data("autoplay"),o=e.find(".ha-threesixty-rotation-magnify"),s=e.find(".ha-threesixty-rotation-360img"),r=o.data("zoom"),l=e.find(".ha-threesixty-rotation-play"),h=circlr(n,{play:!0});if("on"===a){var f=e.find(".ha-threesixty-rotation-autoplay");f.on("click",function(t){t.preventDefault(),h.play(),s.remove()}),setTimeout(function(){f.trigger("click"),f.remove()},1e3)}else l.on("click",function(e){e.preventDefault();var i=t(this),n=i.find("i");n.hasClass("hm-play-button")?(n.removeClass("hm-play-button"),n.addClass("hm-stop"),h.play()):(n.removeClass("hm-stop"),n.addClass("hm-play-button"),h.stop()),s.remove()});o.on("click",function(i){e.find("img").each(function(){-1!==t(this).attr("style").indexOf("block")&&(HappySimplaMagnify(t(this)[0],r),o.css("display","none"),s.remove())})}),t(document).on("click",function(n){var a=t(n.target),r=e.find(".ha-img-magnifier-glass"),l=o.find("i");r.length&&a[0]!==l[0]&&(r.remove(),o.removeAttr("style")),a[0]===i[0]&&s.remove()}),i.on("mouseup mousedown",function(t){s.remove()})};t("[data-ha-element-link]").each(function(){var e=t(this).data("ha-element-link");t(this).on("click.haElementOnClick",function(){e.is_external?window.open(e.url):location.href=e.url})});var v={"ha-image-compare.default":s,"ha-justified-gallery.default":r,"ha-number.default":f,"ha-skills.default":g,"ha-fun-factor.default":c,"ha-bar-chart.default":p,"ha-twitter-feed.default":m,"ha-threesixty-rotation.default":_};t.each(v,function(t,i){e.hooks.addAction("frontend/element_ready/"+t,i)});var C={"ha-slider.default":h,"ha-carousel.default":h,"ha-image-grid.default":d,"ha-news-ticker.default":u,"ha-post-tab.default":y,widget:l};t.each(C,function(t,i){e.hooks.addAction("frontend/element_ready/"+t,function(t){e.elementsHandler.addHandler(i,{$element:t})})})})}(jQuery,window);
1
+ "use strict";!function(t,e){function i(t,e,i){var n;return function(){var a=this,o=arguments,s=function(){n=null,i||t.apply(a,o)},r=i&&!n;clearTimeout(n),n=setTimeout(s,e),r&&t.apply(a,o)}}function n(e,i){var n=e.find(".hajs-gallery-filter");n.length&&n.on("click","button",function(e){e.stopPropagation();var n=t(this);n.parent().addClass("ha-filter-active").siblings().removeClass("ha-filter-active"),i(n.data("filter"))})}function a(e,i,n,a){if(t.fn.magnificPopup){if(!n)return void t.magnificPopup.close();e.on("click",i,function(t){t.stopPropagation()}),e.find(i).magnificPopup({key:a,type:"image",image:{titleSrc:function(t){return t.el.attr("title")?t.el.attr("title"):t.el.find("img").attr("alt")}},gallery:{enabled:!0,preload:[1,2]},zoom:{enabled:!0,duration:300,easing:"ease-in-out",opener:function(t){return t.is("img")?t:t.find("img")}}})}}var o=t(e);t.fn.getHappySettings=function(){return this.data("happy-settings")};var s=function(t){var e=t.find(".hajs-image-comparison"),i=e.getHappySettings();i[{on_hover:"move_slider_on_hover",on_swipe:"move_with_handle_only",on_click:"click_to_move"}[i.move_handle||"on_swipe"]]=!0,delete i.move_handle,e.imagesLoaded().done(function(){e.twentytwenty(i);var t=setTimeout(function(){o.trigger("resize.twentytwenty"),clearTimeout(t)},400)})},r=function(e){var i=e.find(".hajs-justified-gallery"),o=i.getHappySettings(),s=o.enable_popup;i.justifiedGallery(t.extend({},{rowHeight:150,lastRow:"justify",margins:10},o)),a(e,".ha-js-popup",s,"justifiedgallery"),n(e,function(t){i.justifiedGallery({lastRow:"*"===t?o.lastRow:"nojustify",filter:t}),a(e,"*"!==t?t:".ha-js-popup",s,"justifiedgallery")})};o.on("elementor/frontend/init",function(){var e=elementorFrontend,o=elementorModules,l=o.frontend.handlers.Base.extend({onInit:function(){o.frontend.handlers.Base.prototype.onInit.apply(this,arguments),this.widgetContainer=this.$element.find(".elementor-widget-container")[0],this.initFloatingEffects(),this.initBackgroundOverlay()},initBackgroundOverlay:function(){this.isEdit&&this.$element.addClass("ha-has-background-overlay")},getDefaultSettings:function(){return{targets:this.widgetContainer,loop:!0,direction:"alternate",easing:"easeInOutSine"}},onElementChange:function(t){-1!==t.indexOf("ha_floating")&&this.runOnElementChange()},runOnElementChange:i(function(){this.animation&&this.animation.restart(),this.initFloatingEffects()},200),getConfig:function(t){return this.getElementSettings("ha_floating_fx_"+t)},initFloatingEffects:function(){var t=this.getDefaultSettings();this.getConfig("translate_toggle")&&((this.getConfig("translate_x.size")||this.getConfig("translate_x.sizes.to"))&&(t.translateX={value:[this.getConfig("translate_x.sizes.from")||0,this.getConfig("translate_x.size")||this.getConfig("translate_x.sizes.to")],duration:this.getConfig("translate_duration.size"),delay:this.getConfig("translate_delay.size")||0}),(this.getConfig("translate_y.size")||this.getConfig("translate_y.sizes.to"))&&(t.translateY={value:[this.getConfig("translate_y.sizes.from")||0,this.getConfig("translate_y.size")||this.getConfig("translate_y.sizes.to")],duration:this.getConfig("translate_duration.size"),delay:this.getConfig("translate_delay.size")||0})),this.getConfig("rotate_toggle")&&((this.getConfig("rotate_x.size")||this.getConfig("rotate_x.sizes.to"))&&(t.rotateX={value:[this.getConfig("rotate_x.sizes.from")||0,this.getConfig("rotate_x.size")||this.getConfig("rotate_x.sizes.to")],duration:this.getConfig("rotate_duration.size"),delay:this.getConfig("rotate_delay.size")||0}),(this.getConfig("rotate_y.size")||this.getConfig("rotate_y.sizes.to"))&&(t.rotateY={value:[this.getConfig("rotate_y.sizes.from")||0,this.getConfig("rotate_y.size")||this.getConfig("rotate_y.sizes.to")],duration:this.getConfig("rotate_duration.size"),delay:this.getConfig("rotate_delay.size")||0}),(this.getConfig("rotate_z.size")||this.getConfig("rotate_z.sizes.to"))&&(t.rotateZ={value:[this.getConfig("rotate_z.sizes.from")||0,this.getConfig("rotate_z.size")||this.getConfig("rotate_z.sizes.to")],duration:this.getConfig("rotate_duration.size"),delay:this.getConfig("rotate_delay.size")||0})),this.getConfig("scale_toggle")&&((this.getConfig("scale_x.size")||this.getConfig("scale_x.sizes.to"))&&(t.scaleX={value:[this.getConfig("scale_x.sizes.from")||0,this.getConfig("scale_x.size")||this.getConfig("scale_x.sizes.to")],duration:this.getConfig("scale_duration.size"),delay:this.getConfig("scale_delay.size")||0}),(this.getConfig("scale_y.size")||this.getConfig("scale_y.sizes.to"))&&(t.scaleY={value:[this.getConfig("scale_y.sizes.from")||0,this.getConfig("scale_y.size")||this.getConfig("scale_y.sizes.to")],duration:this.getConfig("scale_duration.size"),delay:this.getConfig("scale_delay.size")||0})),(this.getConfig("translate_toggle")||this.getConfig("rotate_toggle")||this.getConfig("scale_toggle"))&&(this.widgetContainer.style.setProperty("will-change","transform"),this.animation=anime(t))}}),h=o.frontend.handlers.Base.extend({onInit:function(){o.frontend.handlers.Base.prototype.onInit.apply(this,arguments),this.$container=this.$element.find(".hajs-slick"),this.run()},isCarousel:function(){return this.$element.hasClass("ha-carousel")},getDefaultSettings:function(){return{arrows:!1,dots:!1,checkVisible:!1,infinite:!0,slidesToShow:this.isCarousel()?3:1,rows:0,prevArrow:'<button type="button" class="slick-prev"><i class="fa fa-chevron-left"></i></button>',nextArrow:'<button type="button" class="slick-next"><i class="fa fa-chevron-right"></i></button>'}},onElementChange:function(){this.$container.slick("unslick"),this.run()},getReadySettings:function(){var i={infinite:!!this.getElementSettings("loop"),autoplay:!!this.getElementSettings("autoplay"),autoplaySpeed:this.getElementSettings("autoplay_speed"),speed:this.getElementSettings("animation_speed"),centerMode:!!this.getElementSettings("center"),vertical:!!this.getElementSettings("vertical"),slidesToScroll:1};switch(this.getElementSettings("navigation")){case"arrow":i.arrows=!0;break;case"dots":i.dots=!0;break;case"both":i.arrows=!0,i.dots=!0}return this.isCarousel()&&(i.slidesToShow=this.getElementSettings("slides_to_show")||3,i.responsive=[{breakpoint:e.config.breakpoints.lg,settings:{slidesToShow:this.getElementSettings("slides_to_show_tablet")||i.slidesToShow}},{breakpoint:e.config.breakpoints.md,settings:{slidesToShow:this.getElementSettings("slides_to_show_mobile")||this.getElementSettings("slides_to_show_tablet")||i.slidesToShow}}]),t.extend({},this.getDefaultSettings(),i)},run:function(){this.$container.slick(this.getReadySettings())}}),f=function(t){e.waypoint(t,function(){var e=t.find(".ha-number-text");e.numerator(e.data("animation"))})},g=function(i){e.waypoint(i,function(){i.find(".ha-skill-level").each(function(){var e=t(this),i=e.find(".ha-skill-level-text"),n=e.data("level");e.animate({width:n+"%"},500),i.numerator({toValue:n+"%",duration:1300,onStep:function(){i.append("%")}})})})},d=o.frontend.handlers.Base.extend({onInit:function(){o.frontend.handlers.Base.prototype.onInit.apply(this,arguments),this.$container=this.$element.find(".hajs-isotope"),this.run(),this.runFilter()},getLayoutMode:function(){var t=this.getElementSettings("layout");return"even"===t?"masonry":t},getDefaultSettings:function(){return{itemSelector:".ha-image-grid-item",percentPosition:!0,layoutMode:this.getLayoutMode()}},runFilter:function(){var t=this;n(this.$element,function(e){t.$container.isotope({filter:e});var i="*"!==e?e:".ha-js-popup";a(t.$element,i,t.getElementSettings("enable_popup"),"imagegrid")})},onElementChange:function(t){-1!==["layout","image_height","columns","image_margin","enable_popup"].indexOf(t)&&this.run()},run:function(){var t=this;this.$container.isotope(t.getDefaultSettings()),this.$container.imagesLoaded().progress(function(){t.$container.isotope("layout")}),a(this.$element,".ha-js-popup",this.getElementSettings("enable_popup"),"imagegrid")}}),u=o.frontend.handlers.Base.extend({onInit:function(){o.frontend.handlers.Base.prototype.onInit.apply(this,arguments),this.wrapper=this.$element.find(".ha-news-ticker-wrapper"),this.run()},onElementChange:function(t){"item_space"!==t&&"title_typography_font_size"!==t||this.run()},run:function(){var e=this.wrapper.innerHeight(),i=this.wrapper.innerWidth(),n=this.wrapper.find(".ha-news-ticker-container"),a=n.find(".ha-news-ticker-item"),o=this.wrapper.data("scroll-direction"),s="scroll"+o+e+i,r=this.wrapper.data("duration"),l="normal",h=10,f={transform:"translateX(0"+i+"px)"},g={transform:"translateX(-101%)"};"right"===o&&(l="reverse"),a.each(function(){h+=t(this).outerWidth(!0)}),n.css({width:h,display:"flex"}),t.keyframe.define([{name:s,"0%":f,"100%":g}]),n.playKeyframe({name:s,duration:r+"ms",timingFunction:"linear",delay:"0s",iterationCount:"infinite",direction:l,fillMode:"none",complete:function(){}})}}),c=function(t){e.waypoint(t,function(){var e=t.find(".ha-fun-factor__content-number");e.numerator(e.data("animation"))})},p=function(i){e.waypoint(i,function(){var e=t(this),i=e.find(".ha-bar-chart-container"),n=e.find("#ha-bar-chart"),a=i.data("settings");i.length&&new Chart(n,a)})},m=function(e){var i=e.find(".ha-twitter-load-more"),n=e.find(".ha-tweet-items");i.on("click",function(i){i.preventDefault();var a=t(this),o=a.data("settings"),s=a.data("total"),r=e.find(".ha-tweet-item").length;t.ajax({url:HappyLocalize.ajax_url,type:"POST",data:{action:"ha_twitter_feed_action",security:HappyLocalize.nonce,query_settings:o,loaded_item:r},success:function(e){s>r?t(e).appendTo(n):(a.text("All Loaded").addClass("loaded"),setTimeout(function(){a.css({display:"none"})},800))},error:function(t){}})})},y=o.frontend.handlers.Base.extend({onInit:function(){o.frontend.handlers.Base.prototype.onInit.apply(this,arguments),this.wrapper=this.$element.find(".ha-post-tab"),this.run()},run:function(){var e=this.wrapper.find(".ha-post-tab-filter"),n=e.find("li"),a=this.wrapper.data("event"),o=this.wrapper.data("query-args");n.on(a,i(function(e){e.preventDefault();var i=t(this),a=i.data("term"),s=i.closest(".ha-post-tab"),r=s.find(".ha-post-tab-content"),l=r.find(".ha-post-tab-loading"),h=r.find(".ha-post-tab-item-wrapper"),f=!1;0===l.length&&(n.removeClass("active"),h.removeClass("active"),i.addClass("active"),h.each(function(){var e=t(this),i=e.data("term");a===i&&(e.addClass("active"),f=!0)}),!1===f&&t.ajax({url:HappyLocalize.ajax_url,type:"POST",data:{action:"ha_post_tab_action",security:HappyLocalize.nonce,post_tab_query:o,term_id:a},beforeSend:function(){r.append('<span class="ha-post-tab-loading"><i class="eicon-spinner eicon-animation-spin"></i></span>')},success:function(t){r.find(".ha-post-tab-loading").remove(),r.append(t)},error:function(t){}}))},200))}}),_=function(e){var i=e.find(".ha-threesixty-rotation-inner"),n=i.data("selector"),a=i.data("autoplay"),o=e.find(".ha-threesixty-rotation-magnify"),s=e.find(".ha-threesixty-rotation-360img"),r=o.data("zoom"),l=e.find(".ha-threesixty-rotation-play"),h=circlr(n,{play:!0});if("on"===a){var f=e.find(".ha-threesixty-rotation-autoplay");f.on("click",function(t){t.preventDefault(),h.play(),s.remove()}),setTimeout(function(){f.trigger("click"),f.remove()},1e3)}else l.on("click",function(e){e.preventDefault();var i=t(this),n=i.find("i");n.hasClass("hm-play-button")?(n.removeClass("hm-play-button"),n.addClass("hm-stop"),h.play()):(n.removeClass("hm-stop"),n.addClass("hm-play-button"),h.stop()),s.remove()});o.on("click",function(i){e.find("img").each(function(){-1!==t(this).attr("style").indexOf("block")&&(HappySimplaMagnify(t(this)[0],r),o.css("display","none"),s.remove())})}),t(document).on("click",function(n){var a=t(n.target),r=e.find(".ha-img-magnifier-glass"),l=o.find("i");r.length&&a[0]!==l[0]&&(r.remove(),o.removeAttr("style")),a[0]===i[0]&&s.remove()}),i.on("mouseup mousedown",function(t){s.remove()})};t("[data-ha-element-link]").each(function(){var e=t(this).data("ha-element-link");t(this).on("click.haElementOnClick",function(){e.is_external?window.open(e.url):location.href=e.url})});var v={"ha-image-compare.default":s,"ha-justified-gallery.default":r,"ha-number.default":f,"ha-skills.default":g,"ha-fun-factor.default":c,"ha-bar-chart.default":p,"ha-twitter-feed.default":m,"ha-threesixty-rotation.default":_};t.each(v,function(t,i){e.hooks.addAction("frontend/element_ready/"+t,i)});var C={"ha-slider.default":h,"ha-carousel.default":h,"ha-image-grid.default":d,"ha-news-ticker.default":u,"ha-post-tab.default":y,widget:l};t.each(C,function(t,i){e.hooks.addAction("frontend/element_ready/"+t,function(t){e.elementsHandler.addHandler(i,{$element:t})})})})}(jQuery,window);
changelog.txt CHANGED
@@ -1,3 +1,13 @@
 
 
 
 
 
 
 
 
 
 
1
  = 2.12.2 - 10 June 2020 =
2
 
3
  - Fix: Template library dark mode compatibility issue
1
+ = 2.12.3 - 13 July 2020 =
2
+
3
+ - Tweak: Twitter feed widget icon updated
4
+ - Tweak: Twitter feed cache cleaner added
5
+ - Tweak: Twitter feed Error handling updated
6
+ - Tweak: Social link widget default value
7
+ - Fix: Fun factor animation issue
8
+ - Fix: Card widget default text spelling error
9
+ - Fix: Empty button rendering issue
10
+
11
  = 2.12.2 - 10 June 2020 =
12
 
13
  - Fix: Template library dark mode compatibility issue
classes/widgets-manager.php CHANGED
@@ -501,7 +501,7 @@ class Widgets_Manager {
501
  ],
502
  'twitter-feed' => [
503
  'title' => __( 'Twitter Feed', 'happy-elementor-addons' ),
504
- 'icon' => 'hm hm-twitter',
505
  'css' => ['twitter-feed'],
506
  'js' => [],
507
  'vendor' => [
501
  ],
502
  'twitter-feed' => [
503
  'title' => __( 'Twitter Feed', 'happy-elementor-addons' ),
504
+ 'icon' => 'hm hm-twitter-feed',
505
  'css' => ['twitter-feed'],
506
  'js' => [],
507
  'vendor' => [
inc/functions.php CHANGED
@@ -365,18 +365,23 @@ function ha_twitter_feed_ajax() {
365
  ));
366
 
367
  $body = json_decode( wp_remote_retrieve_body( $auth_response ) );
368
- $token = $body->access_token;
369
 
370
- $tweets_response = wp_remote_get('https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=' . $settings['user_name'] . '&count=999&tweet_mode=extended',
371
- array(
372
- 'httpversion' => '1.1',
373
- 'blocking' => true,
374
- 'headers' => ['Authorization' => "Bearer $token",],
375
- ));
376
-
377
- if ( !is_wp_error( $tweets_response ) ) {
378
- $twitter_data = json_decode( wp_remote_retrieve_body( $tweets_response ), true );
379
- set_transient( $transient_key, $twitter_data, 2 * MINUTE_IN_SECONDS );
 
 
 
 
 
 
380
  }
381
 
382
  switch ($settings['sort_by']) {
365
  ));
366
 
367
  $body = json_decode( wp_remote_retrieve_body( $auth_response ) );
 
368
 
369
+ if ( !empty( $body ) ) {
370
+ $token = $body->access_token;
371
+ $tweets_response = wp_remote_get('https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=' . $settings['user_name'] . '&count=999&tweet_mode=extended',
372
+ array(
373
+ 'httpversion' => '1.1',
374
+ 'blocking' => true,
375
+ 'headers' => ['Authorization' => "Bearer $token",],
376
+ ));
377
+
378
+ if ( !is_wp_error( $tweets_response ) ) {
379
+ $twitter_data = json_decode( wp_remote_retrieve_body( $tweets_response ), true );
380
+ set_transient( $transient_key, $twitter_data, 0 );
381
+ }
382
+ }
383
+ if ( $settings['remove_cache'] == 'yes' ) {
384
+ delete_transient( $transient_key );
385
  }
386
 
387
  switch ($settings['sort_by']) {
plugin.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Happy Elementor Addons
4
  * Plugin URI: https://happyaddons.com/
5
  * Description: <a href="https://happyaddons.com/">HappyAddons</a> is a collection of slick, powerful widgets that works seamlessly with Elementor page builder. It’s trendy look with detail customization features allows to create extraordinary designs instantly. <a href="https://happyaddons.com/">HappyAddons</a> is free, rapidly growing and comes with great support.
6
- * Version: 2.12.2
7
  * Author: weDevs
8
  * Author URI: https://happyaddons.com/
9
  * License: GPLv2
@@ -34,7 +34,7 @@ Copyright 2019 HappyMonster <http://happymonster.me>
34
 
35
  defined( 'ABSPATH' ) || die();
36
 
37
- define( 'HAPPY_ADDONS_VERSION', '2.12.2' );
38
  define( 'HAPPY_ADDONS__FILE__', __FILE__ );
39
  define( 'HAPPY_ADDONS_DIR_PATH', plugin_dir_path( HAPPY_ADDONS__FILE__ ) );
40
  define( 'HAPPY_ADDONS_DIR_URL', plugin_dir_url( HAPPY_ADDONS__FILE__ ) );
3
  * Plugin Name: Happy Elementor Addons
4
  * Plugin URI: https://happyaddons.com/
5
  * Description: <a href="https://happyaddons.com/">HappyAddons</a> is a collection of slick, powerful widgets that works seamlessly with Elementor page builder. It’s trendy look with detail customization features allows to create extraordinary designs instantly. <a href="https://happyaddons.com/">HappyAddons</a> is free, rapidly growing and comes with great support.
6
+ * Version: 2.12.3
7
  * Author: weDevs
8
  * Author URI: https://happyaddons.com/
9
  * License: GPLv2
34
 
35
  defined( 'ABSPATH' ) || die();
36
 
37
+ define( 'HAPPY_ADDONS_VERSION', '2.12.3' );
38
  define( 'HAPPY_ADDONS__FILE__', __FILE__ );
39
  define( 'HAPPY_ADDONS_DIR_PATH', plugin_dir_path( HAPPY_ADDONS__FILE__ ) );
40
  define( 'HAPPY_ADDONS_DIR_URL', plugin_dir_url( HAPPY_ADDONS__FILE__ ) );
readme.txt CHANGED
@@ -1,6 +1,6 @@
1
  === Happy Addons for Elementor ===
2
  Plugin Name: Happy Addons for Elementor
3
- Version: 2.12.2
4
  Author: weDevs
5
  Author URI: https://happyaddons.com/
6
  Contributors: thehappymonster, happyaddons, hasinhayder, mosaddek73, tareq1988, sourav926, wedevs, iqbalrony, mrokon, obiplabon
@@ -258,6 +258,16 @@ For a more detailed explanation check out the following documentation
258
 
259
  == Changelog ==
260
 
 
 
 
 
 
 
 
 
 
 
261
  = 2.12.2 - 10 June 2020 =
262
 
263
  - Fix: Template library dark mode compatibility issue
1
  === Happy Addons for Elementor ===
2
  Plugin Name: Happy Addons for Elementor
3
+ Version: 2.12.3
4
  Author: weDevs
5
  Author URI: https://happyaddons.com/
6
  Contributors: thehappymonster, happyaddons, hasinhayder, mosaddek73, tareq1988, sourav926, wedevs, iqbalrony, mrokon, obiplabon
258
 
259
  == Changelog ==
260
 
261
+ = 2.12.3 - 13 July 2020 =
262
+
263
+ - Tweak: Twitter feed widget icon updated
264
+ - Tweak: Twitter feed cache cleaner added
265
+ - Tweak: Twitter feed Error handling updated
266
+ - Tweak: Social link widget default value
267
+ - Fix: Fun factor animation issue
268
+ - Fix: Card widget default text spelling error
269
+ - Fix: Empty button rendering issue
270
+
271
  = 2.12.2 - 10 June 2020 =
272
 
273
  - Fix: Template library dark mode compatibility issue
traits/button-renderer.php CHANGED
@@ -26,29 +26,39 @@ trait Button_Renderer {
26
  ] );
27
 
28
  $settings = $this->get_settings_for_display();
 
 
 
 
 
 
 
 
 
 
29
  $this->add_inline_editing_attributes( $args['text'], 'none' );
30
  $this->add_render_attribute( $args['text'], 'class', $args['text_class'] );
31
 
32
  $this->add_render_attribute( 'button', 'class', $args['class'] );
33
  $this->add_link_attributes( 'button', $settings[ $args['link'] ] );
34
 
35
- if ( $settings[ $args['text'] ] && ( empty( $settings[ $args['new_icon'] ] ) && empty( $settings[ $args['old_icon'] ] ) ) ) :
36
  printf( '<a %1$s>%2$s</a>',
37
  $this->get_render_attribute_string( 'button' ),
38
- sprintf( '<span %1$s>%2$s</span>', $this->get_render_attribute_string( $args['text'] ), esc_html( $settings[ $args['text'] ] ) )
39
  );
40
- elseif ( empty( $settings[ $args['text'] ] ) && ( ! empty( $settings[ $args['old_icon'] ] ) || ! empty( $settings[ $args['new_icon'] ] ) ) ) : ?>
41
  <a <?php $this->print_render_attribute_string( 'button' ); ?>><?php ha_render_button_icon( $settings, $args['old_icon'], $args['new_icon'] ); ?></a>
42
- <?php elseif ( $settings[ $args['text'] ] && ( ! empty( $settings[ $args['old_icon'] ] ) || ! empty( $settings[ $args['new_icon'] ] ) ) ) :
43
  if ( $settings[ $args['icon_pos'] ] === 'before' ) :
44
  $this->add_render_attribute( 'button', 'class', 'ha-btn--icon-before' );
45
- $button_text = sprintf( '<span %1$s>%2$s</span>', $this->get_render_attribute_string( $args['text'] ), esc_html( $settings[ $args['text'] ] ) );
46
  ?>
47
  <a <?php $this->print_render_attribute_string( 'button' ); ?>><?php ha_render_button_icon( $settings, $args['old_icon'], $args['new_icon'], ['class' => 'ha-btn-icon'] ); ?> <?php echo $button_text; ?></a>
48
  <?php
49
  else :
50
  $this->add_render_attribute( 'button', 'class', 'ha-btn--icon-after' );
51
- $button_text = sprintf( '<span %1$s>%2$s</span>', $this->get_render_attribute_string( $args['text'] ), esc_html( $settings[ $args['text'] ] ) );
52
  ?>
53
  <a <?php $this->print_render_attribute_string( 'button' ); ?>><?php echo $button_text; ?> <?php ha_render_button_icon( $settings, $args['old_icon'], $args['new_icon'], ['class' => 'ha-btn-icon'] ); ?></a>
54
  <?php
26
  ] );
27
 
28
  $settings = $this->get_settings_for_display();
29
+ $button_text = isset( $settings[ $args['text'] ] ) ? $settings[ $args['text'] ] : '';
30
+ $has_new_icon = ( ! empty( $settings[ $args['new_icon'] ] ) && ! empty( $settings[ $args['new_icon'] ]['value'] ) ) ? true : false;
31
+ $has_old_icon = ! empty( $settings[ $args['old_icon'] ] ) ? true : false;
32
+
33
+ // Return as early as possible
34
+ // Do not process anything if there is no icon and text
35
+ if ( empty( $button_text ) && ! $has_new_icon && ! $has_old_icon ) {
36
+ return;
37
+ }
38
+
39
  $this->add_inline_editing_attributes( $args['text'], 'none' );
40
  $this->add_render_attribute( $args['text'], 'class', $args['text_class'] );
41
 
42
  $this->add_render_attribute( 'button', 'class', $args['class'] );
43
  $this->add_link_attributes( 'button', $settings[ $args['link'] ] );
44
 
45
+ if ( $button_text && ( empty( $has_new_icon ) && empty( $has_old_icon ) ) ) :
46
  printf( '<a %1$s>%2$s</a>',
47
  $this->get_render_attribute_string( 'button' ),
48
+ sprintf( '<span %1$s>%2$s</span>', $this->get_render_attribute_string( $args['text'] ), esc_html( $button_text ) )
49
  );
50
+ elseif ( empty( $button_text ) && ( ! empty( $has_old_icon ) || ! empty( $has_new_icon ) ) ) : ?>
51
  <a <?php $this->print_render_attribute_string( 'button' ); ?>><?php ha_render_button_icon( $settings, $args['old_icon'], $args['new_icon'] ); ?></a>
52
+ <?php elseif ( $button_text && ( ! empty( $has_old_icon ) || ! empty( $has_new_icon ) ) ) :
53
  if ( $settings[ $args['icon_pos'] ] === 'before' ) :
54
  $this->add_render_attribute( 'button', 'class', 'ha-btn--icon-before' );
55
+ $button_text = sprintf( '<span %1$s>%2$s</span>', $this->get_render_attribute_string( $args['text'] ), esc_html( $button_text ) );
56
  ?>
57
  <a <?php $this->print_render_attribute_string( 'button' ); ?>><?php ha_render_button_icon( $settings, $args['old_icon'], $args['new_icon'], ['class' => 'ha-btn-icon'] ); ?> <?php echo $button_text; ?></a>
58
  <?php
59
  else :
60
  $this->add_render_attribute( 'button', 'class', 'ha-btn--icon-after' );
61
+ $button_text = sprintf( '<span %1$s>%2$s</span>', $this->get_render_attribute_string( $args['text'] ), esc_html( $button_text ) );
62
  ?>
63
  <a <?php $this->print_render_attribute_string( 'button' ); ?>><?php echo $button_text; ?> <?php ha_render_button_icon( $settings, $args['old_icon'], $args['new_icon'], ['class' => 'ha-btn-icon'] ); ?></a>
64
  <?php
widgets/card/widget.php CHANGED
@@ -120,10 +120,10 @@ class Card extends Base {
120
  'label' => __( 'Badge Text', 'happy-elementor-addons' ),
121
  'type' => Controls_Manager::TEXT,
122
  'label_block' => true,
123
- 'default' => __( 'Badget Text', 'happy-elementor-addons' ),
124
  'placeholder' => __( 'Type badge text', 'happy-elementor-addons' ),
125
  'separator' => 'before',
126
- 'description' => __( 'Set badget position and control all the style settings from Style tab', 'happy-elementor-addons' ),
127
  'dynamic' => [
128
  'active' => true,
129
  ]
120
  'label' => __( 'Badge Text', 'happy-elementor-addons' ),
121
  'type' => Controls_Manager::TEXT,
122
  'label_block' => true,
123
+ 'default' => __( 'Badge Text', 'happy-elementor-addons' ),
124
  'placeholder' => __( 'Type badge text', 'happy-elementor-addons' ),
125
  'separator' => 'before',
126
+ 'description' => __( 'Set badge position and control all the style settings from Style tab', 'happy-elementor-addons' ),
127
  'dynamic' => [
128
  'active' => true,
129
  ]
widgets/social-icons/widget.php CHANGED
@@ -140,6 +140,9 @@ class Social_Icons extends Base {
140
  'dynamic' => [
141
  'active' => true,
142
  ],
 
 
 
143
  'placeholder' => __('https://your-social-link.com', 'happy-elementor-addons'),
144
  ]
145
  );
@@ -299,18 +302,27 @@ class Social_Icons extends Base {
299
  'value' => 'fab fa-facebook',
300
  'library' => 'fa-brands',
301
  ],
 
 
 
302
  ],
303
  [
304
  'ha_social_icon' => [
305
  'value' => 'fab fa-twitter',
306
  'library' => 'fa-brands',
307
  ],
 
 
 
308
  ],
309
  [
310
  'ha_social_icon' => [
311
  'value' => 'fab fa-linkedin',
312
  'library' => 'fa-brands',
313
  ],
 
 
 
314
  ],
315
  ],
316
  'title_field' => '<# print(elementor.helpers.getSocialNetworkNameFromIcon( ha_social_icon ) || ha_social_icon_title); #>',
140
  'dynamic' => [
141
  'active' => true,
142
  ],
143
+ 'default' => [
144
+ 'url' => '#'
145
+ ],
146
  'placeholder' => __('https://your-social-link.com', 'happy-elementor-addons'),
147
  ]
148
  );
302
  'value' => 'fab fa-facebook',
303
  'library' => 'fa-brands',
304
  ],
305
+ 'ha_social_link' => [
306
+ 'url' => '#'
307
+ ],
308
  ],
309
  [
310
  'ha_social_icon' => [
311
  'value' => 'fab fa-twitter',
312
  'library' => 'fa-brands',
313
  ],
314
+ 'ha_social_link' => [
315
+ 'url' => '#'
316
+ ],
317
  ],
318
  [
319
  'ha_social_icon' => [
320
  'value' => 'fab fa-linkedin',
321
  'library' => 'fa-brands',
322
  ],
323
+ 'ha_social_link' => [
324
+ 'url' => '#'
325
+ ],
326
  ],
327
  ],
328
  'title_field' => '<# print(elementor.helpers.getSocialNetworkNameFromIcon( ha_social_icon ) || ha_social_icon_title); #>',
widgets/twitter-feed/widget.php CHANGED
@@ -39,7 +39,7 @@ class Twitter_Feed extends Base {
39
  *
40
  */
41
  public function get_icon() {
42
- return 'hm hm-twitter';
43
  }
44
 
45
  public function get_keywords() {
@@ -123,7 +123,6 @@ class Twitter_Feed extends Base {
123
  [
124
  'label' => __( 'Number of tweets to show', 'happy-elementor-addons' ),
125
  'type' => Controls_Manager::NUMBER,
126
- 'separator' => 'after',
127
  'min' => 0,
128
  'max' => 800,
129
  'step' => 1,
@@ -132,6 +131,17 @@ class Twitter_Feed extends Base {
132
  ]
133
  );
134
 
 
 
 
 
 
 
 
 
 
 
 
135
  $this->add_responsive_control(
136
  'columns',
137
  [
@@ -1204,8 +1214,19 @@ class Twitter_Feed extends Base {
1204
  $ha_tweets_token = '_' . $id . '_tweet_token';
1205
  $ha_tweets_cash = '_' . $id . '_tweet_cash';
1206
 
 
1207
  $user_name = trim($settings['user_name']);
1208
- if ( empty( $user_name ) || empty( $settings['consumer_key'] ) || empty( $settings['consumer_secret'] ) ) {
 
 
 
 
 
 
 
 
 
 
1209
  return;
1210
  }
1211
 
@@ -1213,7 +1234,6 @@ class Twitter_Feed extends Base {
1213
  $twitter_data = get_transient($transient_key);
1214
  $credentials = base64_encode($settings['consumer_key'] . ':' . $settings['consumer_secret']);
1215
 
1216
- $messages = [];
1217
  if ( $twitter_data === false ) {
1218
  $auth_url = 'https://api.twitter.com/oauth2/token';
1219
  $auth_response = wp_remote_post( $auth_url,
@@ -1229,35 +1249,42 @@ class Twitter_Feed extends Base {
1229
  ) );
1230
 
1231
  $body = json_decode( wp_remote_retrieve_body( $auth_response ) );
1232
- update_option($user_name . $ha_tweets_token, $body->access_token);
1233
- $token = $body->access_token;
1234
-
1235
- $twitter_url = 'https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=' . $user_name . '&count=999&tweet_mode=extended';
1236
- $tweets_response = wp_remote_get( $twitter_url,
1237
- array(
1238
- 'httpversion' => '1.1',
1239
- 'blocking' => true,
1240
- 'headers' => [ 'Authorization' => "Bearer $token", ],
1241
- ) );
1242
-
1243
- $twitter_data = json_decode( wp_remote_retrieve_body( $tweets_response ), true );
1244
-
1245
- set_transient( $transient_key, $twitter_data, 2 * MINUTE_IN_SECONDS );
1246
-
 
 
 
1247
  }
1248
 
1249
- if ( !empty( $twitter_data ) && array_key_exists( 'errors', $twitter_data ) ) {
1250
- foreach ( $twitter_data['errors'] as $error ) {
1251
- $messages['error'] = $error['message'];
 
 
 
 
 
1252
  }
1253
- } elseif ( count( $twitter_data ) < $settings['tweets_limit'] ) {
1254
- $messages['item_limit'] = __( ' "Number of Tweets to show" is more than your actual total Tweets\'s number. You have only ' . count( $twitter_data ) . ' Tweets', 'happy-elementor-addons' );
 
1255
  }
1256
 
1257
  if ( !empty( $messages ) ) {
1258
- foreach ($messages as $key => $message) {
1259
- printf('<div class="ha-tweet-error-message">%1$s</div>', esc_html( $message ) );
1260
- }
1261
  return;
1262
  }
1263
 
@@ -1265,6 +1292,7 @@ class Twitter_Feed extends Base {
1265
  'credentials' => $credentials,
1266
  'id' => $id,
1267
  'user_name' => $user_name,
 
1268
  'sort_by' => $settings['sort_by'],
1269
  'show_twitter_logo' => $settings['show_twitter_logo'],
1270
  'tweets_limit' => $settings['tweets_limit'],
39
  *
40
  */
41
  public function get_icon() {
42
+ return 'hm hm-twitter-feed';
43
  }
44
 
45
  public function get_keywords() {
123
  [
124
  'label' => __( 'Number of tweets to show', 'happy-elementor-addons' ),
125
  'type' => Controls_Manager::NUMBER,
 
126
  'min' => 0,
127
  'max' => 800,
128
  'step' => 1,
131
  ]
132
  );
133
 
134
+ $this->add_control(
135
+ 'remove_cache',
136
+ [
137
+ 'label' => __('Remove Cache', 'happy-addons-pro'),
138
+ 'type' => Controls_Manager::SWITCHER,
139
+ 'return_value' => 'yes',
140
+ 'default' => 'no',
141
+ 'separator' => 'after',
142
+ ]
143
+ );
144
+
145
  $this->add_responsive_control(
146
  'columns',
147
  [
1214
  $ha_tweets_token = '_' . $id . '_tweet_token';
1215
  $ha_tweets_cash = '_' . $id . '_tweet_cash';
1216
 
1217
+ $messages = [];
1218
  $user_name = trim($settings['user_name']);
1219
+
1220
+ if ( empty( $user_name ) ) {
1221
+ $messages[] = __( 'Add user Name', 'happy-addons-pro' );
1222
+ } elseif ( empty( $settings['consumer_key'] ) ) {
1223
+ $messages[] = __( 'Add Consumer Key', 'happy-addons-pro' );
1224
+ } elseif ( empty( $settings['consumer_secret'] ) ) {
1225
+ $messages[] = __( 'Add Consumer Secret Key', 'happy-addons-pro' );
1226
+ }
1227
+
1228
+ if ( !empty( $messages ) ) {
1229
+ printf('<div class="ha-tweet-error-message">%1$s</div>', esc_html( $messages[0] ) );
1230
  return;
1231
  }
1232
 
1234
  $twitter_data = get_transient($transient_key);
1235
  $credentials = base64_encode($settings['consumer_key'] . ':' . $settings['consumer_secret']);
1236
 
 
1237
  if ( $twitter_data === false ) {
1238
  $auth_url = 'https://api.twitter.com/oauth2/token';
1239
  $auth_response = wp_remote_post( $auth_url,
1249
  ) );
1250
 
1251
  $body = json_decode( wp_remote_retrieve_body( $auth_response ) );
1252
+
1253
+ if ( !empty( $body ) ) {
1254
+ $token = $body->access_token;
1255
+
1256
+ $twitter_url = 'https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=' . $user_name . '&count=999&tweet_mode=extended';
1257
+ $tweets_response = wp_remote_get( $twitter_url,
1258
+ array(
1259
+ 'httpversion' => '1.1',
1260
+ 'blocking' => true,
1261
+ 'headers' => [ 'Authorization' => "Bearer $token", ],
1262
+ ) );
1263
+
1264
+ $twitter_data = json_decode( wp_remote_retrieve_body( $tweets_response ), true );
1265
+ set_transient( $transient_key, $twitter_data, 0 );
1266
+ }
1267
+ }
1268
+ if ( $settings['remove_cache'] == 'yes' ) {
1269
+ delete_transient( $transient_key );
1270
  }
1271
 
1272
+ if ( !empty( $twitter_data ) && !array_key_exists( 'errors', $twitter_data ) && count( $twitter_data ) < $settings['tweets_limit'] ) {
1273
+ $messages[] = __( ' "Number of Tweets to show" is more than your actual total Tweets\'s number. You have only ' . count( $twitter_data ) . ' Tweets', 'happy-elementor-addons' );
1274
+ }
1275
+ if ( !empty( $twitter_data ) ) {
1276
+ if ( array_key_exists( 'errors', $twitter_data ) ) {
1277
+ foreach ( $twitter_data['errors'] as $error ) {
1278
+ $messages[] = $error['message'];
1279
+ }
1280
  }
1281
+ }
1282
+ if ( empty( $twitter_data ) ) {
1283
+ $messages[] = __( 'Nothing Found', 'happy-elementor-addons' );
1284
  }
1285
 
1286
  if ( !empty( $messages ) ) {
1287
+ printf('<div class="ha-tweet-error-message">%1$s</div>', esc_html( $messages[0] ) );
 
 
1288
  return;
1289
  }
1290
 
1292
  'credentials' => $credentials,
1293
  'id' => $id,
1294
  'user_name' => $user_name,
1295
+ 'remove_cache' => $settings['remove_cache'],
1296
  'sort_by' => $settings['sort_by'],
1297
  'show_twitter_logo' => $settings['show_twitter_logo'],
1298
  'tweets_limit' => $settings['tweets_limit'],