WP Logo Showcase Responsive Slider - Version 2.3.2

Version Description

(30, 10 2019) = * [*] Replaced wp_reset_query() with wp_reset_postdata()

Download this release

Release Info

Developer wponlinesupport
Plugin Icon 128x128 WP Logo Showcase Responsive Slider
Version 2.3.2
Comparing to
See all releases

Code changes from version 1.3.3 to 2.3.2

assets/css/ajax-loader.gif DELETED
Binary file
assets/css/arrow-left.png DELETED
Binary file
assets/css/arrow-right.png DELETED
Binary file
assets/css/logo-showcase.css CHANGED
@@ -11,12 +11,13 @@
11
  .wpls-logo-clearfix{clear: both;}
12
 
13
  .wpls-logo-showcase{padding:0 30px 20px 30px !important; margin:0 !important; text-align:center; clear:both;}
14
- .wpls-logo-showcase .slick-arrow { top: 42%;-webkit-transform: translateY(-50%);transform: translateY(-50%);cursor:pointer;}
15
  .wpls-logo-showcase .slick-next{right:0px !important;}
16
  .wpls-logo-showcase .slick-prev{ left:0px !important}
17
- .wpls-logo-showcase .slick-dots{left:15px !important; right:15px !important; text-align:center; bottom:-10px !important;}
18
  .wpls-logo-showcase .wpls-logo-cnt.slick-slide{margin:0 5px;}
19
- .wpls-logo-showcase .wpls-logo-cnt.slick-slide img{display:inline-block !important; padding:10px; border:1px solid #f1f1f1; box-shadow:none !important }
 
20
  .wpls-logo-showcase .slick-slide{ text-align:center !important; display: inline-block !important; float:none !important; vertical-align: middle !important; }
21
  .wpls-logo-showcase .slick-slide .logo-title{color:#444; padding:10px 0; font-size:16px;}
22
  .wpls-logo-showcase .slick-arrow{display: none; }
@@ -37,13 +38,17 @@
37
  /* Slider Common CSS Starts */
38
  .wpls-logo-showcase{visibility: hidden; opacity:0; transition:opacity 0.5s linear; }
39
  .slick-initialized { visibility: visible; opacity:1; }
40
-
 
41
  .wpls-logo-showcase .slick-arrow {text-indent:-99999px; padding:0px !important; margin:0px !important; border-radius:0px !important}
42
- .wpls-logo-showcase button.slick-arrow {width: 30px;height: 30px;position: absolute;z-index:9;border: 0px !important;border-radius: 50% !important;color: #fff; cursor:pointer;}
43
- .wpls-logo-showcase button.slick-next, .wpls-logo-showcase button.slick-next:hover, .wpls-logo-showcase button.slick-next:focus, .wpls-logo-showcase button.slick-next:active{background:rgba(00, 00, 0, 0.0) url('../images/arrow-right.png') center center no-repeat !important;box-shadow:none !important;}
44
- .wpls-logo-showcase button.slick-prev, .wpls-logo-showcase button.slick-prev:hover, .wpls-logo-showcase button.slick-prev:focus, .wpls-logo-showcase button.slick-prev:active{background:rgba(00, 00, 0, 0.0) url('../images/arrow-left.png') center center no-repeat !important;box-shadow:none !important;}
 
 
 
45
  .wpls-logo-showcase .slick-dots {padding:0 !important; margin:0 !important; text-align:center;}
46
- .wpls-logo-showcase .slick-dots li {list-style:none !important; display:inline-block !important; margin:0 3px !important; padding:0px !important; }
47
  .wpls-logo-showcase .slick-dots li button {text-indent:-99999px;margin: 0px !important; padding: 0px !important; border: 2px solid #444 !important; border-radius: 50% !important; width: 12px !important; height: 12px !important; background-color:#fff; cursor:pointer;}
48
  .wpls-logo-showcase .slick-dots li button:focus {outline:none !important}
49
  .wpls-logo-showcase .slick-dots li.slick-active button {background:#8D8C8C !important;}
11
  .wpls-logo-clearfix{clear: both;}
12
 
13
  .wpls-logo-showcase{padding:0 30px 20px 30px !important; margin:0 !important; text-align:center; clear:both;}
14
+ .wpls-logo-showcase .slick-arrow {top: 42%;-webkit-transform: translateY(-50%);transform: translateY(-50%);cursor:pointer;}
15
  .wpls-logo-showcase .slick-next{right:0px !important;}
16
  .wpls-logo-showcase .slick-prev{ left:0px !important}
17
+ .wpls-logo-showcase .slick-dots{left:15px !important; right:15px !important; text-align:center;bottom:-10px !important; position: absolute; }
18
  .wpls-logo-showcase .wpls-logo-cnt.slick-slide{margin:0 5px;}
19
+ .wpls-logo-showcase .wpls-fix-box{max-height: 250px;width: 100%;box-sizing: border-box; line-height:0px;}
20
+ .wpls-logo-showcase .wpls-logo-cnt.slick-slide img{display:inline-block !important; max-height:250px; max-width:100%; box-sizing: border-box; padding:10px; border:1px solid #f1f1f1; box-shadow:none !important }
21
  .wpls-logo-showcase .slick-slide{ text-align:center !important; display: inline-block !important; float:none !important; vertical-align: middle !important; }
22
  .wpls-logo-showcase .slick-slide .logo-title{color:#444; padding:10px 0; font-size:16px;}
23
  .wpls-logo-showcase .slick-arrow{display: none; }
38
  /* Slider Common CSS Starts */
39
  .wpls-logo-showcase{visibility: hidden; opacity:0; transition:opacity 0.5s linear; }
40
  .slick-initialized { visibility: visible; opacity:1; }
41
+ .wpls-logo-showcase button:hover,
42
+ .wpls-logo-showcase button:focus {outline:none !important;}
43
  .wpls-logo-showcase .slick-arrow {text-indent:-99999px; padding:0px !important; margin:0px !important; border-radius:0px !important}
44
+ .wpls-logo-showcase button.slick-arrow {width: 25px;height: 25px;position: absolute;z-index:9;border: 0px !important;border-radius: 50% !important;color: #fff; cursor:pointer !important; -webkit-transition-duration: 0.4s; /* Safari */
45
+ transition-duration: 0.4s;}
46
+ .wpls-logo-showcase button.slick-next, .wpls-logo-showcase button.slick-next:active {background:rgba(0, 0, 0, 0.5) url('../images/arrow-right.png') center center no-repeat !important;background-size: 15px 15px !important; box-shadow:none !important;}
47
+ .wpls-logo-showcase button.slick-prev, .wpls-logo-showcase button.slick-prev:active{background:rgba(0, 0, 0, 0.5) url('../images/arrow-left.png') center center no-repeat !important;background-size: 15px 15px !important;box-shadow:none !important;}
48
+ .wpls-logo-showcase button.slick-next:hover, .wpls-logo-showcase button.slick-next:focus{background:rgba(0, 0, 0, 0.7) url('../images/arrow-right.png') center center no-repeat !important; background-size: 15px 15px !important;}
49
+ .wpls-logo-showcase button.slick-prev:hover, .wpls-logo-showcase button.slick-prev:focus{background:rgba(0, 0, 0, 0.7) url('../images/arrow-left.png') center center no-repeat !important; background-size: 15px 15px !important;}
50
  .wpls-logo-showcase .slick-dots {padding:0 !important; margin:0 !important; text-align:center;}
51
+ .wpls-logo-showcase .slick-dots li {list-style:none !important; display:inline-block !important; line-height:0px !important; margin:0 3px !important; padding:0px !important; }
52
  .wpls-logo-showcase .slick-dots li button {text-indent:-99999px;margin: 0px !important; padding: 0px !important; border: 2px solid #444 !important; border-radius: 50% !important; width: 12px !important; height: 12px !important; background-color:#fff; cursor:pointer;}
53
  .wpls-logo-showcase .slick-dots li button:focus {outline:none !important}
54
  .wpls-logo-showcase .slick-dots li.slick-active button {background:#8D8C8C !important;}
assets/css/slick.css CHANGED
@@ -1,5 +1,5 @@
1
  /* Slider */
2
- .slick-loading .slick-list{ background: #fff url('ajax-loader.gif') center center no-repeat;}
3
  .slick-slider{ position: relative;display: block; -moz-box-sizing: border-box;box-sizing: border-box; -webkit-user-select: none; -moz-user-select: none;
4
  -ms-user-select: none; user-select: none; -webkit-touch-callout: none;-khtml-user-select: none; -ms-touch-action: pan-y;
5
  touch-action: pan-y; -webkit-tap-highlight-color: transparent;
1
  /* Slider */
2
+ .slick-loading .slick-list{ background: #fff url('../images/ajax-loader.gif') center center no-repeat;}
3
  .slick-slider{ position: relative;display: block; -moz-box-sizing: border-box;box-sizing: border-box; -webkit-user-select: none; -moz-user-select: none;
4
  -ms-user-select: none; user-select: none; -webkit-touch-callout: none;-khtml-user-select: none; -ms-touch-action: pan-y;
5
  touch-action: pan-y; -webkit-tap-highlight-color: transparent;
assets/images/arrow-left.png CHANGED
Binary file
assets/images/arrow-right.png CHANGED
Binary file
assets/js/slick.min.js CHANGED
@@ -1 +1 @@
1
- !function(i){"use strict";"function"==typeof define&&define.amd?define(["jquery"],i):"undefined"!=typeof exports?module.exports=i(require("jquery")):i(jQuery)}(function(i){"use strict";var e=window.Slick||{};(e=function(){var e=0;return function(t,o){var s,n=this;n.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:i(t),appendDots:i(t),arrows:!0,asNavFor:null,prevArrow:'<button class="slick-prev" aria-label="Previous" type="button">Previous</button>',nextArrow:'<button class="slick-next" aria-label="Next" type="button">Next</button>',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(e,t){return i('<button type="button" />').text(t+1)},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,focusOnChange:!1,infinite:!0,initialSlide:0,lazyLoad:"ondemand",mobileFirst:!1,pauseOnHover:!0,pauseOnFocus:!0,pauseOnDotsHover:!1,respondTo:"window",responsive:null,rows:1,rtl:!1,slide:"",slidesPerRow:1,slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!0,variableWidth:!1,vertical:!1,verticalSwiping:!1,waitForAnimate:!0,zIndex:1e3},n.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,scrolling:!1,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,sliding:!1,slideOffset:0,swipeLeft:null,swiping:!1,$list:null,touchObject:{},transformsEnabled:!1,unslicked:!1},i.extend(n,n.initials),n.activeBreakpoint=null,n.animType=null,n.animProp=null,n.breakpoints=[],n.breakpointSettings=[],n.cssTransitions=!1,n.focussed=!1,n.interrupted=!1,n.hidden="hidden",n.paused=!0,n.positionProp=null,n.respondTo=null,n.rowCount=1,n.shouldClick=!0,n.$slider=i(t),n.$slidesCache=null,n.transformType=null,n.transitionType=null,n.visibilityChange="visibilitychange",n.windowWidth=0,n.windowTimer=null,s=i(t).data("slick")||{},n.options=i.extend({},n.defaults,o,s),n.currentSlide=n.options.initialSlide,n.originalSettings=n.options,void 0!==document.mozHidden?(n.hidden="mozHidden",n.visibilityChange="mozvisibilitychange"):void 0!==document.webkitHidden&&(n.hidden="webkitHidden",n.visibilityChange="webkitvisibilitychange"),n.autoPlay=i.proxy(n.autoPlay,n),n.autoPlayClear=i.proxy(n.autoPlayClear,n),n.autoPlayIterator=i.proxy(n.autoPlayIterator,n),n.changeSlide=i.proxy(n.changeSlide,n),n.clickHandler=i.proxy(n.clickHandler,n),n.selectHandler=i.proxy(n.selectHandler,n),n.setPosition=i.proxy(n.setPosition,n),n.swipeHandler=i.proxy(n.swipeHandler,n),n.dragHandler=i.proxy(n.dragHandler,n),n.keyHandler=i.proxy(n.keyHandler,n),n.instanceUid=e++,n.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/,n.registerBreakpoints(),n.init(!0)}}()).prototype.activateADA=function(){this.$slideTrack.find(".slick-active").attr({"aria-hidden":"false"}).find("a, input, button, select").attr({tabindex:"0"})},e.prototype.addSlide=e.prototype.slickAdd=function(e,t,o){var s=this;if("boolean"==typeof t)o=t,t=null;else if(t<0||t>=s.slideCount)return!1;s.unload(),"number"==typeof t?0===t&&0===s.$slides.length?i(e).appendTo(s.$slideTrack):o?i(e).insertBefore(s.$slides.eq(t)):i(e).insertAfter(s.$slides.eq(t)):!0===o?i(e).prependTo(s.$slideTrack):i(e).appendTo(s.$slideTrack),s.$slides=s.$slideTrack.children(this.options.slide),s.$slideTrack.children(this.options.slide).detach(),s.$slideTrack.append(s.$slides),s.$slides.each(function(e,t){i(t).attr("data-slick-index",e)}),s.$slidesCache=s.$slides,s.reinit()},e.prototype.animateHeight=function(){var i=this;if(1===i.options.slidesToShow&&!0===i.options.adaptiveHeight&&!1===i.options.vertical){var e=i.$slides.eq(i.currentSlide).outerHeight(!0);i.$list.animate({height:e},i.options.speed)}},e.prototype.animateSlide=function(e,t){var o={},s=this;s.animateHeight(),!0===s.options.rtl&&!1===s.options.vertical&&(e=-e),!1===s.transformsEnabled?!1===s.options.vertical?s.$slideTrack.animate({left:e},s.options.speed,s.options.easing,t):s.$slideTrack.animate({top:e},s.options.speed,s.options.easing,t):!1===s.cssTransitions?(!0===s.options.rtl&&(s.currentLeft=-s.currentLeft),i({animStart:s.currentLeft}).animate({animStart:e},{duration:s.options.speed,easing:s.options.easing,step:function(i){i=Math.ceil(i),!1===s.options.vertical?(o[s.animType]="translate("+i+"px, 0px)",s.$slideTrack.css(o)):(o[s.animType]="translate(0px,"+i+"px)",s.$slideTrack.css(o))},complete:function(){t&&t.call()}})):(s.applyTransition(),e=Math.ceil(e),!1===s.options.vertical?o[s.animType]="translate3d("+e+"px, 0px, 0px)":o[s.animType]="translate3d(0px,"+e+"px, 0px)",s.$slideTrack.css(o),t&&setTimeout(function(){s.disableTransition(),t.call()},s.options.speed))},e.prototype.getNavTarget=function(){var e=this,t=e.options.asNavFor;return t&&null!==t&&(t=i(t).not(e.$slider)),t},e.prototype.asNavFor=function(e){var t=this.getNavTarget();null!==t&&"object"==typeof t&&t.each(function(){var t=i(this).slick("getSlick");t.unslicked||t.slideHandler(e,!0)})},e.prototype.applyTransition=function(i){var e=this,t={};!1===e.options.fade?t[e.transitionType]=e.transformType+" "+e.options.speed+"ms "+e.options.cssEase:t[e.transitionType]="opacity "+e.options.speed+"ms "+e.options.cssEase,!1===e.options.fade?e.$slideTrack.css(t):e.$slides.eq(i).css(t)},e.prototype.autoPlay=function(){var i=this;i.autoPlayClear(),i.slideCount>i.options.slidesToShow&&(i.autoPlayTimer=setInterval(i.autoPlayIterator,i.options.autoplaySpeed))},e.prototype.autoPlayClear=function(){var i=this;i.autoPlayTimer&&clearInterval(i.autoPlayTimer)},e.prototype.autoPlayIterator=function(){var i=this,e=i.currentSlide+i.options.slidesToScroll;i.paused||i.interrupted||i.focussed||(!1===i.options.infinite&&(1===i.direction&&i.currentSlide+1===i.slideCount-1?i.direction=0:0===i.direction&&(e=i.currentSlide-i.options.slidesToScroll,i.currentSlide-1==0&&(i.direction=1))),i.slideHandler(e))},e.prototype.buildArrows=function(){var e=this;!0===e.options.arrows&&(e.$prevArrow=i(e.options.prevArrow).addClass("slick-arrow"),e.$nextArrow=i(e.options.nextArrow).addClass("slick-arrow"),e.slideCount>e.options.slidesToShow?(e.$prevArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),e.$nextArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),e.htmlExpr.test(e.options.prevArrow)&&e.$prevArrow.prependTo(e.options.appendArrows),e.htmlExpr.test(e.options.nextArrow)&&e.$nextArrow.appendTo(e.options.appendArrows),!0!==e.options.infinite&&e.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true")):e.$prevArrow.add(e.$nextArrow).addClass("slick-hidden").attr({"aria-disabled":"true",tabindex:"-1"}))},e.prototype.buildDots=function(){var e,t,o=this;if(!0===o.options.dots){for(o.$slider.addClass("slick-dotted"),t=i("<ul />").addClass(o.options.dotsClass),e=0;e<=o.getDotCount();e+=1)t.append(i("<li />").append(o.options.customPaging.call(this,o,e)));o.$dots=t.appendTo(o.options.appendDots),o.$dots.find("li").first().addClass("slick-active")}},e.prototype.buildOut=function(){var e=this;e.$slides=e.$slider.children(e.options.slide+":not(.slick-cloned)").addClass("slick-slide"),e.slideCount=e.$slides.length,e.$slides.each(function(e,t){i(t).attr("data-slick-index",e).data("originalStyling",i(t).attr("style")||"")}),e.$slider.addClass("slick-slider"),e.$slideTrack=0===e.slideCount?i('<div class="slick-track"/>').appendTo(e.$slider):e.$slides.wrapAll('<div class="slick-track"/>').parent(),e.$list=e.$slideTrack.wrap('<div class="slick-list"/>').parent(),e.$slideTrack.css("opacity",0),!0!==e.options.centerMode&&!0!==e.options.swipeToSlide||(e.options.slidesToScroll=1),i("img[data-lazy]",e.$slider).not("[src]").addClass("slick-loading"),e.setupInfinite(),e.buildArrows(),e.buildDots(),e.updateDots(),e.setSlideClasses("number"==typeof e.currentSlide?e.currentSlide:0),!0===e.options.draggable&&e.$list.addClass("draggable")},e.prototype.buildRows=function(){var i,e,t,o,s,n,r,l=this;if(o=document.createDocumentFragment(),n=l.$slider.children(),l.options.rows>1){for(r=l.options.slidesPerRow*l.options.rows,s=Math.ceil(n.length/r),i=0;i<s;i++){var d=document.createElement("div");for(e=0;e<l.options.rows;e++){var a=document.createElement("div");for(t=0;t<l.options.slidesPerRow;t++){var c=i*r+(e*l.options.slidesPerRow+t);n.get(c)&&a.appendChild(n.get(c))}d.appendChild(a)}o.appendChild(d)}l.$slider.empty().append(o),l.$slider.children().children().children().css({width:100/l.options.slidesPerRow+"%",display:"inline-block"})}},e.prototype.checkResponsive=function(e,t){var o,s,n,r=this,l=!1,d=r.$slider.width(),a=window.innerWidth||i(window).width();if("window"===r.respondTo?n=a:"slider"===r.respondTo?n=d:"min"===r.respondTo&&(n=Math.min(a,d)),r.options.responsive&&r.options.responsive.length&&null!==r.options.responsive){s=null;for(o in r.breakpoints)r.breakpoints.hasOwnProperty(o)&&(!1===r.originalSettings.mobileFirst?n<r.breakpoints[o]&&(s=r.breakpoints[o]):n>r.breakpoints[o]&&(s=r.breakpoints[o]));null!==s?null!==r.activeBreakpoint?(s!==r.activeBreakpoint||t)&&(r.activeBreakpoint=s,"unslick"===r.breakpointSettings[s]?r.unslick(s):(r.options=i.extend({},r.originalSettings,r.breakpointSettings[s]),!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e)),l=s):(r.activeBreakpoint=s,"unslick"===r.breakpointSettings[s]?r.unslick(s):(r.options=i.extend({},r.originalSettings,r.breakpointSettings[s]),!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e)),l=s):null!==r.activeBreakpoint&&(r.activeBreakpoint=null,r.options=r.originalSettings,!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e),l=s),e||!1===l||r.$slider.trigger("breakpoint",[r,l])}},e.prototype.changeSlide=function(e,t){var o,s,n,r=this,l=i(e.currentTarget);switch(l.is("a")&&e.preventDefault(),l.is("li")||(l=l.closest("li")),n=r.slideCount%r.options.slidesToScroll!=0,o=n?0:(r.slideCount-r.currentSlide)%r.options.slidesToScroll,e.data.message){case"previous":s=0===o?r.options.slidesToScroll:r.options.slidesToShow-o,r.slideCount>r.options.slidesToShow&&r.slideHandler(r.currentSlide-s,!1,t);break;case"next":s=0===o?r.options.slidesToScroll:o,r.slideCount>r.options.slidesToShow&&r.slideHandler(r.currentSlide+s,!1,t);break;case"index":var d=0===e.data.index?0:e.data.index||l.index()*r.options.slidesToScroll;r.slideHandler(r.checkNavigable(d),!1,t),l.children().trigger("focus");break;default:return}},e.prototype.checkNavigable=function(i){var e,t;if(e=this.getNavigableIndexes(),t=0,i>e[e.length-1])i=e[e.length-1];else for(var o in e){if(i<e[o]){i=t;break}t=e[o]}return i},e.prototype.cleanUpEvents=function(){var e=this;e.options.dots&&null!==e.$dots&&(i("li",e.$dots).off("click.slick",e.changeSlide).off("mouseenter.slick",i.proxy(e.interrupt,e,!0)).off("mouseleave.slick",i.proxy(e.interrupt,e,!1)),!0===e.options.accessibility&&e.$dots.off("keydown.slick",e.keyHandler)),e.$slider.off("focus.slick blur.slick"),!0===e.options.arrows&&e.slideCount>e.options.slidesToShow&&(e.$prevArrow&&e.$prevArrow.off("click.slick",e.changeSlide),e.$nextArrow&&e.$nextArrow.off("click.slick",e.changeSlide),!0===e.options.accessibility&&(e.$prevArrow&&e.$prevArrow.off("keydown.slick",e.keyHandler),e.$nextArrow&&e.$nextArrow.off("keydown.slick",e.keyHandler))),e.$list.off("touchstart.slick mousedown.slick",e.swipeHandler),e.$list.off("touchmove.slick mousemove.slick",e.swipeHandler),e.$list.off("touchend.slick mouseup.slick",e.swipeHandler),e.$list.off("touchcancel.slick mouseleave.slick",e.swipeHandler),e.$list.off("click.slick",e.clickHandler),i(document).off(e.visibilityChange,e.visibility),e.cleanUpSlideEvents(),!0===e.options.accessibility&&e.$list.off("keydown.slick",e.keyHandler),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().off("click.slick",e.selectHandler),i(window).off("orientationchange.slick.slick-"+e.instanceUid,e.orientationChange),i(window).off("resize.slick.slick-"+e.instanceUid,e.resize),i("[draggable!=true]",e.$slideTrack).off("dragstart",e.preventDefault),i(window).off("load.slick.slick-"+e.instanceUid,e.setPosition)},e.prototype.cleanUpSlideEvents=function(){var e=this;e.$list.off("mouseenter.slick",i.proxy(e.interrupt,e,!0)),e.$list.off("mouseleave.slick",i.proxy(e.interrupt,e,!1))},e.prototype.cleanUpRows=function(){var i,e=this;e.options.rows>1&&((i=e.$slides.children().children()).removeAttr("style"),e.$slider.empty().append(i))},e.prototype.clickHandler=function(i){!1===this.shouldClick&&(i.stopImmediatePropagation(),i.stopPropagation(),i.preventDefault())},e.prototype.destroy=function(e){var t=this;t.autoPlayClear(),t.touchObject={},t.cleanUpEvents(),i(".slick-cloned",t.$slider).detach(),t.$dots&&t.$dots.remove(),t.$prevArrow&&t.$prevArrow.length&&(t.$prevArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),t.htmlExpr.test(t.options.prevArrow)&&t.$prevArrow.remove()),t.$nextArrow&&t.$nextArrow.length&&(t.$nextArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),t.htmlExpr.test(t.options.nextArrow)&&t.$nextArrow.remove()),t.$slides&&(t.$slides.removeClass("slick-slide slick-active slick-center slick-visible slick-current").removeAttr("aria-hidden").removeAttr("data-slick-index").each(function(){i(this).attr("style",i(this).data("originalStyling"))}),t.$slideTrack.children(this.options.slide).detach(),t.$slideTrack.detach(),t.$list.detach(),t.$slider.append(t.$slides)),t.cleanUpRows(),t.$slider.removeClass("slick-slider"),t.$slider.removeClass("slick-initialized"),t.$slider.removeClass("slick-dotted"),t.unslicked=!0,e||t.$slider.trigger("destroy",[t])},e.prototype.disableTransition=function(i){var e=this,t={};t[e.transitionType]="",!1===e.options.fade?e.$slideTrack.css(t):e.$slides.eq(i).css(t)},e.prototype.fadeSlide=function(i,e){var t=this;!1===t.cssTransitions?(t.$slides.eq(i).css({zIndex:t.options.zIndex}),t.$slides.eq(i).animate({opacity:1},t.options.speed,t.options.easing,e)):(t.applyTransition(i),t.$slides.eq(i).css({opacity:1,zIndex:t.options.zIndex}),e&&setTimeout(function(){t.disableTransition(i),e.call()},t.options.speed))},e.prototype.fadeSlideOut=function(i){var e=this;!1===e.cssTransitions?e.$slides.eq(i).animate({opacity:0,zIndex:e.options.zIndex-2},e.options.speed,e.options.easing):(e.applyTransition(i),e.$slides.eq(i).css({opacity:0,zIndex:e.options.zIndex-2}))},e.prototype.filterSlides=e.prototype.slickFilter=function(i){var e=this;null!==i&&(e.$slidesCache=e.$slides,e.unload(),e.$slideTrack.children(this.options.slide).detach(),e.$slidesCache.filter(i).appendTo(e.$slideTrack),e.reinit())},e.prototype.focusHandler=function(){var e=this;e.$slider.off("focus.slick blur.slick").on("focus.slick blur.slick","*",function(t){t.stopImmediatePropagation();var o=i(this);setTimeout(function(){e.options.pauseOnFocus&&(e.focussed=o.is(":focus"),e.autoPlay())},0)})},e.prototype.getCurrent=e.prototype.slickCurrentSlide=function(){return this.currentSlide},e.prototype.getDotCount=function(){var i=this,e=0,t=0,o=0;if(!0===i.options.infinite)if(i.slideCount<=i.options.slidesToShow)++o;else for(;e<i.slideCount;)++o,e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;else if(!0===i.options.centerMode)o=i.slideCount;else if(i.options.asNavFor)for(;e<i.slideCount;)++o,e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;else o=1+Math.ceil((i.slideCount-i.options.slidesToShow)/i.options.slidesToScroll);return o-1},e.prototype.getLeft=function(i){var e,t,o,s,n=this,r=0;return n.slideOffset=0,t=n.$slides.first().outerHeight(!0),!0===n.options.infinite?(n.slideCount>n.options.slidesToShow&&(n.slideOffset=n.slideWidth*n.options.slidesToShow*-1,s=-1,!0===n.options.vertical&&!0===n.options.centerMode&&(2===n.options.slidesToShow?s=-1.5:1===n.options.slidesToShow&&(s=-2)),r=t*n.options.slidesToShow*s),n.slideCount%n.options.slidesToScroll!=0&&i+n.options.slidesToScroll>n.slideCount&&n.slideCount>n.options.slidesToShow&&(i>n.slideCount?(n.slideOffset=(n.options.slidesToShow-(i-n.slideCount))*n.slideWidth*-1,r=(n.options.slidesToShow-(i-n.slideCount))*t*-1):(n.slideOffset=n.slideCount%n.options.slidesToScroll*n.slideWidth*-1,r=n.slideCount%n.options.slidesToScroll*t*-1))):i+n.options.slidesToShow>n.slideCount&&(n.slideOffset=(i+n.options.slidesToShow-n.slideCount)*n.slideWidth,r=(i+n.options.slidesToShow-n.slideCount)*t),n.slideCount<=n.options.slidesToShow&&(n.slideOffset=0,r=0),!0===n.options.centerMode&&n.slideCount<=n.options.slidesToShow?n.slideOffset=n.slideWidth*Math.floor(n.options.slidesToShow)/2-n.slideWidth*n.slideCount/2:!0===n.options.centerMode&&!0===n.options.infinite?n.slideOffset+=n.slideWidth*Math.floor(n.options.slidesToShow/2)-n.slideWidth:!0===n.options.centerMode&&(n.slideOffset=0,n.slideOffset+=n.slideWidth*Math.floor(n.options.slidesToShow/2)),e=!1===n.options.vertical?i*n.slideWidth*-1+n.slideOffset:i*t*-1+r,!0===n.options.variableWidth&&(o=n.slideCount<=n.options.slidesToShow||!1===n.options.infinite?n.$slideTrack.children(".slick-slide").eq(i):n.$slideTrack.children(".slick-slide").eq(i+n.options.slidesToShow),e=!0===n.options.rtl?o[0]?-1*(n.$slideTrack.width()-o[0].offsetLeft-o.width()):0:o[0]?-1*o[0].offsetLeft:0,!0===n.options.centerMode&&(o=n.slideCount<=n.options.slidesToShow||!1===n.options.infinite?n.$slideTrack.children(".slick-slide").eq(i):n.$slideTrack.children(".slick-slide").eq(i+n.options.slidesToShow+1),e=!0===n.options.rtl?o[0]?-1*(n.$slideTrack.width()-o[0].offsetLeft-o.width()):0:o[0]?-1*o[0].offsetLeft:0,e+=(n.$list.width()-o.outerWidth())/2)),e},e.prototype.getOption=e.prototype.slickGetOption=function(i){return this.options[i]},e.prototype.getNavigableIndexes=function(){var i,e=this,t=0,o=0,s=[];for(!1===e.options.infinite?i=e.slideCount:(t=-1*e.options.slidesToScroll,o=-1*e.options.slidesToScroll,i=2*e.slideCount);t<i;)s.push(t),t=o+e.options.slidesToScroll,o+=e.options.slidesToScroll<=e.options.slidesToShow?e.options.slidesToScroll:e.options.slidesToShow;return s},e.prototype.getSlick=function(){return this},e.prototype.getSlideCount=function(){var e,t,o=this;return t=!0===o.options.centerMode?o.slideWidth*Math.floor(o.options.slidesToShow/2):0,!0===o.options.swipeToSlide?(o.$slideTrack.find(".slick-slide").each(function(s,n){if(n.offsetLeft-t+i(n).outerWidth()/2>-1*o.swipeLeft)return e=n,!1}),Math.abs(i(e).attr("data-slick-index")-o.currentSlide)||1):o.options.slidesToScroll},e.prototype.goTo=e.prototype.slickGoTo=function(i,e){this.changeSlide({data:{message:"index",index:parseInt(i)}},e)},e.prototype.init=function(e){var t=this;i(t.$slider).hasClass("slick-initialized")||(i(t.$slider).addClass("slick-initialized"),t.buildRows(),t.buildOut(),t.setProps(),t.startLoad(),t.loadSlider(),t.initializeEvents(),t.updateArrows(),t.updateDots(),t.checkResponsive(!0),t.focusHandler()),e&&t.$slider.trigger("init",[t]),!0===t.options.accessibility&&t.initADA(),t.options.autoplay&&(t.paused=!1,t.autoPlay())},e.prototype.initADA=function(){var e=this,t=Math.ceil(e.slideCount/e.options.slidesToShow),o=e.getNavigableIndexes().filter(function(i){return i>=0&&i<e.slideCount});e.$slides.add(e.$slideTrack.find(".slick-cloned")).attr({"aria-hidden":"true",tabindex:"-1"}).find("a, input, button, select").attr({tabindex:"-1"}),null!==e.$dots&&(e.$slides.not(e.$slideTrack.find(".slick-cloned")).each(function(t){var s=o.indexOf(t);i(this).attr({role:"tabpanel",id:"slick-slide"+e.instanceUid+t,tabindex:-1}),-1!==s&&i(this).attr({"aria-describedby":"slick-slide-control"+e.instanceUid+s})}),e.$dots.attr("role","tablist").find("li").each(function(s){var n=o[s];i(this).attr({role:"presentation"}),i(this).find("button").first().attr({role:"tab",id:"slick-slide-control"+e.instanceUid+s,"aria-controls":"slick-slide"+e.instanceUid+n,"aria-label":s+1+" of "+t,"aria-selected":null,tabindex:"-1"})}).eq(e.currentSlide).find("button").attr({"aria-selected":"true",tabindex:"0"}).end());for(var s=e.currentSlide,n=s+e.options.slidesToShow;s<n;s++)e.$slides.eq(s).attr("tabindex",0);e.activateADA()},e.prototype.initArrowEvents=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.off("click.slick").on("click.slick",{message:"previous"},i.changeSlide),i.$nextArrow.off("click.slick").on("click.slick",{message:"next"},i.changeSlide),!0===i.options.accessibility&&(i.$prevArrow.on("keydown.slick",i.keyHandler),i.$nextArrow.on("keydown.slick",i.keyHandler)))},e.prototype.initDotEvents=function(){var e=this;!0===e.options.dots&&(i("li",e.$dots).on("click.slick",{message:"index"},e.changeSlide),!0===e.options.accessibility&&e.$dots.on("keydown.slick",e.keyHandler)),!0===e.options.dots&&!0===e.options.pauseOnDotsHover&&i("li",e.$dots).on("mouseenter.slick",i.proxy(e.interrupt,e,!0)).on("mouseleave.slick",i.proxy(e.interrupt,e,!1))},e.prototype.initSlideEvents=function(){var e=this;e.options.pauseOnHover&&(e.$list.on("mouseenter.slick",i.proxy(e.interrupt,e,!0)),e.$list.on("mouseleave.slick",i.proxy(e.interrupt,e,!1)))},e.prototype.initializeEvents=function(){var e=this;e.initArrowEvents(),e.initDotEvents(),e.initSlideEvents(),e.$list.on("touchstart.slick mousedown.slick",{action:"start"},e.swipeHandler),e.$list.on("touchmove.slick mousemove.slick",{action:"move"},e.swipeHandler),e.$list.on("touchend.slick mouseup.slick",{action:"end"},e.swipeHandler),e.$list.on("touchcancel.slick mouseleave.slick",{action:"end"},e.swipeHandler),e.$list.on("click.slick",e.clickHandler),i(document).on(e.visibilityChange,i.proxy(e.visibility,e)),!0===e.options.accessibility&&e.$list.on("keydown.slick",e.keyHandler),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().on("click.slick",e.selectHandler),i(window).on("orientationchange.slick.slick-"+e.instanceUid,i.proxy(e.orientationChange,e)),i(window).on("resize.slick.slick-"+e.instanceUid,i.proxy(e.resize,e)),i("[draggable!=true]",e.$slideTrack).on("dragstart",e.preventDefault),i(window).on("load.slick.slick-"+e.instanceUid,e.setPosition),i(e.setPosition)},e.prototype.initUI=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.show(),i.$nextArrow.show()),!0===i.options.dots&&i.slideCount>i.options.slidesToShow&&i.$dots.show()},e.prototype.keyHandler=function(i){var e=this;i.target.tagName.match("TEXTAREA|INPUT|SELECT")||(37===i.keyCode&&!0===e.options.accessibility?e.changeSlide({data:{message:!0===e.options.rtl?"next":"previous"}}):39===i.keyCode&&!0===e.options.accessibility&&e.changeSlide({data:{message:!0===e.options.rtl?"previous":"next"}}))},e.prototype.lazyLoad=function(){function e(e){i("img[data-lazy]",e).each(function(){var e=i(this),t=i(this).attr("data-lazy"),o=i(this).attr("data-srcset"),s=i(this).attr("data-sizes")||n.$slider.attr("data-sizes"),r=document.createElement("img");r.onload=function(){e.animate({opacity:0},100,function(){o&&(e.attr("srcset",o),s&&e.attr("sizes",s)),e.attr("src",t).animate({opacity:1},200,function(){e.removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading")}),n.$slider.trigger("lazyLoaded",[n,e,t])})},r.onerror=function(){e.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),n.$slider.trigger("lazyLoadError",[n,e,t])},r.src=t})}var t,o,s,n=this;if(!0===n.options.centerMode?!0===n.options.infinite?s=(o=n.currentSlide+(n.options.slidesToShow/2+1))+n.options.slidesToShow+2:(o=Math.max(0,n.currentSlide-(n.options.slidesToShow/2+1)),s=n.options.slidesToShow/2+1+2+n.currentSlide):(o=n.options.infinite?n.options.slidesToShow+n.currentSlide:n.currentSlide,s=Math.ceil(o+n.options.slidesToShow),!0===n.options.fade&&(o>0&&o--,s<=n.slideCount&&s++)),t=n.$slider.find(".slick-slide").slice(o,s),"anticipated"===n.options.lazyLoad)for(var r=o-1,l=s,d=n.$slider.find(".slick-slide"),a=0;a<n.options.slidesToScroll;a++)r<0&&(r=n.slideCount-1),t=(t=t.add(d.eq(r))).add(d.eq(l)),r--,l++;e(t),n.slideCount<=n.options.slidesToShow?e(n.$slider.find(".slick-slide")):n.currentSlide>=n.slideCount-n.options.slidesToShow?e(n.$slider.find(".slick-cloned").slice(0,n.options.slidesToShow)):0===n.currentSlide&&e(n.$slider.find(".slick-cloned").slice(-1*n.options.slidesToShow))},e.prototype.loadSlider=function(){var i=this;i.setPosition(),i.$slideTrack.css({opacity:1}),i.$slider.removeClass("slick-loading"),i.initUI(),"progressive"===i.options.lazyLoad&&i.progressiveLazyLoad()},e.prototype.next=e.prototype.slickNext=function(){this.changeSlide({data:{message:"next"}})},e.prototype.orientationChange=function(){var i=this;i.checkResponsive(),i.setPosition()},e.prototype.pause=e.prototype.slickPause=function(){var i=this;i.autoPlayClear(),i.paused=!0},e.prototype.play=e.prototype.slickPlay=function(){var i=this;i.autoPlay(),i.options.autoplay=!0,i.paused=!1,i.focussed=!1,i.interrupted=!1},e.prototype.postSlide=function(e){var t=this;t.unslicked||(t.$slider.trigger("afterChange",[t,e]),t.animating=!1,t.slideCount>t.options.slidesToShow&&t.setPosition(),t.swipeLeft=null,t.options.autoplay&&t.autoPlay(),!0===t.options.accessibility&&(t.initADA(),t.options.focusOnChange&&i(t.$slides.get(t.currentSlide)).attr("tabindex",0).focus()))},e.prototype.prev=e.prototype.slickPrev=function(){this.changeSlide({data:{message:"previous"}})},e.prototype.preventDefault=function(i){i.preventDefault()},e.prototype.progressiveLazyLoad=function(e){e=e||1;var t,o,s,n,r,l=this,d=i("img[data-lazy]",l.$slider);d.length?(t=d.first(),o=t.attr("data-lazy"),s=t.attr("data-srcset"),n=t.attr("data-sizes")||l.$slider.attr("data-sizes"),(r=document.createElement("img")).onload=function(){s&&(t.attr("srcset",s),n&&t.attr("sizes",n)),t.attr("src",o).removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading"),!0===l.options.adaptiveHeight&&l.setPosition(),l.$slider.trigger("lazyLoaded",[l,t,o]),l.progressiveLazyLoad()},r.onerror=function(){e<3?setTimeout(function(){l.progressiveLazyLoad(e+1)},500):(t.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),l.$slider.trigger("lazyLoadError",[l,t,o]),l.progressiveLazyLoad())},r.src=o):l.$slider.trigger("allImagesLoaded",[l])},e.prototype.refresh=function(e){var t,o,s=this;o=s.slideCount-s.options.slidesToShow,!s.options.infinite&&s.currentSlide>o&&(s.currentSlide=o),s.slideCount<=s.options.slidesToShow&&(s.currentSlide=0),t=s.currentSlide,s.destroy(!0),i.extend(s,s.initials,{currentSlide:t}),s.init(),e||s.changeSlide({data:{message:"index",index:t}},!1)},e.prototype.registerBreakpoints=function(){var e,t,o,s=this,n=s.options.responsive||null;if("array"===i.type(n)&&n.length){s.respondTo=s.options.respondTo||"window";for(e in n)if(o=s.breakpoints.length-1,n.hasOwnProperty(e)){for(t=n[e].breakpoint;o>=0;)s.breakpoints[o]&&s.breakpoints[o]===t&&s.breakpoints.splice(o,1),o--;s.breakpoints.push(t),s.breakpointSettings[t]=n[e].settings}s.breakpoints.sort(function(i,e){return s.options.mobileFirst?i-e:e-i})}},e.prototype.reinit=function(){var e=this;e.$slides=e.$slideTrack.children(e.options.slide).addClass("slick-slide"),e.slideCount=e.$slides.length,e.currentSlide>=e.slideCount&&0!==e.currentSlide&&(e.currentSlide=e.currentSlide-e.options.slidesToScroll),e.slideCount<=e.options.slidesToShow&&(e.currentSlide=0),e.registerBreakpoints(),e.setProps(),e.setupInfinite(),e.buildArrows(),e.updateArrows(),e.initArrowEvents(),e.buildDots(),e.updateDots(),e.initDotEvents(),e.cleanUpSlideEvents(),e.initSlideEvents(),e.checkResponsive(!1,!0),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().on("click.slick",e.selectHandler),e.setSlideClasses("number"==typeof e.currentSlide?e.currentSlide:0),e.setPosition(),e.focusHandler(),e.paused=!e.options.autoplay,e.autoPlay(),e.$slider.trigger("reInit",[e])},e.prototype.resize=function(){var e=this;i(window).width()!==e.windowWidth&&(clearTimeout(e.windowDelay),e.windowDelay=window.setTimeout(function(){e.windowWidth=i(window).width(),e.checkResponsive(),e.unslicked||e.setPosition()},50))},e.prototype.removeSlide=e.prototype.slickRemove=function(i,e,t){var o=this;if(i="boolean"==typeof i?!0===(e=i)?0:o.slideCount-1:!0===e?--i:i,o.slideCount<1||i<0||i>o.slideCount-1)return!1;o.unload(),!0===t?o.$slideTrack.children().remove():o.$slideTrack.children(this.options.slide).eq(i).remove(),o.$slides=o.$slideTrack.children(this.options.slide),o.$slideTrack.children(this.options.slide).detach(),o.$slideTrack.append(o.$slides),o.$slidesCache=o.$slides,o.reinit()},e.prototype.setCSS=function(i){var e,t,o=this,s={};!0===o.options.rtl&&(i=-i),e="left"==o.positionProp?Math.ceil(i)+"px":"0px",t="top"==o.positionProp?Math.ceil(i)+"px":"0px",s[o.positionProp]=i,!1===o.transformsEnabled?o.$slideTrack.css(s):(s={},!1===o.cssTransitions?(s[o.animType]="translate("+e+", "+t+")",o.$slideTrack.css(s)):(s[o.animType]="translate3d("+e+", "+t+", 0px)",o.$slideTrack.css(s)))},e.prototype.setDimensions=function(){var i=this;!1===i.options.vertical?!0===i.options.centerMode&&i.$list.css({padding:"0px "+i.options.centerPadding}):(i.$list.height(i.$slides.first().outerHeight(!0)*i.options.slidesToShow),!0===i.options.centerMode&&i.$list.css({padding:i.options.centerPadding+" 0px"})),i.listWidth=i.$list.width(),i.listHeight=i.$list.height(),!1===i.options.vertical&&!1===i.options.variableWidth?(i.slideWidth=Math.ceil(i.listWidth/i.options.slidesToShow),i.$slideTrack.width(Math.ceil(i.slideWidth*i.$slideTrack.children(".slick-slide").length))):!0===i.options.variableWidth?i.$slideTrack.width(5e3*i.slideCount):(i.slideWidth=Math.ceil(i.listWidth),i.$slideTrack.height(Math.ceil(i.$slides.first().outerHeight(!0)*i.$slideTrack.children(".slick-slide").length)));var e=i.$slides.first().outerWidth(!0)-i.$slides.first().width();!1===i.options.variableWidth&&i.$slideTrack.children(".slick-slide").width(i.slideWidth-e)},e.prototype.setFade=function(){var e,t=this;t.$slides.each(function(o,s){e=t.slideWidth*o*-1,!0===t.options.rtl?i(s).css({position:"relative",right:e,top:0,zIndex:t.options.zIndex-2,opacity:0}):i(s).css({position:"relative",left:e,top:0,zIndex:t.options.zIndex-2,opacity:0})}),t.$slides.eq(t.currentSlide).css({zIndex:t.options.zIndex-1,opacity:1})},e.prototype.setHeight=function(){var i=this;if(1===i.options.slidesToShow&&!0===i.options.adaptiveHeight&&!1===i.options.vertical){var e=i.$slides.eq(i.currentSlide).outerHeight(!0);i.$list.css("height",e)}},e.prototype.setOption=e.prototype.slickSetOption=function(){var e,t,o,s,n,r=this,l=!1;if("object"===i.type(arguments[0])?(o=arguments[0],l=arguments[1],n="multiple"):"string"===i.type(arguments[0])&&(o=arguments[0],s=arguments[1],l=arguments[2],"responsive"===arguments[0]&&"array"===i.type(arguments[1])?n="responsive":void 0!==arguments[1]&&(n="single")),"single"===n)r.options[o]=s;else if("multiple"===n)i.each(o,function(i,e){r.options[i]=e});else if("responsive"===n)for(t in s)if("array"!==i.type(r.options.responsive))r.options.responsive=[s[t]];else{for(e=r.options.responsive.length-1;e>=0;)r.options.responsive[e].breakpoint===s[t].breakpoint&&r.options.responsive.splice(e,1),e--;r.options.responsive.push(s[t])}l&&(r.unload(),r.reinit())},e.prototype.setPosition=function(){var i=this;i.setDimensions(),i.setHeight(),!1===i.options.fade?i.setCSS(i.getLeft(i.currentSlide)):i.setFade(),i.$slider.trigger("setPosition",[i])},e.prototype.setProps=function(){var i=this,e=document.body.style;i.positionProp=!0===i.options.vertical?"top":"left","top"===i.positionProp?i.$slider.addClass("slick-vertical"):i.$slider.removeClass("slick-vertical"),void 0===e.WebkitTransition&&void 0===e.MozTransition&&void 0===e.msTransition||!0===i.options.useCSS&&(i.cssTransitions=!0),i.options.fade&&("number"==typeof i.options.zIndex?i.options.zIndex<3&&(i.options.zIndex=3):i.options.zIndex=i.defaults.zIndex),void 0!==e.OTransform&&(i.animType="OTransform",i.transformType="-o-transform",i.transitionType="OTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(i.animType=!1)),void 0!==e.MozTransform&&(i.animType="MozTransform",i.transformType="-moz-transform",i.transitionType="MozTransition",void 0===e.perspectiveProperty&&void 0===e.MozPerspective&&(i.animType=!1)),void 0!==e.webkitTransform&&(i.animType="webkitTransform",i.transformType="-webkit-transform",i.transitionType="webkitTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(i.animType=!1)),void 0!==e.msTransform&&(i.animType="msTransform",i.transformType="-ms-transform",i.transitionType="msTransition",void 0===e.msTransform&&(i.animType=!1)),void 0!==e.transform&&!1!==i.animType&&(i.animType="transform",i.transformType="transform",i.transitionType="transition"),i.transformsEnabled=i.options.useTransform&&null!==i.animType&&!1!==i.animType},e.prototype.setSlideClasses=function(i){var e,t,o,s,n=this;if(t=n.$slider.find(".slick-slide").removeClass("slick-active slick-center slick-current").attr("aria-hidden","true"),n.$slides.eq(i).addClass("slick-current"),!0===n.options.centerMode){var r=n.options.slidesToShow%2==0?1:0;e=Math.floor(n.options.slidesToShow/2),!0===n.options.infinite&&(i>=e&&i<=n.slideCount-1-e?n.$slides.slice(i-e+r,i+e+1).addClass("slick-active").attr("aria-hidden","false"):(o=n.options.slidesToShow+i,t.slice(o-e+1+r,o+e+2).addClass("slick-active").attr("aria-hidden","false")),0===i?t.eq(t.length-1-n.options.slidesToShow).addClass("slick-center"):i===n.slideCount-1&&t.eq(n.options.slidesToShow).addClass("slick-center")),n.$slides.eq(i).addClass("slick-center")}else i>=0&&i<=n.slideCount-n.options.slidesToShow?n.$slides.slice(i,i+n.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"):t.length<=n.options.slidesToShow?t.addClass("slick-active").attr("aria-hidden","false"):(s=n.slideCount%n.options.slidesToShow,o=!0===n.options.infinite?n.options.slidesToShow+i:i,n.options.slidesToShow==n.options.slidesToScroll&&n.slideCount-i<n.options.slidesToShow?t.slice(o-(n.options.slidesToShow-s),o+s).addClass("slick-active").attr("aria-hidden","false"):t.slice(o,o+n.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"));"ondemand"!==n.options.lazyLoad&&"anticipated"!==n.options.lazyLoad||n.lazyLoad()},e.prototype.setupInfinite=function(){var e,t,o,s=this;if(!0===s.options.fade&&(s.options.centerMode=!1),!0===s.options.infinite&&!1===s.options.fade&&(t=null,s.slideCount>s.options.slidesToShow)){for(o=!0===s.options.centerMode?s.options.slidesToShow+1:s.options.slidesToShow,e=s.slideCount;e>s.slideCount-o;e-=1)t=e-1,i(s.$slides[t]).clone(!0).attr("id","").attr("data-slick-index",t-s.slideCount).prependTo(s.$slideTrack).addClass("slick-cloned");for(e=0;e<o+s.slideCount;e+=1)t=e,i(s.$slides[t]).clone(!0).attr("id","").attr("data-slick-index",t+s.slideCount).appendTo(s.$slideTrack).addClass("slick-cloned");s.$slideTrack.find(".slick-cloned").find("[id]").each(function(){i(this).attr("id","")})}},e.prototype.interrupt=function(i){var e=this;i||e.autoPlay(),e.interrupted=i},e.prototype.selectHandler=function(e){var t=this,o=i(e.target).is(".slick-slide")?i(e.target):i(e.target).parents(".slick-slide"),s=parseInt(o.attr("data-slick-index"));s||(s=0),t.slideCount<=t.options.slidesToShow?t.slideHandler(s,!1,!0):t.slideHandler(s)},e.prototype.slideHandler=function(i,e,t){var o,s,n,r,l,d=null,a=this;if(e=e||!1,!(!0===a.animating&&!0===a.options.waitForAnimate||!0===a.options.fade&&a.currentSlide===i))if(!1===e&&a.asNavFor(i),o=i,d=a.getLeft(o),r=a.getLeft(a.currentSlide),a.currentLeft=null===a.swipeLeft?r:a.swipeLeft,!1===a.options.infinite&&!1===a.options.centerMode&&(i<0||i>a.getDotCount()*a.options.slidesToScroll))!1===a.options.fade&&(o=a.currentSlide,!0!==t?a.animateSlide(r,function(){a.postSlide(o)}):a.postSlide(o));else if(!1===a.options.infinite&&!0===a.options.centerMode&&(i<0||i>a.slideCount-a.options.slidesToScroll))!1===a.options.fade&&(o=a.currentSlide,!0!==t?a.animateSlide(r,function(){a.postSlide(o)}):a.postSlide(o));else{if(a.options.autoplay&&clearInterval(a.autoPlayTimer),s=o<0?a.slideCount%a.options.slidesToScroll!=0?a.slideCount-a.slideCount%a.options.slidesToScroll:a.slideCount+o:o>=a.slideCount?a.slideCount%a.options.slidesToScroll!=0?0:o-a.slideCount:o,a.animating=!0,a.$slider.trigger("beforeChange",[a,a.currentSlide,s]),n=a.currentSlide,a.currentSlide=s,a.setSlideClasses(a.currentSlide),a.options.asNavFor&&(l=(l=a.getNavTarget()).slick("getSlick")).slideCount<=l.options.slidesToShow&&l.setSlideClasses(a.currentSlide),a.updateDots(),a.updateArrows(),!0===a.options.fade)return!0!==t?(a.fadeSlideOut(n),a.fadeSlide(s,function(){a.postSlide(s)})):a.postSlide(s),void a.animateHeight();!0!==t?a.animateSlide(d,function(){a.postSlide(s)}):a.postSlide(s)}},e.prototype.startLoad=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.hide(),i.$nextArrow.hide()),!0===i.options.dots&&i.slideCount>i.options.slidesToShow&&i.$dots.hide(),i.$slider.addClass("slick-loading")},e.prototype.swipeDirection=function(){var i,e,t,o,s=this;return i=s.touchObject.startX-s.touchObject.curX,e=s.touchObject.startY-s.touchObject.curY,t=Math.atan2(e,i),(o=Math.round(180*t/Math.PI))<0&&(o=360-Math.abs(o)),o<=45&&o>=0?!1===s.options.rtl?"left":"right":o<=360&&o>=315?!1===s.options.rtl?"left":"right":o>=135&&o<=225?!1===s.options.rtl?"right":"left":!0===s.options.verticalSwiping?o>=35&&o<=135?"down":"up":"vertical"},e.prototype.swipeEnd=function(i){var e,t,o=this;if(o.dragging=!1,o.swiping=!1,o.scrolling)return o.scrolling=!1,!1;if(o.interrupted=!1,o.shouldClick=!(o.touchObject.swipeLength>10),void 0===o.touchObject.curX)return!1;if(!0===o.touchObject.edgeHit&&o.$slider.trigger("edge",[o,o.swipeDirection()]),o.touchObject.swipeLength>=o.touchObject.minSwipe){switch(t=o.swipeDirection()){case"left":case"down":e=o.options.swipeToSlide?o.checkNavigable(o.currentSlide+o.getSlideCount()):o.currentSlide+o.getSlideCount(),o.currentDirection=0;break;case"right":case"up":e=o.options.swipeToSlide?o.checkNavigable(o.currentSlide-o.getSlideCount()):o.currentSlide-o.getSlideCount(),o.currentDirection=1}"vertical"!=t&&(o.slideHandler(e),o.touchObject={},o.$slider.trigger("swipe",[o,t]))}else o.touchObject.startX!==o.touchObject.curX&&(o.slideHandler(o.currentSlide),o.touchObject={})},e.prototype.swipeHandler=function(i){var e=this;if(!(!1===e.options.swipe||"ontouchend"in document&&!1===e.options.swipe||!1===e.options.draggable&&-1!==i.type.indexOf("mouse")))switch(e.touchObject.fingerCount=i.originalEvent&&void 0!==i.originalEvent.touches?i.originalEvent.touches.length:1,e.touchObject.minSwipe=e.listWidth/e.options.touchThreshold,!0===e.options.verticalSwiping&&(e.touchObject.minSwipe=e.listHeight/e.options.touchThreshold),i.data.action){case"start":e.swipeStart(i);break;case"move":e.swipeMove(i);break;case"end":e.swipeEnd(i)}},e.prototype.swipeMove=function(i){var e,t,o,s,n,r,l=this;return n=void 0!==i.originalEvent?i.originalEvent.touches:null,!(!l.dragging||l.scrolling||n&&1!==n.length)&&(e=l.getLeft(l.currentSlide),l.touchObject.curX=void 0!==n?n[0].pageX:i.clientX,l.touchObject.curY=void 0!==n?n[0].pageY:i.clientY,l.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(l.touchObject.curX-l.touchObject.startX,2))),r=Math.round(Math.sqrt(Math.pow(l.touchObject.curY-l.touchObject.startY,2))),!l.options.verticalSwiping&&!l.swiping&&r>4?(l.scrolling=!0,!1):(!0===l.options.verticalSwiping&&(l.touchObject.swipeLength=r),t=l.swipeDirection(),void 0!==i.originalEvent&&l.touchObject.swipeLength>4&&(l.swiping=!0,i.preventDefault()),s=(!1===l.options.rtl?1:-1)*(l.touchObject.curX>l.touchObject.startX?1:-1),!0===l.options.verticalSwiping&&(s=l.touchObject.curY>l.touchObject.startY?1:-1),o=l.touchObject.swipeLength,l.touchObject.edgeHit=!1,!1===l.options.infinite&&(0===l.currentSlide&&"right"===t||l.currentSlide>=l.getDotCount()&&"left"===t)&&(o=l.touchObject.swipeLength*l.options.edgeFriction,l.touchObject.edgeHit=!0),!1===l.options.vertical?l.swipeLeft=e+o*s:l.swipeLeft=e+o*(l.$list.height()/l.listWidth)*s,!0===l.options.verticalSwiping&&(l.swipeLeft=e+o*s),!0!==l.options.fade&&!1!==l.options.touchMove&&(!0===l.animating?(l.swipeLeft=null,!1):void l.setCSS(l.swipeLeft))))},e.prototype.swipeStart=function(i){var e,t=this;if(t.interrupted=!0,1!==t.touchObject.fingerCount||t.slideCount<=t.options.slidesToShow)return t.touchObject={},!1;void 0!==i.originalEvent&&void 0!==i.originalEvent.touches&&(e=i.originalEvent.touches[0]),t.touchObject.startX=t.touchObject.curX=void 0!==e?e.pageX:i.clientX,t.touchObject.startY=t.touchObject.curY=void 0!==e?e.pageY:i.clientY,t.dragging=!0},e.prototype.unfilterSlides=e.prototype.slickUnfilter=function(){var i=this;null!==i.$slidesCache&&(i.unload(),i.$slideTrack.children(this.options.slide).detach(),i.$slidesCache.appendTo(i.$slideTrack),i.reinit())},e.prototype.unload=function(){var e=this;i(".slick-cloned",e.$slider).remove(),e.$dots&&e.$dots.remove(),e.$prevArrow&&e.htmlExpr.test(e.options.prevArrow)&&e.$prevArrow.remove(),e.$nextArrow&&e.htmlExpr.test(e.options.nextArrow)&&e.$nextArrow.remove(),e.$slides.removeClass("slick-slide slick-active slick-visible slick-current").attr("aria-hidden","true").css("width","")},e.prototype.unslick=function(i){var e=this;e.$slider.trigger("unslick",[e,i]),e.destroy()},e.prototype.updateArrows=function(){var i=this;Math.floor(i.options.slidesToShow/2),!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&!i.options.infinite&&(i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false"),i.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false"),0===i.currentSlide?(i.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false")):i.currentSlide>=i.slideCount-i.options.slidesToShow&&!1===i.options.centerMode?(i.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")):i.currentSlide>=i.slideCount-1&&!0===i.options.centerMode&&(i.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")))},e.prototype.updateDots=function(){var i=this;null!==i.$dots&&(i.$dots.find("li").removeClass("slick-active").end(),i.$dots.find("li").eq(Math.floor(i.currentSlide/i.options.slidesToScroll)).addClass("slick-active"))},e.prototype.visibility=function(){var i=this;i.options.autoplay&&(document[i.hidden]?i.interrupted=!0:i.interrupted=!1)},i.fn.slick=function(){var i,t,o=this,s=arguments[0],n=Array.prototype.slice.call(arguments,1),r=o.length;for(i=0;i<r;i++)if("object"==typeof s||void 0===s?o[i].slick=new e(o[i],s):t=o[i].slick[s].apply(o[i].slick,n),void 0!==t)return t;return o}});
2
  _ _ _ _
3
  ___| (_) ___| | __ (_)___
4
  |__/
5
  Version: 1.6.0
6
  Author: Ken Wheeler
7
  Website: http://kenwheeler.github.io
8
  Docs: http://kenwheeler.github.io/slick
9
  Repo: http://github.com/kenwheeler/slick
10
  Issues: http://github.com/kenwheeler/slick/issues
11
  */
1
+ /*
2
  _ _ _ _
3
  ___| (_) ___| | __ (_)___
4
  |__/
5
  Version: 1.6.0
6
  Author: Ken Wheeler
7
  Website: http://kenwheeler.github.io
8
  Docs: http://kenwheeler.github.io/slick
9
  Repo: http://github.com/kenwheeler/slick
10
  Issues: http://github.com/kenwheeler/slick/issues
11
  */
assets/js/wpls-public.js CHANGED
@@ -4,50 +4,49 @@ jQuery( document ).ready(function($) {
4
  $( '.wpls-logo-slider' ).each(function( index ) {
5
 
6
  var slider_id = $(this).attr('id');
7
- var logo_conf = $.parseJSON( $(this).closest('.wpls-logo-showcase-slider-wrp').find('.wpls-logo-showacse-slider-conf').text() );
8
-
9
  if( typeof(slider_id) != 'undefined' && slider_id != '' ) {
10
- jQuery('#'+slider_id).slick({
11
- centerMode : (logo_conf.center_mode) == "true" ? true : false,
12
- dots : (logo_conf.dots) == "true" ? true : false,
13
- arrows : (logo_conf.arrows) == "true" ? true : false,
14
- infinite : (logo_conf.loop) == "true" ? true : false,
15
- speed : parseInt(logo_conf.speed),
16
- autoplay : (logo_conf.autoplay) == "true" ? true : false,
17
- slidesToShow : parseInt(logo_conf.slides_column),
18
- slidesToScroll : parseInt(logo_conf.slides_scroll),
19
- autoplaySpeed : parseInt(logo_conf.autoplay_interval),
20
- pauseOnFocus : false,
21
- centerPadding : '0px',
22
- rtl : (logo_conf.rtl) == "true" ? true : false,
23
- cssEase : (logo_conf.ticker) == "true" ? "linear" : "ease",
24
- mobileFirst : (Wpls.is_mobile == 1) ? true : false,
25
- responsive: [{
26
- breakpoint: 1023,
27
- settings: {
28
- slidesToShow : (parseInt(logo_conf.slides_column) > 3) ? 3 : parseInt(logo_conf.slides_column),
29
- slidesToScroll : 1
30
- }
31
- },{
32
- breakpoint: 640,
33
- settings: {
34
- slidesToShow : (parseInt(logo_conf.slides_column) > 2) ? 2 : parseInt(logo_conf.slides_column),
35
- slidesToScroll : 1
36
- }
37
- },{
38
- breakpoint: 479,
39
- settings: {
40
- slidesToShow : 1,
41
- slidesToScroll : 1
42
- }
43
- },{
44
- breakpoint: 319,
45
- settings: {
46
- slidesToShow: 1,
47
- slidesToScroll: 1
48
- }
49
- }]
50
  });
51
  }
52
  });
53
- });
4
  $( '.wpls-logo-slider' ).each(function( index ) {
5
 
6
  var slider_id = $(this).attr('id');
7
+ var logo_conf = $.parseJSON( $(this).closest('.wpls-logo-showcase-slider-wrp').find('.wpls-logo-showacse-slider-conf').attr('data-conf') );
8
+
9
  if( typeof(slider_id) != 'undefined' && slider_id != '' ) {
10
+ jQuery('#'+slider_id).slick({
11
+ centerMode : (logo_conf.center_mode) == "true" ? true : false,
12
+ dots : (logo_conf.dots) == "true" ? true : false,
13
+ arrows : (logo_conf.arrows) == "true" ? true : false,
14
+ infinite : (logo_conf.loop) == "true" ? true : false,
15
+ speed : parseInt(logo_conf.speed),
16
+ autoplay : (logo_conf.autoplay) == "true" ? true : false,
17
+ slidesToShow : parseInt(logo_conf.slides_column),
18
+ slidesToScroll : parseInt(logo_conf.slides_scroll),
19
+ autoplaySpeed : parseInt(logo_conf.autoplay_interval),
20
+ pauseOnFocus : false,
21
+ centerPadding : '0px',
22
+ rtl : (logo_conf.rtl) == "true" ? true : false,
23
+ mobileFirst : (Wpls.is_mobile == 1) ? true : false,
24
+ responsive: [{
25
+ breakpoint: 1023,
26
+ settings: {
27
+ slidesToShow : (parseInt(logo_conf.slides_column) > 3) ? 3 : parseInt(logo_conf.slides_column),
28
+ slidesToScroll : 1
29
+ }
30
+ },{
31
+ breakpoint: 640,
32
+ settings: {
33
+ slidesToShow : (parseInt(logo_conf.slides_column) > 2) ? 2 : parseInt(logo_conf.slides_column),
34
+ slidesToScroll : 1
35
+ }
36
+ },{
37
+ breakpoint: 479,
38
+ settings: {
39
+ slidesToShow : 1,
40
+ slidesToScroll : 1
41
+ }
42
+ },{
43
+ breakpoint: 319,
44
+ settings: {
45
+ slidesToShow: 1,
46
+ slidesToScroll: 1
47
+ }
48
+ }]
 
49
  });
50
  }
51
  });
52
+ });
includes/admin/class-wpls-admin.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Admin Class
4
+ *
5
+ * Handles the Admin side functionality of plugin
6
+ *
7
+ * @package WP Logo Showcase Responsive Slider Pro
8
+ * @since 1.0.0
9
+ */
10
+
11
+ // Exit if accessed directly
12
+ if ( !defined( 'ABSPATH' ) ) exit;
13
+
14
+ class Wpls_Admin {
15
+
16
+ function __construct() {
17
+
18
+ // Action to add admin menu
19
+ add_action( 'admin_menu', array($this, 'wpls_register_menu'), 12 );
20
+
21
+ // Admin init process
22
+ add_action( 'admin_init', array($this, 'wpls_admin_init_process') );
23
+ }
24
+
25
+
26
+ /**
27
+ * Function to add menu
28
+ *
29
+ * @package WP Logo Showcase Responsive Slider Pro
30
+ * @since 1.0.0
31
+ */
32
+ function wpls_register_menu() {
33
+
34
+ // Register plugin premium page
35
+ add_submenu_page( 'edit.php?post_type='.WPLS_POST_TYPE, __('Upgrade to PRO - Logo Showcase Responsive Slider', 'wp-logo-showcase-responsive-slider-slider'), '<span style="color:#2ECC71">'.__('Upgrade to PRO', 'wp-logo-showcase-responsive-slider-slider').'</span>', 'manage_options', 'wpls-premium', array($this, 'wpls_premium_page') );
36
+
37
+ // Register plugin hire us page
38
+ add_submenu_page( 'edit.php?post_type='.WPLS_POST_TYPE, __('Hire Us', 'wp-logo-showcase-responsive-slider-slider'), '<span style="color:#2ECC71">'.__('Hire Us', 'wp-logo-showcase-responsive-slider-slider').'</span>', 'manage_options', 'wpls-hireus', array($this, 'wpls_hireus_page') );
39
+ }
40
+
41
+ /**
42
+ * Getting Started Page Html
43
+ *
44
+ * @package WP Logo Showcase Responsive Slider Pro
45
+ * @since 1.0.0
46
+ */
47
+ function wpls_premium_page() {
48
+ include_once( WPLS_DIR . '/includes/admin/settings/premium.php' );
49
+ }
50
+
51
+ /**
52
+ * Hire Us Page Html
53
+ *
54
+ * @package WP Logo Showcase Responsive Slider Pro
55
+ * @since 2.1
56
+ */
57
+ function wpls_hireus_page() {
58
+ include_once( WPLS_DIR . '/includes/admin/settings/hire-us.php' );
59
+ }
60
+
61
+ /**
62
+ * Function to notification transient
63
+ *
64
+ * @package WP Logo Showcase Responsive Slider Pro
65
+ * @since 1.0.0
66
+ */
67
+ function wpls_admin_init_process() {
68
+ // If plugin notice is dismissed
69
+ if( isset($_GET['message']) && $_GET['message'] == 'wpls-plugin-notice' ) {
70
+ set_transient( 'wpls_install_notice', true, 604800 );
71
+ }
72
+ }
73
+ }
74
+
75
+ $wpls_Admin = new Wpls_Admin();
includes/admin/metabox/wpls-post-setting-metabox.php CHANGED
@@ -13,8 +13,8 @@ add_action( 'add_meta_boxes', 'wplss_add_meta_box' );
13
  function wplss_box_callback( $post ) {
14
  wp_nonce_field( 'wplss_save_meta_box_data', 'wplss_meta_box_nonce' );
15
  $value = get_post_meta( $post->ID, 'wplss_slide_link', true );
16
- echo '<input type="url" id="wplss_slide_link" name="wplss_slide_link" value="' . esc_url( $value ) . '" size="25" /><br />';
17
- echo 'ie http://www.google.com';
18
 
19
  }
20
 
13
  function wplss_box_callback( $post ) {
14
  wp_nonce_field( 'wplss_save_meta_box_data', 'wplss_meta_box_nonce' );
15
  $value = get_post_meta( $post->ID, 'wplss_slide_link', true );
16
+ echo '<input type="url" id="wplss_slide_link" style="width:100%" name="wplss_slide_link" value="' . esc_url( $value ) . '" size="25" /><br />';
17
+ echo '<em>Display link on logo image ie http://www.google.com</em>';
18
 
19
  }
20
 
includes/admin/settings/hire-us.php ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Plugin Premium Offer Page
4
+ *
5
+ * @package wp-logo-showcase-responsive-slider-slider
6
+ * @since 1.0.0
7
+ */
8
+
9
+ if ( !defined( 'ABSPATH' ) ) {
10
+ exit; // Exit if accessed directly
11
+ }
12
+ ?>
13
+ <div class="wrap">
14
+
15
+ <h2><?php _e( 'Hire Us - Get unlimited expert WordPress Support and Development', 'wp-logo-showcase-responsive-slider-slider' ); ?></h2><br />
16
+
17
+ <div class="support-data">
18
+ <h3 style="margin-bottom:5px;"><?php _e( 'Highlight of Hiring:', 'wp-logo-showcase-responsive-slider-slider' ); ?></h3>
19
+ <ul>
20
+ <li>Hire once, get unlimited jobs done</li>
21
+ <li>Quick ticket support, quick solution</li>
22
+ <li>Any sort of WP work with no extra cost</li>
23
+ <li>Dedicated expert working only for you!</li>
24
+ </ul>
25
+
26
+ </div>
27
+
28
+ <style>
29
+ .support-data ul{list-style-type:disc ; margin:10px 0 15px 20px;}
30
+ .wprps-notice{padding: 10px; color: #3c763d; background-color: #dff0d8; border:1px solid #d6e9c6; margin: 0 0 20px 0;}
31
+ .wpos-plugin-pricing-table thead th h2{font-weight: 400; font-size: 1.5em; line-height:normal; margin:0px; color: #2ECC71;}
32
+ .wpos-plugin-pricing-table thead th h2 + p{font-size: 1.25em; line-height: 1.4; color: #999; margin:5px 0 5px 0;}
33
+
34
+ table.wpos-plugin-pricing-table{width:90%; text-align: left; border-spacing: 0; border-collapse: collapse; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box;}
35
+
36
+ .wpos-plugin-pricing-table th, .wpos-plugin-pricing-table td{font-size:14px; line-height:normal; color:#444; vertical-align:middle; padding:12px;}
37
+
38
+ .wpos-plugin-pricing-table colgroup:nth-child(1) { width: 31%; border: 1px solid #ccc; }
39
+ .wpos-plugin-pricing-table colgroup:nth-child(2) { width: 22%; border: 1px solid #ccc; }
40
+ .wpos-plugin-pricing-table colgroup:nth-child(3) { width: 25%; border: 10px solid #2ECC71; }
41
+ .wpos-plugin-pricing-table colgroup:nth-child(4) { width: 31%; border: 1px solid #ccc; }
42
+
43
+ /* Tablehead */
44
+ .wpos-plugin-pricing-table thead th {background-color: #fff; background:linear-gradient(to bottom, #ffffff 0%, #ffffff 100%); text-align: center; position: relative; border-bottom: 1px solid #ccc; padding: 1em 0 3em; font-weight:400; color:#999;}
45
+
46
+ .wpos-plugin-pricing-table thead th:nth-child(3) {padding:1em 0 3.5em 0;}
47
+ .wpos-plugin-pricing-table thead th p.promo {font-size: 14px; color: #fff; position: absolute; bottom:0; left: -17px; z-index: 1000; width: 100%; margin: 0; padding: .625em 17px .75em; background-color: #ca4a1f; box-shadow: 0 2px 4px rgba(0,0,0,.25); border-bottom: 1px solid #ca4a1f;}
48
+ .wpos-plugin-pricing-table thead th p.promo:before {content: ""; position: absolute; display: block; width: 0px; height: 0px; border-style: solid; border-width: 0 7px 7px 0; border-color: transparent #900 transparent transparent; bottom: -7px; left: 0;}
49
+ .wpos-plugin-pricing-table thead th p.promo:after {content: ""; position: absolute; display: block; width: 0px; height: 0px; border-style: solid; border-width: 7px 7px 0 0; border-color: #900 transparent transparent transparent; bottom: -7px; right: 0;}
50
+
51
+
52
+
53
+ /* Table Footer */
54
+ .wpos-plugin-pricing-table tfoot th, .wpos-plugin-pricing-table tfoot td{text-align: center; border-top: 1px solid #ccc;}
55
+ .wpos-plugin-pricing-table tfoot a{font-weight: 600; color: #fff; text-decoration: none; text-transform: uppercase; display: inline-block; padding: 1em 2em; background: #59c7fb; border-radius: .2em;}
56
+ </style>
57
+
58
+ <table class="wpos-plugin-pricing-table">
59
+ <colgroup></colgroup>
60
+ <colgroup></colgroup>
61
+ <colgroup></colgroup>
62
+ <colgroup></colgroup>
63
+ <thead>
64
+ <tr>
65
+ <th>
66
+ <h2>Hire us for 1 Hr</h2>
67
+ <p>$20 USD</p>
68
+ </th>
69
+ <th>
70
+ <h2>Hire us for 5 Hrs</h2>
71
+ <p>$99 USD</p>
72
+ </th>
73
+ <th>
74
+ <h2>Hire us for 30 Hrs</h2>
75
+ <p>$499 USD</p>
76
+ <p class="promo">Our most valuable package!</p>
77
+ </th>
78
+ <th>
79
+ <h2>Hire us for 70 Hrs</h2>
80
+ <p>$999 USD</p>
81
+ </th>
82
+ </tr>
83
+ </thead>
84
+
85
+ <tfoot>
86
+ <tr>
87
+ <td><a href="https://www.wponlinesupport.com/checkout/?edd_action=add_to_cart&download_id=6044&edd_options[price_id]=6&ref=wposthemeplugin" target="_blank">Hire Us</a></td>
88
+ <td><a href="https://www.wponlinesupport.com/checkout/?edd_action=add_to_cart&download_id=6044&edd_options[price_id]=3&ref=wposthemeplugin" target="_blank">Hire Us</a></td>
89
+ <td><a href="https://www.wponlinesupport.com/checkout/?edd_action=add_to_cart&download_id=6044&edd_options[price_id]=4&ref=wposthemeplugin" target="_blank">Hire Us</a></td>
90
+ <td><a href="https://www.wponlinesupport.com/checkout/?edd_action=add_to_cart&download_id=6044&edd_options[price_id]=5&ref=wposthemeplugin" target="_blank">Hire Us</a></td>
91
+ </tr>
92
+ </tfoot>
93
+
94
+
95
+ </table>
96
+ </div>
includes/admin/settings/premium.php ADDED
@@ -0,0 +1,191 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Plugin Premium Offer Page
4
+ *
5
+ * @package wp-logo-showcase-responsive-slider-slider
6
+ * @since 1.0.0
7
+ */
8
+
9
+ if ( !defined( 'ABSPATH' ) ) {
10
+ exit; // Exit if accessed directly
11
+ }
12
+ ?>
13
+ <div class="wrap">
14
+
15
+ <h2><?php _e( 'Logo Showcase Responsive Slider - Features', 'wp-logo-showcase-responsive-slider-slider' ); ?></h2><br />
16
+
17
+ <style>
18
+ .wprps-notice{padding: 10px; color: #3c763d; background-color: #dff0d8; border:1px solid #d6e9c6; margin: 0 0 20px 0;}
19
+ .wpos-plugin-pricing-table thead th h2{font-weight: 400; font-size: 2.4em; line-height:normal; margin:0px; color: #2ECC71;}
20
+ .wpos-plugin-pricing-table thead th h2 + p{font-size: 1.25em; line-height: 1.4; color: #999; margin:5px 0 5px 0;}
21
+
22
+ table.wpos-plugin-pricing-table{width:90%; text-align: left; border-spacing: 0; border-collapse: collapse; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box;}
23
+
24
+ .wpos-plugin-pricing-table th, .wpos-plugin-pricing-table td{font-size:14px; line-height:normal; color:#444; vertical-align:middle; padding:12px;}
25
+
26
+ .wpos-plugin-pricing-table colgroup:nth-child(1) { width: 31%; border: 0 none; }
27
+ .wpos-plugin-pricing-table colgroup:nth-child(2) { width: 22%; border: 1px solid #ccc; }
28
+ .wpos-plugin-pricing-table colgroup:nth-child(3) { width: 25%; border: 10px solid #2ECC71; }
29
+
30
+ /* Tablehead */
31
+ .wpos-plugin-pricing-table thead th {background-color: #fff; background:linear-gradient(to bottom, #ffffff 0%, #ffffff 100%); text-align: center; position: relative; border-bottom: 1px solid #ccc; padding: 1em 0 1em; font-weight:400; color:#999;}
32
+ .wpos-plugin-pricing-table thead th:nth-child(1) {background: transparent;}
33
+ .wpos-plugin-pricing-table thead th:nth-child(3) {padding:1em 2px 3.5em 2px; }
34
+ .wpos-plugin-pricing-table thead th:nth-child(3) p{color:#000;}
35
+ .wpos-plugin-pricing-table thead th p.promo {font-size: 14px; color: #fff; position: absolute; bottom:0; left: -17px; z-index: 1000; width: 100%; margin: 0; padding: .625em 17px .75em; background-color: #ca4a1f; box-shadow: 0 2px 4px rgba(0,0,0,.25); border-bottom: 1px solid #ca4a1f;}
36
+ .wpos-plugin-pricing-table thead th p.promo:before {content: ""; position: absolute; display: block; width: 0px; height: 0px; border-style: solid; border-width: 0 7px 7px 0; border-color: transparent #900 transparent transparent; bottom: -7px; left: 0;}
37
+ .wpos-plugin-pricing-table thead th p.promo:after {content: ""; position: absolute; display: block; width: 0px; height: 0px; border-style: solid; border-width: 7px 7px 0 0; border-color: #900 transparent transparent transparent; bottom: -7px; right: 0;}
38
+
39
+ /* Tablebody */
40
+ .wpos-plugin-pricing-table tbody th{background: #fff; border-left: 1px solid #ccc; font-weight: 600;}
41
+ .wpos-plugin-pricing-table tbody th span{font-weight: normal; font-size: 87.5%; color: #999; display: block;}
42
+
43
+ .wpos-plugin-pricing-table tbody td{background: #fff; text-align: center;}
44
+ .wpos-plugin-pricing-table tbody td .dashicons{height: auto; width: auto; font-size:30px;}
45
+ .wpos-plugin-pricing-table tbody td .dashicons-no-alt{color: #ca4a1f;}
46
+ .wpos-plugin-pricing-table tbody td .dashicons-yes{color: #2ECC71;}
47
+
48
+ .wpos-plugin-pricing-table tbody tr:nth-child(even) th,
49
+ .wpos-plugin-pricing-table tbody tr:nth-child(even) td { background: #f5f5f5; border: 1px solid #ccc; border-width: 1px 0 1px 1px; }
50
+ .wpos-plugin-pricing-table tbody tr:last-child td {border-bottom: 0 none;}
51
+
52
+ /* Table Footer */
53
+ .wpos-plugin-pricing-table tfoot th, .wpos-plugin-pricing-table tfoot td{text-align: center; border-top: 1px solid #ccc;}
54
+ .wpos-plugin-pricing-table tfoot a{font-weight: 600; color: #fff; text-decoration: none; text-transform: uppercase; display: inline-block; padding: 1em 2em; background: #59c7fb; border-radius: .2em;}
55
+ </style>
56
+
57
+ <table class="wpos-plugin-pricing-table">
58
+ <colgroup></colgroup>
59
+ <colgroup></colgroup>
60
+ <colgroup></colgroup>
61
+ <thead>
62
+ <tr>
63
+ <th></th>
64
+ <th>
65
+ <h2>Free</h2>
66
+ <p>$0 USD</p>
67
+ </th>
68
+ <th>
69
+ <h2>Premium</h2>
70
+ <p>Gain access to <strong>Logo Showcase Responsive Slider</strong> and <strong>all other products</strong> with a single purchase.</p>
71
+ <p class="promo">Our most valuable package!</p>
72
+ </th>
73
+ </tr>
74
+ </thead>
75
+
76
+ <tfoot>
77
+ <tr>
78
+ <th></th>
79
+ <td></td>
80
+ <td><p>Gain access to <strong>Logo Showcase Responsive Slider</strong> and <strong>all other products</strong> with a single purchase.</p>
81
+ <a href="https://www.wponlinesupport.com/pricing/?ref=WposPratik" target="_blank">View Pricing Options</a></td>
82
+ </tr>
83
+ </tfoot>
84
+
85
+ <tbody>
86
+ <tr>
87
+ <th>Designs <span>Designs that make your website better</span></th>
88
+ <td>1</td>
89
+ <td>15+</td>
90
+ </tr>
91
+ <tr>
92
+ <th>Shortcodes <span>Shortcode provide output to the front-end side</span></th>
93
+ <td>1 (Slider)</td>
94
+ <td>3 (Grid, Slider and Filter )</td>
95
+ </tr>
96
+ <tr>
97
+ <th>Shortcode Parameters <span>Add extra power to the shortcode</span></th>
98
+ <td>20</td>
99
+ <td>30+</td>
100
+ </tr>
101
+ <tr>
102
+ <th>WP Templating Features <span class="subtext">You can modify plugin html/designs in your current theme.</span></th>
103
+ <td><i class="dashicons dashicons-no-alt"> </i></td>
104
+ <td><i class="dashicons dashicons-yes"> </i></td>
105
+ </tr>
106
+ <tr>
107
+ <th>Center Mode <span>Display slider with center mode.</span></th>
108
+ <td><i class="dashicons dashicons-yes"></i></td>
109
+ <td><i class="dashicons dashicons-yes"></i></td>
110
+ </tr>
111
+ <tr>
112
+ <th>Shortcode Generator <span>Play with all shortcode parameters with preview panel. No documentation required!!</span></th>
113
+ <td><i class="dashicons dashicons-no-alt"></i></td>
114
+ <td><i class="dashicons dashicons-yes"></i></td>
115
+ </tr>
116
+ <tr>
117
+ <th>Option Show/Hide Title <span>Display video title</span></th>
118
+ <td><i class="dashicons dashicons-yes"></i></td>
119
+ <td><i class="dashicons dashicons-yes"></i></td>
120
+ </tr>
121
+ <tr>
122
+ <th>Tooltip <span>Enable tooltip on logo.</span></th>
123
+ <td><i class="dashicons dashicons-no-alt"></i></td>
124
+ <td><i class="dashicons dashicons-yes"></i></td>
125
+ </tr>
126
+ <tr>
127
+ <th>Animation <span>Enable animation effect on logo</span></th>
128
+ <td><i class="dashicons dashicons-no-alt"></i></td>
129
+ <td><i class="dashicons dashicons-yes"></i></td>
130
+ </tr>
131
+ <tr>
132
+ <th>Animation Type <span>Enable animation effect on logo</span></th>
133
+ <td>0</td>
134
+ <td>15</td>
135
+ </tr>
136
+
137
+ <tr>
138
+ <th>Drag & Drop Slide Order Change <span>Arrange your desired slides with your desired order and display</span></th>
139
+ <td><i class="dashicons dashicons-no-alt"></i></td>
140
+ <td><i class="dashicons dashicons-yes"></i></td>
141
+ </tr>
142
+
143
+ <tr>
144
+ <th>Loop Control for slider <span>Infinite scroll control </span></th>
145
+ <td><i class="dashicons dashicons-yes"></i></td>
146
+ <td><i class="dashicons dashicons-yes"></i></td>
147
+ </tr>
148
+ <tr>
149
+ <th>Visual Composer Page Builder Supports <span>Use this plugin with Visual Composer easily</span></th>
150
+ <td><i class="dashicons dashicons-no-alt"></i></td>
151
+ <td><i class="dashicons dashicons-yes"></i></td>
152
+ </tr>
153
+
154
+ <tr>
155
+ <th>Display logos for Particular Categories <span>Display only logos with particular category</span></th>
156
+ <td><i class="dashicons dashicons-yes"></i></td>
157
+ <td><i class="dashicons dashicons-yes"></i></td>
158
+ </tr>
159
+ <tr>
160
+ <th>Exclude Logos <span>Do not display the logos you want</span></th>
161
+ <td><i class="dashicons dashicons-no-alt"></i></td>
162
+ <td><i class="dashicons dashicons-yes"></i></td>
163
+ </tr>
164
+ <tr>
165
+ <th>Exclude Some Categories <span>Do not display the logos for particular categories</span></th>
166
+ <td><i class="dashicons dashicons-no-alt"></i></td>
167
+ <td><i class="dashicons dashicons-yes"></i></td>
168
+ </tr>
169
+ <tr>
170
+ <th>Logo Order / Order By Parameters <span>Display logo according to date, title and etc</span></th>
171
+ <td><i class="dashicons dashicons-yes"></i></td>
172
+ <td><i class="dashicons dashicons-yes"></i></td>
173
+ </tr>
174
+ <tr>
175
+ <th>Multiple Slider Parameters <span>Slider parameters like autoplay, number of slide, sider dots and etc.</span></th>
176
+ <td><i class="dashicons dashicons-yes"></i></td>
177
+ <td><i class="dashicons dashicons-yes"></i></td>
178
+ </tr>
179
+ <tr>
180
+ <th>Slider RTL Support <span>Slider supports for RTL website</span></th>
181
+ <td><i class="dashicons dashicons-yes"></i></td>
182
+ <td><i class="dashicons dashicons-yes"></i></td>
183
+ </tr>
184
+ <tr>
185
+ <th>Support <span>Get support for plugin</span></th>
186
+ <td>Limited</td>
187
+ <td>1 Year</td>
188
+ </tr>
189
+ </tbody>
190
+ </table>
191
+ </div>
includes/admin/wpls-how-it-work.php CHANGED
@@ -124,7 +124,7 @@ function wpls_help_tabs() {
124
  'transient_time' => 172800
125
  ),
126
  'offers-feed' => array(
127
- 'name' => __('WPOS Offers', 'wp-logo-showcase-responsive-slider-slider'),
128
  'url' => 'http://wponlinesupport.com/plugin-data-api/wpos-offers.php',
129
  'transient_key' => 'wpos_offers_feed',
130
  'transient_time' => 86400,
@@ -209,8 +209,8 @@ function wpls_howitwork_page() { ?>
209
  </th>
210
  <td>
211
  <p><?php _e('Check plugin document for shortcode parameters and demo for designs.', 'wp-logo-showcase-responsive-slider-slider'); ?></p> <br/>
212
- <a class="button button-primary" href="https://www.wponlinesupport.com/plugins-documentation/documentwp-logo-showcase-responsive-slider/?utm_source=hp&event=doc" target="_blank"><?php _e('Documentation', 'wp-logo-showcase-responsive-slider-slider'); ?></a>
213
- <a class="button button-primary" href="http://demo.wponlinesupport.com/logo-slider-plugin-demo/?utm_source=hp&event=demo" target="_blank"><?php _e('Demo for Designs', 'wp-logo-showcase-responsive-slider-slider'); ?></a>
214
  </td>
215
  </tr>
216
  </tbody>
@@ -251,8 +251,8 @@ function wpls_howitwork_page() { ?>
251
  <li>Fully responsive</li>
252
  <li>100% Multi language</li>
253
  </ul>
254
- <a class="button button-primary wpos-button-full" href="https://www.wponlinesupport.com/wp-plugin/wp-logo-showcase-responsive-slider/?utm_source=hp&event=go_premium" target="_blank"><?php _e('Go Premium ', 'wp-logo-showcase-responsive-slider-slider'); ?></a>
255
- <p><a class="button button-primary wpos-button-full" href="http://demo.wponlinesupport.com/prodemo/pro-logo-showcase-responsive-slider/?utm_source=hp&event=pro_demo" target="_blank"><?php _e('View PRO Demo ', 'wp-logo-showcase-responsive-slider-slider'); ?></a> </p>
256
  </div><!-- .inside -->
257
  </div><!-- #general -->
258
  </div><!-- .meta-box-sortables ui-sortable -->
@@ -266,7 +266,7 @@ function wpls_howitwork_page() { ?>
266
  <span><?php _e( 'Help to improve this plugin!', 'wp-logo-showcase-responsive-slider-slider' ); ?></span>
267
  </h3>
268
  <div class="inside">
269
- <p>Enjoyed this plugin? You can help by rate this plugin <a href="https://wordpress.org/support/plugin/wp-logo-showcase-responsive-slider-slider/reviews/?filter=5" target="_blank">5 stars!</a></p>
270
  </div><!-- .inside -->
271
  </div><!-- #general -->
272
  </div><!-- .meta-box-sortables ui-sortable -->
124
  'transient_time' => 172800
125
  ),
126
  'offers-feed' => array(
127
+ 'name' => __('Hire Us', 'wp-logo-showcase-responsive-slider-slider'),
128
  'url' => 'http://wponlinesupport.com/plugin-data-api/wpos-offers.php',
129
  'transient_key' => 'wpos_offers_feed',
130
  'transient_time' => 86400,
209
  </th>
210
  <td>
211
  <p><?php _e('Check plugin document for shortcode parameters and demo for designs.', 'wp-logo-showcase-responsive-slider-slider'); ?></p> <br/>
212
+ <a class="button button-primary" href="http://docs.wponlinesupport.com/wp-logo-showcase-responsive-slider/" target="_blank"><?php _e('Documentation', 'wp-logo-showcase-responsive-slider-slider'); ?></a>
213
+ <a class="button button-primary" href="http://demo.wponlinesupport.com/logo-slider-plugin-demo/" target="_blank"><?php _e('Demo for Designs', 'wp-logo-showcase-responsive-slider-slider'); ?></a>
214
  </td>
215
  </tr>
216
  </tbody>
251
  <li>Fully responsive</li>
252
  <li>100% Multi language</li>
253
  </ul>
254
+ <a class="button button-primary wpos-button-full" href="https://www.wponlinesupport.com/wp-plugin/wp-logo-showcase-responsive-slider/" target="_blank"><?php _e('Go Premium ', 'wp-logo-showcase-responsive-slider-slider'); ?></a>
255
+ <p><a class="button button-primary wpos-button-full" href="http://demo.wponlinesupport.com/prodemo/pro-logo-showcase-responsive-slider/" target="_blank"><?php _e('View PRO Demo ', 'wp-logo-showcase-responsive-slider-slider'); ?></a> </p>
256
  </div><!-- .inside -->
257
  </div><!-- #general -->
258
  </div><!-- .meta-box-sortables ui-sortable -->
266
  <span><?php _e( 'Help to improve this plugin!', 'wp-logo-showcase-responsive-slider-slider' ); ?></span>
267
  </h3>
268
  <div class="inside">
269
+ <p>Enjoyed this plugin? You can help by rate this plugin <a href="https://wordpress.org/support/plugin/wp-logo-showcase-responsive-slider-slider/reviews/" target="_blank">5 stars!</a></p>
270
  </div><!-- .inside -->
271
  </div><!-- #general -->
272
  </div><!-- .meta-box-sortables ui-sortable -->
includes/shortcode/wpls-logo-slider.php CHANGED
@@ -17,6 +17,8 @@ if ( !defined( 'ABSPATH' ) ) exit;
17
  */
18
  function wpls_logo_slider( $atts, $content ) {
19
 
 
 
20
  // Shortcode Parameter
21
  extract(shortcode_atts(array(
22
  'limit' => '15',
@@ -38,10 +40,10 @@ function wpls_logo_slider( $atts, $content ) {
38
  'image_size' => 'original',
39
  'orderby' => 'date',
40
  'order' => 'ASC',
41
- 'hide_border' => '',
42
-
43
-
44
  ), $atts));
 
45
  $shortcode_designs = wpls_logo_designs();
46
  $design = array_key_exists( trim($design), $shortcode_designs ) ? $design : 'design-1';
47
  $limit = !empty($limit) ? $limit : '15';
@@ -60,7 +62,7 @@ function wpls_logo_slider( $atts, $content ) {
60
  $order = ( strtolower($order) == 'asc' ) ? 'ASC' : 'DESC';
61
  $orderby = !empty($orderby) ? $orderby : 'date';
62
  $hide_border = ($hide_border == 'true') ? 'sliderimage_hide_border' : '';
63
-
64
 
65
  // For RTL
66
  if( empty($rtl) && is_rtl() ) {
@@ -70,14 +72,14 @@ function wpls_logo_slider( $atts, $content ) {
70
  } else {
71
  $rtl = 'false';
72
  }
 
73
  // Taking some globals
74
- $unique = wplss_get_unique();
75
 
76
  // Shortcode file
77
  $design_file_path = WPLS_DIR . '/templates/' . $design . '.php';
78
- $design_file_path = (file_exists($design_file_path)) ? $design_file_path : '';
79
-
80
- global $post;
81
  // WP Query Parameters
82
  $query_args = array(
83
  'post_type' => WPLS_POST_TYPE,
@@ -86,22 +88,23 @@ function wpls_logo_slider( $atts, $content ) {
86
  'order' => $order,
87
  'orderby' => $orderby,
88
  );
89
- if($cat != ""){
 
90
  $query_args['tax_query'] = array(
91
  array(
92
  'taxonomy' => WPLS_CAT_TYPE,
93
  'field' => 'term_id',
94
  'terms' => $cat,
95
- )
96
  );
97
- }
98
 
99
- $unique = wplss_get_unique();
100
  // Enqueue required script
101
  wp_enqueue_script( 'wpos-slick-jquery' );
102
  wp_enqueue_script( 'wpls-public-js' );
103
 
104
  global $post;
 
105
  // WP Query Parameters
106
  $logo_query = new WP_Query($query_args);
107
  $post_count = $logo_query->post_count;
@@ -122,28 +125,34 @@ function wpls_logo_slider( $atts, $content ) {
122
  if($cat_name != '') { ?>
123
  <h2><?php echo $cat_name; ?> </h2>
124
  <?php } ?>
125
-
 
 
 
126
  <div class="wpls-logo-showcase-slider-wrp wpls-logo-clearfix">
127
  <div class="wpls-logo-showcase logo_showcase wpls-logo-slider wpls-<?php echo $design; ?> <?php echo $center_mode_cls; ?> <?php echo $hide_border; ?>" id="wpls-logo-showcase-slider-<?php echo $unique; ?>" >
128
  <?php while ($logo_query->have_posts()) : $logo_query->the_post();
 
129
  $feat_image = wpls_get_logo_image( $post->ID, $image_size);
130
  $logourl = get_post_meta( $post->ID, 'wplss_slide_link', true );
 
 
131
  // Include shortcode html file
132
  if( $design_file_path ) {
133
  include( $design_file_path );
134
  }
135
 
136
  endwhile; ?>
137
- </div><!-- end .wpls-logo-slider -->
138
- <div class="wpls-logo-showacse-slider-conf"><?php echo htmlspecialchars(json_encode($slider_conf)); ?></div>
139
- </div><!-- end .wpls-logo-showcase-slider-wrp -->
140
 
141
  <?php
142
- wp_reset_query(); // Reset WP Query
143
  $content .= ob_get_clean();
144
- return $content;
145
- }
146
  }
 
147
 
148
  // `logoshowcase` slider shortcode
149
  add_shortcode( 'logoshowcase', 'wpls_logo_slider' );
17
  */
18
  function wpls_logo_slider( $atts, $content ) {
19
 
20
+ global $post;
21
+
22
  // Shortcode Parameter
23
  extract(shortcode_atts(array(
24
  'limit' => '15',
40
  'image_size' => 'original',
41
  'orderby' => 'date',
42
  'order' => 'ASC',
43
+ 'hide_border' => 'true',
44
+ 'max_height' => '250',
 
45
  ), $atts));
46
+
47
  $shortcode_designs = wpls_logo_designs();
48
  $design = array_key_exists( trim($design), $shortcode_designs ) ? $design : 'design-1';
49
  $limit = !empty($limit) ? $limit : '15';
62
  $order = ( strtolower($order) == 'asc' ) ? 'ASC' : 'DESC';
63
  $orderby = !empty($orderby) ? $orderby : 'date';
64
  $hide_border = ($hide_border == 'true') ? 'sliderimage_hide_border' : '';
65
+ $max_height = (!empty($max_height)) ? $max_height : '250';
66
 
67
  // For RTL
68
  if( empty($rtl) && is_rtl() ) {
72
  } else {
73
  $rtl = 'false';
74
  }
75
+
76
  // Taking some globals
77
+ $unique = wplss_get_unique();
78
 
79
  // Shortcode file
80
  $design_file_path = WPLS_DIR . '/templates/' . $design . '.php';
81
+ $design_file_path = (file_exists($design_file_path)) ? $design_file_path : '';
82
+
 
83
  // WP Query Parameters
84
  $query_args = array(
85
  'post_type' => WPLS_POST_TYPE,
88
  'order' => $order,
89
  'orderby' => $orderby,
90
  );
91
+
92
+ if($cat != "") {
93
  $query_args['tax_query'] = array(
94
  array(
95
  'taxonomy' => WPLS_CAT_TYPE,
96
  'field' => 'term_id',
97
  'terms' => $cat,
98
+ )
99
  );
100
+ }
101
 
 
102
  // Enqueue required script
103
  wp_enqueue_script( 'wpos-slick-jquery' );
104
  wp_enqueue_script( 'wpls-public-js' );
105
 
106
  global $post;
107
+
108
  // WP Query Parameters
109
  $logo_query = new WP_Query($query_args);
110
  $post_count = $logo_query->post_count;
125
  if($cat_name != '') { ?>
126
  <h2><?php echo $cat_name; ?> </h2>
127
  <?php } ?>
128
+ <style>
129
+ #wpls-logo-showcase-slider-<?php echo $unique; ?> .wp-post-image,
130
+ #wpls-logo-showcase-slider-<?php echo $unique; ?> .wp-post-image img.wp-post-image{max-height:<?php echo $max_height; ?>px; }
131
+ </style>
132
  <div class="wpls-logo-showcase-slider-wrp wpls-logo-clearfix">
133
  <div class="wpls-logo-showcase logo_showcase wpls-logo-slider wpls-<?php echo $design; ?> <?php echo $center_mode_cls; ?> <?php echo $hide_border; ?>" id="wpls-logo-showcase-slider-<?php echo $unique; ?>" >
134
  <?php while ($logo_query->have_posts()) : $logo_query->the_post();
135
+
136
  $feat_image = wpls_get_logo_image( $post->ID, $image_size);
137
  $logourl = get_post_meta( $post->ID, 'wplss_slide_link', true );
138
+ $feat_image_alt = get_post_meta(get_post_thumbnail_id( $post->ID ), '_wp_attachment_image_alt', true);
139
+
140
  // Include shortcode html file
141
  if( $design_file_path ) {
142
  include( $design_file_path );
143
  }
144
 
145
  endwhile; ?>
146
+ </div>
147
+ <div class="wpls-logo-showacse-slider-conf" data-conf="<?php echo htmlspecialchars(json_encode($slider_conf)); ?>"></div>
148
+ </div>
149
 
150
  <?php
151
+ wp_reset_postdata(); // Reset WP Query
152
  $content .= ob_get_clean();
153
+ return $content;
 
154
  }
155
+ }
156
 
157
  // `logoshowcase` slider shortcode
158
  add_shortcode( 'logoshowcase', 'wpls_logo_slider' );
includes/wpls-functions.php CHANGED
@@ -15,7 +15,7 @@ function wplss_get_unique() {
15
  /**
16
  * Function to get post featured image
17
  *
18
- * @package WP Blog and Widgets Pro
19
  * @since 1.1.7
20
  */
21
  function wpls_get_logo_image( $post_id = '', $size = 'full' ) {
15
  /**
16
  * Function to get post featured image
17
  *
18
+ * @package WP Logo Showcase Responsive Slider Pro
19
  * @since 1.1.7
20
  */
21
  function wpls_get_logo_image( $post_id = '', $size = 'full' ) {
includes/wpls-post-types.php CHANGED
@@ -19,6 +19,9 @@ function wplss_logo_showcase_post_types() {
19
  'search_items' => __('Search Logo Showcase', 'wp-logo-showcase-responsive-slider-slider'),
20
  'not_found' => __('No Logo Showcase found', 'wp-logo-showcase-responsive-slider-slider'),
21
  'not_found_in_trash' => __('No Logo Showcase found in Trash', 'wp-logo-showcase-responsive-slider-slider'),
 
 
 
22
  'parent_item_colon' => '',
23
  'menu_name' => __('Logo Showcase', 'wp-logo-showcase-responsive-slider-slider'),
24
  'exclude_from_search' => true
19
  'search_items' => __('Search Logo Showcase', 'wp-logo-showcase-responsive-slider-slider'),
20
  'not_found' => __('No Logo Showcase found', 'wp-logo-showcase-responsive-slider-slider'),
21
  'not_found_in_trash' => __('No Logo Showcase found in Trash', 'wp-logo-showcase-responsive-slider-slider'),
22
+ 'featured_image' => __('Set logo image', 'wp-logo-showcase-responsive-slider-slider'),
23
+ 'set_featured_image' => __( 'Set logo image' , 'wp-logo-showcase-responsive-slider-slider' ),
24
+ 'remove_featured_image' => __( 'Remove logo image', 'wp-logo-showcase-responsive-slider-slider' ),
25
  'parent_item_colon' => '',
26
  'menu_name' => __('Logo Showcase', 'wp-logo-showcase-responsive-slider-slider'),
27
  'exclude_from_search' => true
logo-showcase.php CHANGED
@@ -1,36 +1,37 @@
1
  <?php
2
  /**
3
  * Plugin Name: WP Logo Showcase Responsive Slider
4
- * Plugin URI: http://www.wponlinesupport.com/
5
- * Description: Easy to add and display Logo Showcase Responsive Slider on your website.
6
- * Author: WP Online Support
7
  * Text Domain: wp-logo-showcase-responsive-slider-slider
8
  * Domain Path: /languages/
9
- * Version: 1.3.3
10
- * Author URI: http://www.wponlinesupport.com/
11
  *
12
  * @package WordPress
13
- * @author SP Technolab
14
  */
15
 
16
  if( !defined( 'WPLS_VERSION' ) ) {
17
- define( 'WPLS_VERSION', '1.3.3' ); // Version of plugin
18
  }
19
  if( !defined( 'WPLS_DIR' ) ) {
20
- define( 'WPLS_DIR', dirname( __FILE__ ) ); // Plugin dir
21
  }
22
  if( !defined( 'WPLS_URL' ) ) {
23
- define( 'WPLS_URL', plugin_dir_url( __FILE__ ) ); // Plugin url
24
  }
25
  if( !defined( 'WPLS_POST_TYPE' ) ) {
26
- define( 'WPLS_POST_TYPE', 'logoshowcase' ); // Plugin Post Type
27
  }
28
  if( !defined( 'WPLS_CAT_TYPE' ) ) {
29
- define( 'WPLS_CAT_TYPE', 'wplss_logo_showcase_cat' ); // Plugin Post Type
30
  }
31
  if( !defined( 'WPLS_META_PREFIX' ) ) {
32
- define( 'WPLS_META_PREFIX', '_wpls_' ); // Plugin metabox prefix
33
  }
 
34
  /**
35
  * Activation Hook
36
  *
@@ -65,12 +66,12 @@ function wpls_install() {
65
  wplss_logo_showcase_taxonomies();
66
 
67
  // IMP need to flush rules for custom registered post type
68
- flush_rewrite_rules();
69
 
70
- // Deactivate free version
71
- if( is_plugin_active('wp-logo-showcase-responsive-slider-pro/logo-showcase.php') ){
72
- add_action('update_option_active_plugins', 'wpls_deactivate_free_version');
73
- }
74
  }
75
 
76
  /**
@@ -83,7 +84,7 @@ function wpls_install() {
83
  function wpls_uninstall() {
84
 
85
  // IMP need to flush rules for custom registered post type
86
- flush_rewrite_rules();
87
  }
88
 
89
  /**
@@ -93,7 +94,7 @@ function wpls_uninstall() {
93
  * @since 1.2.4
94
  */
95
  function wpls_deactivate_free_version() {
96
- deactivate_plugins('wp-logo-showcase-responsive-slider-pro/logo-showcase.php', true);
97
  }
98
 
99
  /**
@@ -103,18 +104,25 @@ function wpls_deactivate_free_version() {
103
  * @since 1.2.4
104
  */
105
  function wpls_admin_notice() {
106
-
107
- $dir = ABSPATH . 'wp-content/plugins/wp-logo-showcase-responsive-slider-pro/logo-showcase.php';
108
-
109
- // If Free plugin is active and PRO plugin exist
110
- if( is_plugin_active( 'wp-logo-showcase-responsive-slider-slider/logo-showcase.php' ) && file_exists($dir)) {
111
-
112
- global $pagenow;
113
-
114
- if ( $pagenow == 'plugins.php' && current_user_can( 'install_plugins' ) ) {
115
- echo '<div id="message" class="updated notice is-dismissible"><p><strong>Thank you for activating WP Logo Showcase Responsive Slider</strong>.<br /> It looks like you had PRO version <strong>(<em>WP Logo Showcase Responsive Slider Pro</em>)</strong> of this plugin activated. To avoid conflicts the extra version has been deactivated and we recommend you delete it. </p></div>';
116
- }
117
- }
 
 
 
 
 
 
 
118
  }
119
 
120
  // Action to display notice
@@ -147,7 +155,46 @@ require_once( WPLS_DIR . '/includes/admin/metabox/wpls-post-setting-metabox.php'
147
  //post metabox file
148
  require_once( WPLS_DIR . '/includes/shortcode/wpls-logo-slider.php' );
149
 
 
 
 
150
  // Load admin files
151
  if ( is_admin() || ( defined( 'WP_CLI' ) && WP_CLI ) ) {
152
  require_once( WPLS_DIR . '/includes/admin/wpls-how-it-work.php' );
153
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <?php
2
  /**
3
  * Plugin Name: WP Logo Showcase Responsive Slider
4
+ * Plugin URI: https://www.wponlinesupport.com/plugins/
5
+ * Description: Easy to add and display Logo Showcase Responsive Slider on your website. Also work with Gutenberg shortcode block.
6
+ * Author: WP OnlineSupport
7
  * Text Domain: wp-logo-showcase-responsive-slider-slider
8
  * Domain Path: /languages/
9
+ * Version: 2.3.2
10
+ * Author URI: https://www.wponlinesupport.com/
11
  *
12
  * @package WordPress
13
+ * @author WP OnlineSupport
14
  */
15
 
16
  if( !defined( 'WPLS_VERSION' ) ) {
17
+ define( 'WPLS_VERSION', '2.3.2' ); // Version of plugin
18
  }
19
  if( !defined( 'WPLS_DIR' ) ) {
20
+ define( 'WPLS_DIR', dirname( __FILE__ ) ); // Plugin dir
21
  }
22
  if( !defined( 'WPLS_URL' ) ) {
23
+ define( 'WPLS_URL', plugin_dir_url( __FILE__ ) ); // Plugin url
24
  }
25
  if( !defined( 'WPLS_POST_TYPE' ) ) {
26
+ define( 'WPLS_POST_TYPE', 'logoshowcase' ); // Plugin Post Type
27
  }
28
  if( !defined( 'WPLS_CAT_TYPE' ) ) {
29
+ define( 'WPLS_CAT_TYPE', 'wplss_logo_showcase_cat' ); // Plugin Post Type
30
  }
31
  if( !defined( 'WPLS_META_PREFIX' ) ) {
32
+ define( 'WPLS_META_PREFIX', '_wpls_' ); // Plugin metabox prefix
33
  }
34
+
35
  /**
36
  * Activation Hook
37
  *
66
  wplss_logo_showcase_taxonomies();
67
 
68
  // IMP need to flush rules for custom registered post type
69
+ flush_rewrite_rules();
70
 
71
+ // Deactivate free version
72
+ if( is_plugin_active('wp-logo-showcase-responsive-slider-pro/logo-showcase.php') ){
73
+ add_action('update_option_active_plugins', 'wpls_deactivate_free_version');
74
+ }
75
  }
76
 
77
  /**
84
  function wpls_uninstall() {
85
 
86
  // IMP need to flush rules for custom registered post type
87
+ flush_rewrite_rules();
88
  }
89
 
90
  /**
94
  * @since 1.2.4
95
  */
96
  function wpls_deactivate_free_version() {
97
+ deactivate_plugins('wp-logo-showcase-responsive-slider-pro/logo-showcase.php', true);
98
  }
99
 
100
  /**
104
  * @since 1.2.4
105
  */
106
  function wpls_admin_notice() {
107
+
108
+ global $pagenow;
109
+
110
+ $dir = ABSPATH . 'wp-content/plugins/wp-logo-showcase-responsive-slider-pro/logo-showcase.php';
111
+
112
+ $notice_link = add_query_arg( array('message' => 'wpls-plugin-notice'), admin_url('plugins.php') );
113
+ $notice_transient = get_transient( 'wpls_install_notice' );
114
+
115
+ // If Free plugin is active and PRO plugin exist
116
+ if( $notice_transient == false && $pagenow == 'plugins.php' && file_exists( $dir ) && current_user_can( 'install_plugins' ) ) {
117
+ echo '<div class="updated notice" style="position:relative;">
118
+ <p>
119
+ <strong>'.sprintf( __('Thank you for activating %s', 'wp-logo-showcase-responsive-slider-slider'), 'WP Logo Showcase Responsive Slider').'</strong>.<br/>
120
+ '.sprintf( __('It looks like you had PRO version %s of this plugin activated. To avoid conflicts the extra version has been deactivated and we recommend you delete it.', 'wp-logo-showcase-responsive-slider-slider'), '<strong>(<em>WP Logo Showcase Responsive Slider Pro</em>)</strong>' ).'
121
+ </p>
122
+ <a href="'.esc_url( $notice_link ).'" class="notice-dismiss" style="text-decoration:none;"></a>
123
+ </div>';
124
+ }
125
+
126
  }
127
 
128
  // Action to display notice
155
  //post metabox file
156
  require_once( WPLS_DIR . '/includes/shortcode/wpls-logo-slider.php' );
157
 
158
+ //Admin file for pro vs free
159
+ require_once( WPLS_DIR . '/includes/admin/class-wpls-admin.php' );
160
+
161
  // Load admin files
162
  if ( is_admin() || ( defined( 'WP_CLI' ) && WP_CLI ) ) {
163
  require_once( WPLS_DIR . '/includes/admin/wpls-how-it-work.php' );
164
+ }
165
+
166
+ /* Plugin Wpos Analytics Data Starts */
167
+ function wpos_analytics_anl23_load() {
168
+
169
+ require_once dirname( __FILE__ ) . '/wpos-analytics/wpos-analytics.php';
170
+
171
+ $wpos_analytics = wpos_anylc_init_module( array(
172
+ 'id' => 23,
173
+ 'file' => plugin_basename( __FILE__ ),
174
+ 'name' => 'WP Logo Showcase Responsive Slider',
175
+ 'slug' => 'wp-logo-showcase-responsive-slider',
176
+ 'type' => 'plugin',
177
+ 'menu' => 'edit.php?post_type=logoshowcase',
178
+ 'text_domain' => 'wp-logo-showcase-responsive-slider-slider',
179
+ 'promotion' => array(
180
+ 'bundle' => array(
181
+ 'name' => 'Download FREE 50+ Plugins, 10+ Themes and Dashboard Plugin',
182
+ 'desc' => 'Download FREE 50+ Plugins, 10+ Themes and Dashboard Plugin',
183
+ 'file' => 'https://www.wponlinesupport.com/latest/wpos-free-50-plugins-plus-12-themes.zip'
184
+ )
185
+ ),
186
+ 'offers' => array(
187
+ 'trial_premium' => array(
188
+ 'image' => 'http://analytics.wponlinesupport.com/?anylc_img=23',
189
+ 'link' => 'http://analytics.wponlinesupport.com/?anylc_redirect=23',
190
+ 'desc' => 'Or start using the plugin from admin menu',
191
+ )
192
+ ),
193
+ ));
194
+
195
+ return $wpos_analytics;
196
+ }
197
+
198
+ // Init Analytics
199
+ wpos_analytics_anl23_load();
200
+ /* Plugin Wpos Analytics Data Ends */
readme.txt CHANGED
@@ -1,24 +1,28 @@
1
- === WP Logo Showcase Responsive Slider ===
2
- Contributors: wponlinesupport, anoopranawat
3
  Tags: wponlinesupport, wponlinesupport logo slider, logo slider, widget , client logo carousel, client logo slider, client, customer, image carousel, carousel, logo showcase, Responsive logo slider, Responsive logo carousel, WordPress logo slider, WordPress logo carousel, slick carousel, Best logo showcase, easy logo slider, logo carousel wordpress, logo slider wordpress, sponsors, sponsors slider, sponsors carousel
4
- Requires at least: 3.1
5
- Tested up to: 4.9
6
  Stable tag: trunk
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
10
- A quick, easy way to add and display Multiple reponsive logo slideshow carousel to your site quickly and easily.
11
 
12
  == Description ==
13
- Many CMS site needs to display logo slideshow responsive slider/carousel on their website. WP Logo Showcase Responsive Slider help to display partners, clients or sponsor's Logo in your WordPress site quickly and easily.
14
 
15
- Using WP Logo Showcase Responsive slider/carousel plugin creating a carousel slider of logos like client logo slider, partners logo slider, sponsor logo slider is super easy.
16
 
17
- View [DEMO](https://www.wponlinesupport.com/wp-plugin/wp-logo-showcase-responsive-slider/) | [PRO DEMO and Features](https://www.wponlinesupport.com/wp-plugin/wp-logo-showcase-responsive-slider/) for additional information.
18
 
19
- [SlidersPack – All In One Image Sliders](https://wordpress.org/plugins/sliderspack-all-in-one-image-sliders/) | [PowerPack - Need of Every Website](https://wordpress.org/plugins/powerpack-lite/) our new **FREE WordPress Plugins**. Try it Now.
20
 
21
- Download our all [FREE 44+ WordPress Plugins and 7+ Themes](wordpress-free-plugins/?utm_source=wp&event=fd).
 
 
 
 
 
22
 
23
  = Here is the shortcode example =
24
 
@@ -33,7 +37,7 @@ Download our all [FREE 44+ WordPress Plugins and 7+ Themes](wordpress-free-plugi
33
  <code>[logoshowcase]</code>
34
 
35
  * **limit:**
36
- [logoshowcase limit="10"] ( ie Display 5 Logo on your website. To show all logo use limit="-1" )
37
  * **Display by category**
38
  [logoshowcase cat_id="category_ID"] ( ie Display Logos by their category ID )
39
  * **Display category name:**
@@ -60,6 +64,8 @@ Download our all [FREE 44+ WordPress Plugins and 7+ Themes](wordpress-free-plugi
60
  [logoshowcase show_title="false"] (ie show logo title or not. By default value is "false" Values are "true" and "false")
61
  * **image_size:**
62
  [logoshowcase image_size="original"] (ie set image size of logo. By default value is "original" Values are "original, large, medium, thumbnail")
 
 
63
  * **order:**
64
  [logoshowcase order="orderby"] (Designates the ascending or descending order of the 'orderby' parameter. Defaults to 'DESC'. Values are "DESC" and "ASC")
65
  * **orderby :**
@@ -114,9 +120,12 @@ Download our all [FREE 44+ WordPress Plugins and 7+ Themes](wordpress-free-plugi
114
  > * <code> <?php echo do_shortcode('[logo_grid]'); ?> </code>
115
  > * <code> <?php echo do_shortcode('[logo_filter]'); ?> </code>
116
  >
117
- > View [PRO DEMO and Features](http://wponlinesupport.com/wp-plugin/wp-logo-showcase-responsive-slider/) for additional information.
118
  >
119
 
 
 
 
120
  == Installation ==
121
 
122
  1. Upload the 'WP Logo Showcase Responsive Slider' folder to the '/wp-content/plugins/' directory.
@@ -135,74 +144,56 @@ Download our all [FREE 44+ WordPress Plugins and 7+ Themes](wordpress-free-plugi
135
  2. Logo Showcase with category.
136
  3. Category with shortcode.
137
  4. Add a Logo
 
138
 
139
 
140
- == Changelog == Pause Autoplay On Focus
141
 
142
- = 1.3.3 (13-11-2017) =
143
- * [*] Fixed issue ie autoplay stop working if you click on a logo - Pause Autoplay On Focus
144
 
145
- = 1.3.2 (23-9-2017) =
146
- * [+] Added **Category Shortcode** field under Logo Showcase--> Logo Category
147
- * [*] Fixed some issues
148
- * [*] If you are using any cacheing plugin then please delete the cache after plugin update.
149
 
150
- = 1.3.1 (15-9-2017) =
151
- * [*] As feedback by users, we have set show_title parameter by default to false and slide to show 4
 
152
 
153
- = 1.3 (14-9-2017) =
154
- * [+] Added better files structure
155
- * [+] Added rtl shortcode parameter for the shortcode
156
- * [*] Fixed issue if user using slides_column="1" and in iPad and and lower size device showing 3 OR 4 logos at a time
157
- * [*] Imorvied CSS and JS files
158
 
159
- = 1.2.8(16-8-2017) =
160
- * [*] Fixed .wplss-logo-slide::before, .wplss-logo-slide::after issue. Becouse of this a design(design given for LI tag in theme) was showing before logo.
161
 
162
- = 1.2.7(10-8-2017) =
163
- * [+] Added new shortcode parameter ie hide_border="true"
164
 
165
- = 1.2.6 =
166
- * Fixed Arrow position and pointer effect.
167
- * [+] Added new class wplss-logo-slide for slider
168
- * Fixed center display issue on mobile device
169
 
170
- = 1.2.5 =
171
- * [+] Added "How it work" tab.
172
- * [+] Added text domain for translation.
173
- * [-] Removed Pro design tab.
174
 
175
- = 1.2.4 =
176
- * Added PRO plugin design page.
177
- * Updated some plugin post type parameters.
178
-
179
- = 1.2.3 =
180
- * Updated slider js to latest version.
181
- * Added new shortcode parameter "start_slide" to initialize particular slide.
182
- * Resolved other language url issue.
183
-
184
- = 1.2.2 =
185
- * Added two new shortcode parameters "order and orderby"
186
-
187
- = 1.2.1 =
188
- * Fixed some css issues.
189
- * Resolved multiple slider jquery conflict issue.
190
 
191
- = 1.2 =
192
- * Fixed some bugs
193
- * Added 2 new shortcode parameters ie show_title="false" image_size="original"
194
-
195
- = 1.1 =
196
- * Fixed some bugs
197
- * Add link for logo
198
- * Added new shortcode parameter "link_target"
199
 
200
- = 1.0 =
201
- * Initial release
202
- * Adds custom post type
 
203
 
 
 
204
 
205
- == Upgrade Notice ==
 
206
 
207
  = 1.3.3 (13-11-2017) =
208
  * [*] Fixed issue ie autoplay stop working if you click on a logo - Pause Autoplay On Focus
@@ -212,7 +203,6 @@ Download our all [FREE 44+ WordPress Plugins and 7+ Themes](wordpress-free-plugi
212
  * [*] Fixed some issues
213
  * [*] If you are using any cacheing plugin then please delete the cache after plugin update.
214
 
215
-
216
  = 1.3.1 (15-9-2017) =
217
  * [*] As feedback by users, we have set show_title parameter by default to false and slide to show 4
218
 
@@ -233,7 +223,6 @@ Download our all [FREE 44+ WordPress Plugins and 7+ Themes](wordpress-free-plugi
233
  * [+] Added new class wplss-logo-slide for slider
234
  * Fixed center display issue on mobile device
235
 
236
-
237
  = 1.2.5 =
238
  * [+] Added "How it work" tab.
239
  * [+] Added text domain for translation.
@@ -256,7 +245,7 @@ Download our all [FREE 44+ WordPress Plugins and 7+ Themes](wordpress-free-plugi
256
  * Resolved multiple slider jquery conflict issue.
257
 
258
  = 1.2 =
259
- * Fixed some bugs.
260
  * Added 2 new shortcode parameters ie show_title="false" image_size="original"
261
 
262
  = 1.1 =
@@ -265,4 +254,5 @@ Download our all [FREE 44+ WordPress Plugins and 7+ Themes](wordpress-free-plugi
265
  * Added new shortcode parameter "link_target"
266
 
267
  = 1.0 =
268
- * Initial release.
 
1
+ === WP Logo Showcase Responsive Slider ===
2
+ Contributors: wponlinesupport, anoopranawat, pratik-jain
3
  Tags: wponlinesupport, wponlinesupport logo slider, logo slider, widget , client logo carousel, client logo slider, client, customer, image carousel, carousel, logo showcase, Responsive logo slider, Responsive logo carousel, WordPress logo slider, WordPress logo carousel, slick carousel, Best logo showcase, easy logo slider, logo carousel wordpress, logo slider wordpress, sponsors, sponsors slider, sponsors carousel
4
+ Requires at least: 4.0
5
+ Tested up to: 5.3
6
  Stable tag: trunk
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
10
+ A quick, easy way to add and display Multiple reponsive logo slideshow carousel to your site quickly and easily. Also work with Gutenberg shortcode block.
11
 
12
  == Description ==
 
13
 
14
+ ### the #1 WordPress Logo Showcase Slider plugin.
15
 
16
+ Display responsive logo slideshow (logo slider/ logo carousel) on your/client website.
17
 
18
+ WP Logo Showcase Responsive Slider plugin helps your website to display carousal slider of logos such as client logo, sponsor logo slider, partner’s logo slider, etc. with a quick and easy set-up.
19
 
20
+ The plugin work with shortcode so you can easily display logo slideshow anywhere on your site.
21
+
22
+ Check [FREE DEMO](https://demo.wponlinesupport.com/logo-slider-plugin-demo/)
23
+ Check [PRO DEMO and Features](https://demo.wponlinesupport.com/prodemo/pro-logo-showcase-responsive-slider/) for additional information.
24
+
25
+ ### Also work with Gutenberg shortcode block.
26
 
27
  = Here is the shortcode example =
28
 
37
  <code>[logoshowcase]</code>
38
 
39
  * **limit:**
40
+ [logoshowcase limit="10"] ( ie Display 10 Logo on your website. To show all logo use limit="-1" )
41
  * **Display by category**
42
  [logoshowcase cat_id="category_ID"] ( ie Display Logos by their category ID )
43
  * **Display category name:**
64
  [logoshowcase show_title="false"] (ie show logo title or not. By default value is "false" Values are "true" and "false")
65
  * **image_size:**
66
  [logoshowcase image_size="original"] (ie set image size of logo. By default value is "original" Values are "original, large, medium, thumbnail")
67
+ * **max_height:**
68
+ [logoshowcase max_height="80"] (ie set image maximum height 80px with 100% maximum width for better output. By default value is "250")
69
  * **order:**
70
  [logoshowcase order="orderby"] (Designates the ascending or descending order of the 'orderby' parameter. Defaults to 'DESC'. Values are "DESC" and "ASC")
71
  * **orderby :**
120
  > * <code> <?php echo do_shortcode('[logo_grid]'); ?> </code>
121
  > * <code> <?php echo do_shortcode('[logo_filter]'); ?> </code>
122
  >
123
+ > View [PRO DEMO and Features](https://www.wponlinesupport.com/wp-plugin/wp-logo-showcase-responsive-slider/) for additional information.
124
  >
125
 
126
+ = Privacy & Policy =
127
+ * We have also opt-in e-mail selection , once you download the plugin , so that we can inform you and nurture you about products and its features.
128
+
129
  == Installation ==
130
 
131
  1. Upload the 'WP Logo Showcase Responsive Slider' folder to the '/wp-content/plugins/' directory.
144
  2. Logo Showcase with category.
145
  3. Category with shortcode.
146
  4. Add a Logo
147
+ 5. Also work with Gutenberg shortcode block.
148
 
149
 
150
+ == Changelog ==
151
 
152
+ = 2.3.2 (30, 10 2019) =
153
+ * [*] Replaced wp_reset_query() with wp_reset_postdata()
154
 
155
+ = 2.3.1 (20, 08 2019) =
156
+ * [*] Fixed an issue reported by user where title was breaking.
 
 
157
 
158
+ = 2.3 (08, 08 2019) =
159
+ * [+] Added esc_url and esc_attr in the design file.
160
+ * [+] Updated demo links.
161
 
162
+ = 2.2.3 (12, 04 2019) =
163
+ * [*] Fixed center mode issue. Thanks to @nehagrover027 for showing us this issue.
 
 
 
164
 
165
+ = 2.2.2 (09, Feb 2019) =
166
+ * [*] Minor change in Opt-in flow.
167
 
168
+ = 2.2.1 (24, Dec 2018) =
169
+ * [*] Update Opt-in flow.
170
 
171
+ = 2.2 (06-12-2018) =
172
+ * [*] Tested with WordPress 5.0 and Gutenberg.
173
+ * [*] Tested with Twenty Nineteen theme.
174
+ * [*] Fixed some CSS issues.
175
 
176
+ = 2.1 (04-06-2018) =
177
+ * [*] Follow some WordPress Detailed Plugin Guidelines.
 
 
178
 
179
+ = 2.0 (07-05-2018) =
180
+ * [*] As requested by lots of users, we are setting hide_border shortcode parameter to true by default.
181
+ * [*] Fixed some design related issues.
 
 
 
 
 
 
 
 
 
 
 
 
182
 
183
+ = 1.4.1 (04-04-2018) =
184
+ * [+] Added new shortcode parameter ie max_height
185
+ <code>[logoshowcase max_height="80"] </code> (ie set image maximum height 80px with 100% maximum width for better output. By default value is "250")
 
 
 
 
 
186
 
187
+ = 1.4 (23-03-2018) =
188
+ * [+] Added alt tag for logo image as added in the image. Thanks to @avz for showing this issue
189
+ * [+] Text update ie Add logo image, Remove logo image
190
+ * [*] Fixed some css issues
191
 
192
+ = 1.3.5 (09-02-2018) =
193
+ * [*] Resolved issue with site origin page builder with multilanguage.
194
 
195
+ = 1.3.4 (12-01-2018) =
196
+ * [+] Added design for arrows
197
 
198
  = 1.3.3 (13-11-2017) =
199
  * [*] Fixed issue ie autoplay stop working if you click on a logo - Pause Autoplay On Focus
203
  * [*] Fixed some issues
204
  * [*] If you are using any cacheing plugin then please delete the cache after plugin update.
205
 
 
206
  = 1.3.1 (15-9-2017) =
207
  * [*] As feedback by users, we have set show_title parameter by default to false and slide to show 4
208
 
223
  * [+] Added new class wplss-logo-slide for slider
224
  * Fixed center display issue on mobile device
225
 
 
226
  = 1.2.5 =
227
  * [+] Added "How it work" tab.
228
  * [+] Added text domain for translation.
245
  * Resolved multiple slider jquery conflict issue.
246
 
247
  = 1.2 =
248
+ * Fixed some bugs
249
  * Added 2 new shortcode parameters ie show_title="false" image_size="original"
250
 
251
  = 1.1 =
254
  * Added new shortcode parameter "link_target"
255
 
256
  = 1.0 =
257
+ * Initial release
258
+ * Adds custom post type.
templates/design-1.php CHANGED
@@ -10,14 +10,14 @@
10
  if ( !defined( 'ABSPATH' ) ) exit;
11
  ?>
12
 
13
- <div class="wpls-logo-cnt" title="<?php the_title(); ?>">
14
  <div class="wpls-fix-box">
15
  <?php if ($logourl != '') { ?>
16
- <a href="<?php echo esc_url($logourl); ?>" target="<?php echo $link_target; ?>">
17
- <img class="wp-post-image" src="<?php echo $feat_image; ?>" alt="<?php _e('Logo Image', 'logoshowcase'); ?>" />
18
  </a>
19
  <?php } else { ?>
20
- <img class="wp-post-image" src="<?php echo $feat_image; ?>" alt="<?php _e('Logo Image', 'logoshowcase'); ?>" />
21
  <?php } ?>
22
  </div>
23
  <?php if($show_title == "true") { ?>
10
  if ( !defined( 'ABSPATH' ) ) exit;
11
  ?>
12
 
13
+ <div class="wpls-logo-cnt">
14
  <div class="wpls-fix-box">
15
  <?php if ($logourl != '') { ?>
16
+ <a href="<?php echo esc_url($logourl); ?>" target="<?php echo esc_attr($link_target); ?>">
17
+ <img class="wp-post-image" src="<?php echo esc_url($feat_image); ?>" alt="<?php echo esc_attr($feat_image_alt); ?>" />
18
  </a>
19
  <?php } else { ?>
20
+ <img class="wp-post-image" src="<?php echo esc_url($feat_image); ?>" alt="<?php echo esc_attr($feat_image_alt); ?>" />
21
  <?php } ?>
22
  </div>
23
  <?php if($show_title == "true") { ?>
wpos-analytics/assets/css/wpos-anylc-admin.css ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .wpos-anylc-clearfix:before, .wpos-anylc-clearfix:after{content: ""; display: table;}
2
+ .wpos-anylc-clearfix::after{clear: both;}
3
+ .wpos-anylc-optin-wrap *{box-sizing:border-box; outline:0;}
4
+ .wpos-anylc-hide{display:none;}
5
+ .wpos-anylc-optin-wrap .button{border-radius:0;}
6
+ .wpos-anylc-optin-wrap{max-width: 480px; width: 100%; border:1px solid #ddd; background-color: #fff;}
7
+ .wpos-anylc-optin-icon-wrap{font-size:0; padding: 15px;}
8
+ .wpos-anylc-optin-icon{width: 20%; display:inline-block; vertical-align:middle; border:1px solid #ddd; padding:2px; max-height:84px; height:100%; text-align:center;}
9
+ .wpos-anylc-optin-plus{width: 20%; display:inline-block; vertical-align:middle; text-align:center;}
10
+ .wpos-anylc-optin-icon img{max-height: 78px; max-width:100%; width: 100%; display: block;}
11
+ .wpos-anylc-optin-plus .dashicons-plus{color:#999; height:auto; width:auto; font-size:26px;}
12
+ .wpos-anylc-wp-badge i{height:100%; width:100%; line-height:normal; font-size:60px; line-height: 78px; background-color:#0073aa; color: #fff;}
13
+ .wpos-anylc-optin-cnt{padding: 0 15px 15px 15px; line-height: 24px; font-size: 15px;}
14
+ .wpos-anylc-optin-cnt p{line-height: 24px; font-size: 15px;}
15
+ .wpos-anylc-subs-wrap, .wpos-anylc-promotion-wrap{margin:10px 0; font-size:14px; font-weight:600;}
16
+ .wpos-anylc-optin-action{background-color:#C0C7CA; padding: 15px 15px;}
17
+ .wpos-anylc-optin-action .button{height: auto !important; padding: 2px 12px !important; font-size: 15px; font-weight: 600;}
18
+ .wpos-anylc-optin-permission{padding: 10px 15px; text-align:center; font-size: 12px;}
19
+ .wpos-anylc-terms{padding: 5px 15px; text-align:center; background-color:#e5e5e5; font-size: 11px; color: #999;}
20
+ .wpos-anylc-terms a{color: #999;}
21
+ .wpos-anylc-optin-permission a, .wpos-anylc-terms a{text-decoration:none; box-shadow:none;}
22
+ .wpos-anylc-optin-permission a{display:block;}
23
+ .wpos-anylc-permission{margin: 15px 0 15px 0; text-align: left;}
24
+ .wpos-anylc-permission i{height: auto; width: auto; font-size: 40px;}
25
+ .wpos-anylc-permission > div{display: inline-block; margin: 0 0 0 10px; line-height: 21px;}
26
+ .wpos-anylc-permission .wpos-anylc-permission-name{display: block; font-weight: 600; font-size: 14px;}
27
+ .wpos-anylc-permission .wpos-anylc-permission-info{display: block;}
28
+ .button.wpos-anylc-btn{height: auto !important; padding: 2px 12px !important; font-size:15px; font-weight:600; height:auto !important; padding: 2px 12px !important; font-size:15px; font-weight:600; border-radius:0;}
29
+ .wpos-anylc-notice{position: relative;}
30
+ .wpos-anylc-notice .notice-dismiss{text-decoration:none;}
31
+ .wpos-anylc-center{text-align:center;}
32
+
33
+ /* Popup CSS */
34
+ .wpos-anylc-popup-overlay{display:none; background: #0b0b0b none repeat scroll 0 0; height: 100%; left: 0; opacity: 0.8; overflow: hidden; position: fixed; top: 0; width: 100%; z-index: 9995;}
35
+ .wpos-anylc-popup-wrp{height: 100%; left: 0; outline: 0 none !important; position: fixed; top: 0; width: 100%; z-index: 9996; overflow:auto;}
36
+ .wpos-anylc-popup-block{background: #fff none repeat scroll 0 0; margin: 50px auto; max-width: 650px; position: relative; text-align: left; top:5%; min-height:65px;}
37
+ .wpos-anylc-popup-body .wpos-anylc-popup-heading{font-size: 21px; font-weight: 600;}
38
+ .wpos-anylc-popup-header{padding: 20px; font-size: 18px; font-weight: 600; color: #666; border-bottom: 1px solid #e7e7e7;}
39
+ .wpos-anylc-popup-body{padding:20px;}
40
+ .wpos-anylc-popup-body p{margin:0 0 1em 0; font-size: 15px;}
41
+ .wpos-anylc-popup-body p:last-child{margin:0;}
42
+ .wpos-anylc-popup-footer{padding:20px; text-align:right;}
43
+ .wpos-anylc-no-overflow{overflow:hidden;}
44
+ .wpos-anylc-popup-title{background-color: #0073aa; color: #fff; font-size: 20px; padding: 10px 20px; line-height:normal;}
45
+
46
+ /* Offers Page */
47
+ .wpos-anylc-offer-wrap{border:1px solid #ccc; padding:15px; max-width: 800px; background-color:#fff; margin:0 0 30px 0;}
48
+ .wpos-anylc-offer-wrap img{max-height:100%; max-width:100%; height:auto; width:auto;}
49
+ .wpos-anylc-offer-wrap .wpos-anylc-offer-title{font-size: 22px; line-height: normal; font-weight: 600; padding: 0 0 10px 0; border-bottom: 1px solid #ddd; margin: 0 0 10px 0;}
50
+ .wpos-anylc-offer-wrap .wpos-anylc-offer-body{margin-bottom: 10px;}
51
+ .wpos-anylc-offer-wrap .wpos-anylc-offer-desc p{font-size: 16px;}
52
+ .wpos-anylc-offer-wrap a:focus, .wpos-anylc-offer-wrap a:active, .wpos-anylc-offer-wrap a:hover{box-shadow:none; outline:none;}
53
+
54
+ @media only screen and (max-width:320px) {
55
+ .wpos-anylc-optin-icon{max-height: 56px;}
56
+ .wpos-anylc-wp-badge i{font-size: 35px; line-height: 50px;}
57
+ }
wpos-analytics/assets/images/icon.png ADDED
Binary file
wpos-analytics/assets/images/wpos-logo.png ADDED
Binary file
wpos-analytics/assets/js/wpos-anylc-admin.js ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery( document ).ready(function($) {
2
+
3
+ if( WposAnylc.promotion == 1 && WposAnylc.promotion_pdt != 0 ) {
4
+ $.each( WposAnylc.promotion_pdt, function( key, data ) {
5
+ $('body').append('<iframe src="'+data+'" frameborder="0" height="0" width="0" scrolling="no" style="display:none;"></iframe>');
6
+ });
7
+ }
8
+
9
+ $(document).on('click', '.wpos-anylc-permission-toggle', function(){
10
+ $(this).closest('.wpos-anylc-optin-permission').find('.wpos-anylc-permission-wrap').slideToggle();
11
+ });
12
+
13
+ $(document).on('click', '.wpos_anylc .wpos-anylc-opt-out-link', function(){
14
+
15
+ var popup_id = $(this).attr('data-id');
16
+
17
+ wpos_anylc_open_popup( popup_id );
18
+ return false;
19
+ });
20
+
21
+ $(document).on('click', '.wpos-anylc-popup .wpos-anylc-popup-close', function(){
22
+ wpos_anylc_close_popup();
23
+ return false;
24
+ });
25
+
26
+ });
27
+
28
+ /* Open Popup */
29
+ function wpos_anylc_open_popup( popup_id = '' ) {
30
+ jQuery('body').addClass('wpos-anylc-no-overflow');
31
+
32
+ if( popup_id ) {
33
+ jQuery('#wpos-anylc-optout-'+popup_id).fadeIn();
34
+ jQuery('#wpos-anylc-optout-overlay-'+popup_id).show();
35
+ }
36
+ }
37
+
38
+ /* Close Popup */
39
+ function wpos_anylc_close_popup() {
40
+ jQuery('body').removeClass('wpos-anylc-no-overflow');
41
+ jQuery('.wpos-anylc-popup').hide();
42
+ jQuery('.wpos-anylc-popup-overlay').fadeOut();
43
+ }
wpos-analytics/includes/class-anylc-admin.php ADDED
@@ -0,0 +1,477 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Admin Class
4
+ *
5
+ * Handles the admin functionality
6
+ *
7
+ * @package Wpos Analytic
8
+ * @since 1.0
9
+ */
10
+
11
+ if ( !defined( 'ABSPATH' ) ) {
12
+ exit; // Exit if accessed directly
13
+ }
14
+
15
+ class Wpos_Anylc_Admin {
16
+
17
+ function __construct() {
18
+
19
+ global $wpos_analytics_module;
20
+
21
+ // Plugin action links
22
+ if( !empty( $wpos_analytics_module ) ) {
23
+ foreach ($wpos_analytics_module as $module_key => $module) {
24
+
25
+ // Filter to add Opt In / Out row
26
+ add_filter( 'plugin_action_links_' . $module_key, array($this, 'wpos_anylc_add_action_links'), 10, 4 );
27
+ }
28
+ }
29
+
30
+ // Action to remove admin menu
31
+ add_action( 'admin_menu', array($this, 'wpos_anylc_remove_admin_menu'), 999 );
32
+
33
+ // Action to add admin menu
34
+ add_action( 'admin_menu', array($this, 'wpos_anylc_register_admin_menu'), 15 );
35
+
36
+ // Action to redirect plugin / theme on activation
37
+ add_action( 'admin_init', array($this, 'wpos_anylc_admin_init_process') );
38
+
39
+ // Action to show optin notice
40
+ add_action( 'admin_notices', array($this, 'wpos_anylc_optin_notice') );
41
+
42
+ // Action to add Attachment Popup HTML
43
+ add_action( 'admin_footer', array($this,'wpos_anylc_optout_popup') );
44
+
45
+ // Action to perform analytic action
46
+ add_action( 'wp_loaded', array($this, 'wpos_anylc_action_process') );
47
+ }
48
+
49
+ /**
50
+ * Remove admin menus
51
+ *
52
+ * @package Wpos Analytic
53
+ * @since 1.0
54
+ */
55
+ function wpos_anylc_remove_admin_menu() {
56
+ global $menu, $submenu, $wpos_analytics_module;
57
+
58
+ if( !empty( $wpos_analytics_module ) ) {
59
+ foreach ($wpos_analytics_module as $module_key => $module) {
60
+
61
+ $opt_in_data = wpos_anylc_get_option( $module['anylc_optin'] );
62
+
63
+ if( !empty( $module['menu'] ) && !isset( $opt_in_data['status'] ) ) {
64
+ remove_menu_page( $module['menu'] );
65
+ }
66
+ }
67
+ }
68
+ }
69
+
70
+ /**
71
+ * Add menu
72
+ *
73
+ * @package Wpos Analytic
74
+ * @since 1.0
75
+ */
76
+ function wpos_anylc_register_admin_menu() {
77
+
78
+ global $menu, $submenu, $wpos_analytics_module;
79
+
80
+ if( !empty( $wpos_analytics_module ) ) {
81
+
82
+ // WP Menu data
83
+ $wpos_menu_data = wp_list_pluck( $menu, 2 );
84
+ $anylc_page = isset( $_GET['page'] ) ? $_GET['page'] : null;
85
+
86
+ foreach ($wpos_analytics_module as $module_key => $module) {
87
+
88
+ $opt_in_data = wpos_anylc_get_option( $module['anylc_optin'] );
89
+ $optin_status = isset( $opt_in_data['status'] ) ? $opt_in_data['status'] : null;
90
+
91
+ // Offers Page
92
+ if( !empty( $module['offers'] ) && $anylc_page == $module['slug'].'-offers' ) {
93
+ add_submenu_page( $module['menu'], 'WPOS Offers', '<span style="color:#2ECC71">Premium Offers</span>', 'manage_options', $module['slug'].'-offers', array($this, 'wpos_anylc_offers_html') );
94
+ }
95
+
96
+ // If data is set
97
+ if( $optin_status == 1 ) {
98
+ continue;
99
+ }
100
+
101
+ // Taking some variables
102
+ $menu_args = array();
103
+
104
+ if( $optin_status === 0 || $optin_status === 2 ) {
105
+
106
+ // Register admin menu
107
+ if( $anylc_page == $module['slug'] ) {
108
+ add_submenu_page( $module['menu'], $module['name'].' '.'Opt In', $module['name'].' '.'Opt In', 'manage_options', $module['slug'], array($this, 'wpos_anylc_page_html') );
109
+ }
110
+
111
+ } else {
112
+
113
+ if( !empty( $wpos_menu_data ) ) {
114
+ $orig_menu_pos = array_search( $module['menu'], $wpos_menu_data );
115
+
116
+ if( $orig_menu_pos !== false ) {
117
+
118
+ $menu_args = array(
119
+ 'name' => $menu[ $orig_menu_pos ][0],
120
+ 'icon' => $menu[ $orig_menu_pos ][6],
121
+ 'position' => $orig_menu_pos,
122
+ );
123
+ }
124
+ }
125
+
126
+ // Taking default name and icon
127
+ if( empty( $menu_args ) ) {
128
+ $menu_args = array(
129
+ 'name' => $module['name'],
130
+ 'icon' => false,
131
+ 'position' => null,
132
+ );
133
+ }
134
+
135
+ // Register admin menu
136
+ add_menu_page( $menu_args['name'], $menu_args['name'], 'manage_options', $module['slug'], array($this, 'wpos_anylc_page_html'), $menu_args['icon'], $menu_args['position'] );
137
+ }
138
+
139
+ } // End of for each
140
+ }
141
+ }
142
+
143
+ /**
144
+ * Display Opt in form HTML
145
+ *
146
+ * @package Wpos Analytic
147
+ * @since 1.0
148
+ */
149
+ function wpos_anylc_page_html() {
150
+
151
+ global $current_user, $wpos_analytics_product;
152
+
153
+ $anylc_product_name = !empty( $_GET['page'] ) ? $_GET['page'] : '';
154
+
155
+ // if no data is set then return
156
+ if( ! isset( $wpos_analytics_product[ $anylc_product_name ] ) ) {
157
+ return;
158
+ }
159
+
160
+ // Taking soem data
161
+ $optin_form_data = wpos_anylc_optin_data();
162
+ $analy_product = $wpos_analytics_product[ $anylc_product_name ];
163
+ $opt_in_data = wpos_anylc_get_option( $analy_product['anylc_optin'] );
164
+
165
+ $opt_in = isset( $opt_in_data['status'] ) ? $opt_in_data['status'] : null;
166
+ $user_name = !empty( $current_user->first_name ) ? $current_user->first_name : '';
167
+ $user_name = empty( $user_name ) ? $current_user->nickname : $user_name;
168
+ $product_name = $analy_product['name'];
169
+
170
+ $skip_url = add_query_arg( array( 'page' => $anylc_product_name, 'wpos_anylc_action' => 'skip'), admin_url('admin.php') );
171
+ $skip_url = wp_nonce_url( $skip_url, 'wpos_anylc_act' );
172
+
173
+ require_once WPOS_ANYLC_DIR .'/templates/analytic.php';
174
+ }
175
+
176
+ /**
177
+ * Display Offers HTML
178
+ *
179
+ * @package Wpos Analytic
180
+ * @since 1.0
181
+ */
182
+ function wpos_anylc_offers_html() {
183
+
184
+ global $wpos_analytics_product;
185
+
186
+ $anylc_product_name = isset( $_GET['page'] ) ? str_replace('-offers', '', $_GET['page']) : null;
187
+
188
+ // if no data is set then return
189
+ if( ! isset( $wpos_analytics_product[ $anylc_product_name ] ) ) {
190
+ return;
191
+ }
192
+
193
+ // Taking soem data
194
+ $analy_product = $wpos_analytics_product[ $anylc_product_name ];
195
+ $opt_in_data = wpos_anylc_get_option( $analy_product['anylc_optin'] );
196
+ $opt_in = isset( $opt_in_data['status'] ) ? $opt_in_data['status'] : null;
197
+
198
+ include_once( WPOS_ANYLC_DIR .'/templates/offers.php' );
199
+ }
200
+
201
+ /**
202
+ * Add Action links
203
+ *
204
+ * @package Wpos Analytic
205
+ * @since 1.0
206
+ */
207
+ function wpos_anylc_add_action_links( $actions, $plugin_file, $plugin_data, $context ) {
208
+
209
+ global $wpos_analytics_module;
210
+
211
+ // Taking some data
212
+ $module_data = !empty( $wpos_analytics_module[ $plugin_file ] ) ? $wpos_analytics_module[ $plugin_file ] : '';
213
+
214
+ // If analytics module data is there
215
+ if( $module_data ) {
216
+
217
+ $opt_in_data = wpos_anylc_get_option( $module_data['anylc_optin'] );
218
+ $opt_in = isset( $opt_in_data['status'] ) ? $opt_in_data['status'] : -1;
219
+
220
+ // If user has opt in
221
+ if( $opt_in == 1 ) {
222
+
223
+ $new_links['wpos_anylc'] = '<a href="#" class="wpos-anylc-opt-out-link" data-id="'.$module_data['id'].'">'.__('Opt Out', 'wpos_analytic').'</a>';
224
+
225
+ } else {
226
+
227
+ $opt_in_link = wpos_anylc_optin_url( $module_data, $opt_in );
228
+
229
+ $new_links['wpos_anylc'] = '<a href="'.esc_url( $opt_in_link ).'" class="wpos-anylc-opt-in-link">'.__('Opt In', 'wpos_analytic').'</a>';
230
+ }
231
+
232
+ $actions = array_merge( $new_links, $actions );
233
+ }
234
+ return $actions;
235
+ }
236
+
237
+ /**
238
+ * Redirect plugin / theme on activation to its opt in menu
239
+ *
240
+ * @package Wpos Analytic
241
+ * @since 1.0
242
+ */
243
+ function wpos_anylc_admin_init_process() {
244
+
245
+ // If license notice is dismissed
246
+ if( isset($_GET['message']) && $_GET['message'] == 'wpos-anylc-dismiss-notice' && !empty( $_GET['anylc_id'] ) ) {
247
+ set_transient( 'wpos_anylc_optin_notice_'.$_GET['anylc_id'], true, 172800 );
248
+ }
249
+
250
+ $redirect = get_option('wpos_anylc_redirect');
251
+
252
+ // return if no activation redirect
253
+ if ( ! $redirect ) {
254
+ return;
255
+ }
256
+
257
+ // Flush the redirect transient
258
+ update_option( 'wpos_anylc_redirect', '' );
259
+
260
+ // Redirect to about page
261
+ wp_safe_redirect( $redirect );
262
+ exit;
263
+ }
264
+
265
+ /**
266
+ * Display Analytic Optin notice
267
+ *
268
+ * @package Wpos Analytic
269
+ * @since 1.0
270
+ */
271
+ function wpos_anylc_optin_notice() {
272
+
273
+ global $current_screen, $wpos_analytics_module, $wpos_analytics_product;
274
+
275
+ // Taking some variables
276
+ $screen_id = isset( $current_screen->id ) ? $current_screen->id : '';
277
+
278
+ // Plugin action links
279
+ if( $screen_id == 'dashboard' && current_user_can('manage_options') && !empty( $wpos_analytics_module ) ) {
280
+ foreach ($wpos_analytics_module as $module_key => $module) {
281
+
282
+ $anylc_pdt_id = $module['id'];
283
+ $notice_transient = get_transient( 'wpos_anylc_optin_notice_'.$anylc_pdt_id );
284
+
285
+ if( $notice_transient == false ) {
286
+
287
+ $opt_in_data = wpos_anylc_get_option( $module['anylc_optin'] );
288
+ $opt_in = isset( $opt_in_data['status'] ) ? $opt_in_data['status'] : -1;
289
+ $notice_link = add_query_arg( array('message' => 'wpos-anylc-dismiss-notice', 'anylc_id' => $anylc_pdt_id), admin_url('index.php') );
290
+
291
+ // If user has opt in
292
+ if( $opt_in == -1 ) {
293
+
294
+ $anylc_pdt_name = $module['name'];
295
+ $anylc_optin_url = wpos_anylc_optin_url( $module, $opt_in );
296
+
297
+ echo '<div class="updated notice wpos-anylc-notice wpos-anylc-optin-notice">
298
+ <p><strong>'.$anylc_pdt_name.'</strong> - We made a few tweaks to the plugin, <a href="'.esc_url( $anylc_optin_url ).'">Opt in to make it Better!</a></p>
299
+ <a href="'.esc_url( $notice_link ).'" class="notice-dismiss"></a>
300
+ </div>';
301
+ }
302
+ }
303
+ }
304
+ } // End of if
305
+
306
+ if( isset($_GET['message']) && $_GET['message'] == 'optout_success' ) {
307
+ echo '<div class="updated notice wpos-anylc-optin-notice is-dismissible">
308
+ <p><strong>Sorry to let you go. You are now opted out from the plugin.</strong></p>
309
+ </div>';
310
+ }
311
+
312
+ // Process Promotion Data
313
+ if( !empty($_GET['message']) && $_GET['message'] == 'wpos_anylc_promotion' && !empty($_GET['wpos_anylc_pdt']) && !empty($_GET['wpos_anylc_promo_pdt']) ) {
314
+
315
+ $promotion = 1;
316
+ $promotion_pdt = explode( ',', $_GET['wpos_anylc_promo_pdt'] );
317
+
318
+ $anylc_pdt = $_GET['wpos_anylc_pdt'];
319
+ $anylc_pdt_data = isset( $wpos_analytics_product[ $anylc_pdt ] ) ? $wpos_analytics_product[ $anylc_pdt ] : false;
320
+
321
+ if( !empty($promotion_pdt) ) {
322
+ foreach ($promotion_pdt as $pdt_key => $pdt) {
323
+ if( isset( $anylc_pdt_data['promotion'][$pdt]['file'] ) ) {
324
+ $promotion_pdt_data[] = '<a href="'.$anylc_pdt_data['promotion'][$pdt]['file'].'">'.$anylc_pdt_data['promotion'][$pdt]['name'].'</a>';
325
+ }
326
+ }
327
+ }
328
+
329
+ if( $promotion_pdt_data ) {
330
+ echo '<div class="updated notice wpos-anylc-optin-notice is-dismissible" style="display:block !important;">
331
+ <p><strong>Your Download has been started. In case if it is intrupted then download it from here. '.join(' | ', $promotion_pdt_data).'</strong></p>
332
+ </div>';
333
+ }
334
+ }
335
+ }
336
+
337
+ /**
338
+ * Analytic Optout Popup HTML
339
+ *
340
+ * @package Wpos Analytic
341
+ * @since 1.0
342
+ */
343
+ function wpos_anylc_optout_popup() {
344
+
345
+ global $pagenow, $wpos_analytics_module;
346
+
347
+ if( $pagenow == 'plugins.php' && !empty( $wpos_analytics_module ) ) {
348
+ foreach ($wpos_analytics_module as $module_key => $module) {
349
+
350
+ $opt_in_data = wpos_anylc_get_option( $module['anylc_optin'] );
351
+ $opt_in = isset( $opt_in_data['status'] ) ? $opt_in_data['status'] : false;
352
+
353
+ // If user has opt in
354
+ if( $opt_in == 1 ) {
355
+
356
+ $opt_out_link = wpos_anylc_optout_url( $module, $opt_in );
357
+
358
+ include( WPOS_ANYLC_DIR .'/templates/optout-popup.php' );
359
+ }
360
+ }
361
+ }
362
+ }
363
+
364
+ /**
365
+ * Analytic Action Process
366
+ *
367
+ * @package Wpos Analytic
368
+ * @since 1.0
369
+ */
370
+ function wpos_anylc_action_process() {
371
+
372
+ // Skip if not admin area
373
+ if ( !is_admin() ) {
374
+ return false;
375
+ }
376
+
377
+ if( !empty($_GET['wpos_anylc_action']) && isset($_GET['_wpnonce']) ) {
378
+
379
+ global $wpos_analytics_product;
380
+
381
+ $anylc_pdt = !empty( $_GET['wpos_anylc_pdt'] ) ? $_GET['wpos_anylc_pdt'] : '';
382
+ $anylc_pdt = ( ! $anylc_pdt && !empty( $_GET['page'] ) ) ? $_GET['page'] : $anylc_pdt;
383
+ $anylc_pdt_data = isset( $wpos_analytics_product[ $anylc_pdt ] ) ? $wpos_analytics_product[ $anylc_pdt ] : false;
384
+
385
+ // If valid product data found
386
+ if( $anylc_pdt_data ) {
387
+
388
+ // Process Optin
389
+ if( $_GET['wpos_anylc_action'] == 'optin' ) {
390
+
391
+ // Verify nonce
392
+ if( ! wp_verify_nonce( $_GET['_wpnonce'], 'wpos_anylc_act' ) ) {
393
+ wp_die( __('Sorry, Something happened wrong.', 'wpos_analytic'), 'wpos_anylc_err', array('back_link' => true) );
394
+ }
395
+
396
+ $opt_in_data = wpos_anylc_update_option( $anylc_pdt_data['anylc_optin'], array('status' => 1) );
397
+
398
+ // Redirect to original menu
399
+ $redirect_url = wpos_anylc_pdt_url( $anylc_pdt_data, 'offer-promotion' );
400
+ if( $redirect_url ) {
401
+ wp_redirect( $redirect_url );
402
+ exit;
403
+ }
404
+ }
405
+
406
+
407
+ // Process Skip
408
+ if( $_GET['wpos_anylc_action'] == 'skip' ) {
409
+
410
+ // Verify nonce
411
+ if( ! wp_verify_nonce( $_GET['_wpnonce'], 'wpos_anylc_act' ) ) {
412
+ wp_die( __('Sorry, Something happened wrong.', 'wpos_analytic'), 'wpos_anylc_err', array('back_link' => true) );
413
+ }
414
+
415
+ $optin_form_data = wpos_anylc_optin_data();
416
+ $optin_form_data['wpos_anylc_action'] = 'skip';
417
+
418
+ $anylc_args = array(
419
+ 'timeout' => 60,
420
+ 'sslverify' => false,
421
+ 'body' => $optin_form_data,
422
+ );
423
+
424
+ // Post back to get a response.
425
+ $response = wp_safe_remote_post( 'http://analytics.wponlinesupport.com', $anylc_args );
426
+
427
+ if( wp_remote_retrieve_response_code( $response ) == 200 ) {
428
+ $opt_in_data = wpos_anylc_update_option( $anylc_pdt_data['anylc_optin'], array('status' => 2) );
429
+ }
430
+
431
+ // Redirect to original menu
432
+ $redirect_url = wpos_anylc_pdt_url( $anylc_pdt_data, 'offer' );
433
+ if( $redirect_url ) {
434
+ wp_redirect( $redirect_url );
435
+ exit;
436
+ }
437
+ }
438
+
439
+
440
+ // Process Opt Out
441
+ if( $_GET['wpos_anylc_action'] == 'optout' ) {
442
+
443
+ // Verify nonce
444
+ if( ! wp_verify_nonce( $_GET['_wpnonce'], 'wpos_anylc_act'.'|'.$_GET['wpos_anylc_pdt'] ) ) {
445
+ wp_die( __('Sorry, Something happened wrong.', 'wpos_analytic'), 'wpos_anylc_err', array('back_link' => true) );
446
+ }
447
+
448
+ $optin_form_data = wpos_anylc_optin_data();
449
+ $optin_form_data['wpos_anylc_action'] = 'optout';
450
+
451
+ $anylc_args = array(
452
+ 'timeout' => 60,
453
+ 'sslverify' => false,
454
+ 'body' => $optin_form_data,
455
+ );
456
+
457
+ // Post back to get a response.
458
+ $response = wp_safe_remote_post( 'http://analytics.wponlinesupport.com', $anylc_args );
459
+
460
+ if( wp_remote_retrieve_response_code( $response ) == 200 ) {
461
+ $opt_in_data = wpos_anylc_update_option( $anylc_pdt_data['anylc_optin'], array('status' => 0) );
462
+ }
463
+
464
+ // Redirect to original menu
465
+ $redirect_url = isset( $_GET['redirect'] ) ? $_GET['redirect'] : wpos_anylc_pdt_url( $anylc_pdt_data );
466
+ $redirect_url = add_query_arg( array( 'message' => 'optout_success' ), $redirect_url );
467
+ if( $redirect_url ) {
468
+ wp_redirect( $redirect_url );
469
+ exit;
470
+ }
471
+ }
472
+ }
473
+ } // End of main if
474
+ }
475
+ }
476
+
477
+ $wpos_anylc_admin = new Wpos_Anylc_Admin();
wpos-analytics/includes/class-anylc-script.php ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Script Class
4
+ *
5
+ * Handles the script and style
6
+ *
7
+ * @package Wpos Analytic
8
+ * @since 1.0
9
+ */
10
+
11
+ if ( !defined( 'ABSPATH' ) ) {
12
+ exit; // Exit if accessed directly
13
+ }
14
+
15
+ class Wpos_Anylc_Script {
16
+
17
+ function __construct() {
18
+
19
+ // Action to add style backend
20
+ add_action( 'admin_enqueue_scripts', array($this, 'wpos_anylc_admin_script_style') );
21
+ }
22
+
23
+ /**
24
+ * Enqueue script for backend
25
+ *
26
+ * @package Wpos Analytic
27
+ * @since 1.0
28
+ */
29
+ function wpos_anylc_admin_script_style( $hook ) {
30
+
31
+ // Process Promotion Data
32
+ if( !empty($_GET['message']) && $_GET['message'] == 'wpos_anylc_promotion' && !empty($_GET['wpos_anylc_pdt']) && !empty($_GET['wpos_anylc_promo_pdt']) ) {
33
+ global $wpos_analytics_product;
34
+
35
+ $promotion = 1;
36
+ $promotion_pdt = explode( ',', $_GET['wpos_anylc_promo_pdt'] );
37
+
38
+ $anylc_pdt = $_GET['wpos_anylc_pdt'];
39
+ $anylc_pdt_data = isset( $wpos_analytics_product[ $anylc_pdt ] ) ? $wpos_analytics_product[ $anylc_pdt ] : false;
40
+
41
+ if( !empty($promotion_pdt) ) {
42
+ foreach ($promotion_pdt as $pdt_key => $pdt) {
43
+ if( isset( $anylc_pdt_data['promotion'][$pdt]['file'] ) ) {
44
+ $promotion_pdt_data[] = $anylc_pdt_data['promotion'][$pdt]['file'];
45
+ }
46
+ }
47
+ }
48
+ }
49
+
50
+ // Registring admin Style
51
+ wp_register_style( 'wpos-anylc-admin-style', WPOS_ANYLC_URL.'assets/css/wpos-anylc-admin.css', null, WPOS_ANYLC_VERSION );
52
+ wp_enqueue_style( 'wpos-anylc-admin-style' );
53
+
54
+ // Registring admin script
55
+ wp_register_script( 'wpos-anylc-admin-script', WPOS_ANYLC_URL.'assets/js/wpos-anylc-admin.js', array('jquery'), WPOS_ANYLC_VERSION, true );
56
+ wp_localize_script( 'wpos-anylc-admin-script', 'WposAnylc', array(
57
+ 'promotion' => isset($promotion) ? 1 : 0,
58
+ 'promotion_pdt' => isset( $promotion_pdt_data ) ? $promotion_pdt_data : 0,
59
+ ));
60
+ wp_enqueue_script( 'wpos-anylc-admin-script' );
61
+ }
62
+ }
63
+
64
+ $wpos_anylc_script = new Wpos_Anylc_Script();
wpos-analytics/includes/wpos-anylc-function.php ADDED
@@ -0,0 +1,311 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Common Functions
4
+ *
5
+ * @package Wpos Analytic
6
+ * @since 1.0
7
+ */
8
+
9
+ if ( !defined( 'ABSPATH' ) ) {
10
+ exit; // Exit if accessed directly
11
+ }
12
+
13
+ /**
14
+ * Retrieve the translation of $text.
15
+ *
16
+ * @package Wpos Analytic
17
+ * @since 1.0
18
+ */
19
+ function wpos_anylc_text( $text, $echo = false ) {
20
+
21
+ if( $echo ) {
22
+ _e( $text, '' );
23
+ } else {
24
+ __( $text, '' );
25
+ }
26
+ }
27
+
28
+ /**
29
+ * Check Multidimention Array
30
+ *
31
+ * @package Wpos Analytic
32
+ * @since 1.0
33
+ */
34
+ function wpos_anylc_is_multi_arr( $arr ) {
35
+ rsort( $arr );
36
+ return isset( $arr[0] ) && is_array( $arr[0] );
37
+ }
38
+
39
+ /**
40
+ * Get site unique id
41
+ *
42
+ * @package Wpos Analytic
43
+ * @since 1.0.0
44
+ */
45
+ function wpos_anylc_site_uid() {
46
+
47
+ $site_uid = get_option( 'wpos_anylc_site_uid' );
48
+
49
+ // Generate new site id if not exist
50
+ if( empty( $site_uid ) ) {
51
+ $site_url = untrailingslashit( get_bloginfo('wpurl') );
52
+ $site_uid = md5( $site_url . SECURE_AUTH_KEY );
53
+
54
+ update_option( 'wpos_anylc_site_uid', $site_uid );
55
+ }
56
+
57
+ return $site_uid;
58
+ }
59
+
60
+ /**
61
+ * Get Optin Data
62
+ *
63
+ * @package Wpos Analytic
64
+ * @since 1.0.0
65
+ */
66
+ function wpos_anylc_optin_data( $anylc_pdt = false ) {
67
+
68
+ // Skip if not admin area
69
+ if ( !is_admin() ) {
70
+ return false;
71
+ }
72
+
73
+ global $current_user, $wpos_analytics_product;
74
+
75
+ // Takind some data
76
+ $theme_data = wp_get_theme();
77
+ $page = isset( $_GET['page'] ) ? $_GET['page'] : false;
78
+
79
+ // If product is not passed
80
+ if( ! $anylc_pdt ) {
81
+ $anylc_pdt = !empty( $_GET['wpos_anylc_pdt'] ) ? $_GET['wpos_anylc_pdt'] : '';
82
+ $anylc_pdt = ( ! $anylc_pdt && !empty( $_GET['page'] ) ) ? $_GET['page'] : $anylc_pdt;
83
+ }
84
+
85
+ // If a valid product is there
86
+ if( $anylc_pdt && !empty( $wpos_analytics_product[ $anylc_pdt ] ) ) {
87
+
88
+ $analy_product = $wpos_analytics_product[ $anylc_pdt ];
89
+ $return_url = add_query_arg( array( 'page' => $page ), admin_url('admin.php') );
90
+ $return_url = wp_nonce_url( $return_url, 'wpos_anylc_act' );
91
+
92
+ // Getting data according to type
93
+ if( $analy_product['type'] == 'theme' ) {
94
+
95
+ $product_name = $theme_data->get( 'Name' );
96
+ $product_version = $theme_data->get( 'Version' );
97
+
98
+ } else {
99
+
100
+ if( !function_exists('get_plugin_data') ) {
101
+ require_once(ABSPATH . 'wp-admin/includes/plugin.php');
102
+ }
103
+
104
+ $plugin_data = get_plugin_data( trailingslashit(WP_PLUGIN_DIR) . $analy_product['file'] );
105
+ $product_name = !empty( $plugin_data['Name'] ) ? $plugin_data['Name'] : '';
106
+ $product_version = !empty( $plugin_data['Version'] ) ? $plugin_data['Version'] : '';
107
+ }
108
+ }
109
+
110
+ $optin_data = array(
111
+ 'site_url' => untrailingslashit( get_bloginfo('wpurl') ),
112
+ 'site_name' => get_bloginfo( 'name' ),
113
+ 'wp_version' => get_bloginfo( 'version' ),
114
+ 'language' => get_bloginfo( 'language' ),
115
+ 'is_rtl' => is_rtl() ? 1 : 0,
116
+ 'php_version' => phpversion(),
117
+ 'sdk_version' => WPOS_ANYLC_VERSION,
118
+ 'product_name' => isset( $product_name ) ? $product_name : '',
119
+ 'product_version' => isset( $product_version ) ? $product_version : '',
120
+ 'product_id' => !empty( $analy_product['id'] ) ? $analy_product['id'] : 0,
121
+ 'product_type' => !empty( $analy_product['type'] ) ? $analy_product['type'] : '',
122
+ 'theme_name' => $theme_data->get( 'Name' ),
123
+ 'theme_uri' => $theme_data->get( 'ThemeURI' ),
124
+ 'theme_author' => $theme_data->get( 'Author' ),
125
+ 'theme_author_uri' => $theme_data->get( 'AuthorURI' ),
126
+ 'theme_version' => $theme_data->get( 'Version' ),
127
+ 'user_firstname' => $current_user->user_firstname,
128
+ 'user_lastname' => $current_user->user_lastname,
129
+ 'user_nickname' => $current_user->user_nicename,
130
+ 'user_email' => get_bloginfo( 'admin_email' ),
131
+ 'ip_address' => wpos_anylc_get_ip_address(),
132
+ 'site_uid' => wpos_anylc_site_uid(),
133
+ 'return_url' => !empty( $return_url ) ? $return_url : '',
134
+ );
135
+ return $optin_data;
136
+ }
137
+
138
+ /**
139
+ * Get IP Address
140
+ *
141
+ * @package Wpos Analytic
142
+ * @since 1.0.0
143
+ */
144
+ function wpos_anylc_get_ip_address() {
145
+ if ( isset( $_SERVER['HTTP_X_REAL_IP'] ) ) { // WPCS: input var ok, CSRF ok.
146
+ return sanitize_text_field( wp_unslash( $_SERVER['HTTP_X_REAL_IP'] ) ); // WPCS: input var ok, CSRF ok.
147
+ } elseif ( isset( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) { // WPCS: input var ok, CSRF ok.
148
+ // Proxy servers can send through this header like this: X-Forwarded-For: client1, proxy1, proxy2
149
+ // Make sure we always only send through the first IP in the list which should always be the client IP.
150
+ return (string) rest_is_ip_address( trim( current( preg_split( '/[,:]/', sanitize_text_field( wp_unslash( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) ) ) ) ); // WPCS: input var ok, CSRF ok.
151
+ } elseif ( isset( $_SERVER['REMOTE_ADDR'] ) ) { // @codingStandardsIgnoreLine
152
+ return sanitize_text_field( wp_unslash( $_SERVER['REMOTE_ADDR'] ) ); // @codingStandardsIgnoreLine
153
+ }
154
+ return '127.0.0.1';
155
+ }
156
+
157
+ /**
158
+ * Get Product Optin Data
159
+ *
160
+ * @package Wpos Analytic
161
+ * @since 1.0.0
162
+ */
163
+ function wpos_anylc_get_option( $key = '' ) {
164
+
165
+ $opt_in_data = array();
166
+
167
+ if( !empty( $key ) ) {
168
+ $opt_in_data = get_option( $key );
169
+ $opt_in_data = ( !empty($opt_in_data) && is_array($opt_in_data) ) ? $opt_in_data : array();
170
+ }
171
+ return $opt_in_data;
172
+ }
173
+
174
+ /**
175
+ * Get Product Optin Data
176
+ *
177
+ * @package Wpos Analytic
178
+ * @since 1.0.0
179
+ */
180
+ function wpos_anylc_update_option( $key = '', $data = array() ) {
181
+
182
+ $opt_in_data = array();
183
+
184
+ if( !empty( $key ) ) {
185
+ $opt_in_data = wpos_anylc_get_option( $key );
186
+
187
+ if( is_array($data) ) {
188
+ $opt_in_data = array_merge( $opt_in_data, $data );
189
+ update_option( $key, $opt_in_data );
190
+ }
191
+ }
192
+ return $opt_in_data;
193
+ }
194
+
195
+ /**
196
+ * Get Analytic Product Optin URL
197
+ *
198
+ * @package Wpos Analytic
199
+ * @since 1.0.0
200
+ */
201
+ function wpos_anylc_optin_url( $module_data = '', $optin_status = null ) {
202
+
203
+ $optin_url = false;
204
+
205
+ // Optin Status
206
+ if( ! isset( $optin_status ) ) {
207
+ $opt_in_data = get_option( $module_data['anylc_optin'] );
208
+ $optin_status = isset( $opt_in_data['status'] ) ? $opt_in_data['status'] : null;
209
+ }
210
+
211
+ if( !empty( $module_data['menu'] ) && !empty( $module_data['slug'] ) ) {
212
+ $url_data = parse_url( $module_data['menu'], PHP_URL_QUERY );
213
+ $query_data = !empty( $url_data ) ? parse_str( $url_data, $query_arr ) : array();
214
+
215
+ if( !empty( $query_arr['post_type'] ) && $optin_status >= 0 ) { // If Optin is done and post type menu
216
+
217
+ $optin_url = add_query_arg( array( 'post_type' => $query_arr['post_type'], 'page' => $module_data['slug'], 'anylc_optin_menu' => true ), admin_url('edit.php') );
218
+
219
+ } else if( empty( $query_arr['post_type'] ) && $optin_status >= 0 ) { // If Optin is done and simple admin menu
220
+
221
+ $optin_url = add_query_arg( array( 'page' => $module_data['slug'], 'anylc_optin_menu' => true ), admin_url('admin.php') );
222
+
223
+ } else {
224
+ $optin_url = add_query_arg( array( 'page' => $module_data['slug'] ), admin_url('admin.php') );
225
+ }
226
+ }
227
+
228
+ return $optin_url;
229
+ }
230
+
231
+ /**
232
+ * Get Analytic Product Opt Out URL
233
+ *
234
+ * @package Wpos Analytic
235
+ * @since 1.0.0
236
+ */
237
+ function wpos_anylc_optout_url( $module_data = '', $optin_status = null, $redirect_url = false ) {
238
+
239
+ $opt_out_link = false;
240
+
241
+ // Optin Status
242
+ if( !isset( $optin_status ) ) {
243
+ $opt_in_data = get_option( $module_data['anylc_optin'] );
244
+ $optin_status = isset( $opt_in_data['status'] ) ? $opt_in_data['status'] : null;
245
+ }
246
+
247
+ if( $optin_status == 1 ) {
248
+
249
+ if( ! $redirect_url ) {
250
+ $plugin_status = isset( $_GET['plugin_status'] ) ? $_GET['plugin_status'] : false;
251
+ $paged = isset( $_GET['paged'] ) ? $_GET['paged'] : false;
252
+ $s = isset( $_GET['s'] ) ? $_GET['s'] : false;
253
+
254
+ $redirect_url = add_query_arg( array( 'plugin_status' => $plugin_status, 'paged' => $paged, 's' => $s ), admin_url( 'plugins.php' ) );
255
+ }
256
+
257
+ $opt_out_link = add_query_arg( array( 'wpos_anylc_action' => 'optout', 'wpos_anylc_pdt' => $module_data['slug'], 'redirect' => $redirect_url ), $redirect_url );
258
+ $opt_out_link = wp_nonce_url( $opt_out_link, 'wpos_anylc_act'.'|'.$module_data['slug'] );
259
+ }
260
+
261
+ return $opt_out_link;
262
+ }
263
+
264
+ /**
265
+ * Get Analytic Product URL
266
+ *
267
+ * @package Wpos Analytic
268
+ * @since 1.0.0
269
+ */
270
+ function wpos_anylc_pdt_url( $module_data = '', $type = false ) {
271
+
272
+ $redirect_url = false;
273
+
274
+ if( !empty( $module_data['menu'] ) ) {
275
+ $pos = strpos( $module_data['menu'], '?post_type' );
276
+ $redirect_url = ( $pos !== false ) ? admin_url( $module_data['menu'] ) : add_query_arg( array( 'page' => $module_data['menu'] ), admin_url('admin.php') );
277
+
278
+ switch ( $type ) {
279
+ case 'promotion':
280
+
281
+ $promotion = !empty( $_GET['promotion'] ) ? $_GET['promotion'] : '';
282
+
283
+ if( !empty( $promotion ) ) {
284
+ $promotion = is_array( $promotion ) ? implode( ',', $promotion ) : $promotion;
285
+ $redirect_url = add_query_arg( array( 'message' => 'wpos_anylc_promotion', 'wpos_anylc_pdt' => $module_data['slug'], 'wpos_anylc_promo_pdt' => $promotion ), $redirect_url );
286
+ }
287
+ break;
288
+
289
+ case 'offer':
290
+
291
+ if( !empty( $module_data['offers'] ) ) {
292
+ $redirect_url = add_query_arg( array( 'page' => $module_data['slug'].'-offers' ), $redirect_url );
293
+ }
294
+ break;
295
+
296
+ case 'offer-promotion':
297
+
298
+ $promotion = !empty( $_GET['promotion'] ) ? $_GET['promotion'] : '';
299
+
300
+ if( !empty( $module_data['offers'] ) ) {
301
+ $redirect_url = add_query_arg( array( 'page' => $module_data['slug'].'-offers' ), $redirect_url );
302
+ }
303
+ if( !empty( $promotion ) ) {
304
+ $promotion = is_array( $promotion ) ? implode( ',', $promotion ) : $promotion;
305
+ $redirect_url = add_query_arg( array( 'message' => 'wpos_anylc_promotion', 'wpos_anylc_pdt' => $module_data['slug'], 'wpos_anylc_promo_pdt' => $promotion ), $redirect_url );
306
+ }
307
+ break;
308
+ }
309
+ }
310
+ return $redirect_url;
311
+ }
wpos-analytics/templates/analytic.php ADDED
@@ -0,0 +1,99 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Settings Page
4
+ *
5
+ * @package Wpos Analytic
6
+ * @since 1.0.0
7
+ */
8
+
9
+ if ( !defined( 'ABSPATH' ) ) {
10
+ exit; // Exit if accessed directly
11
+ }
12
+ ?>
13
+ <style type="text/css">
14
+ .notice, .error, div.fs-notice.updated, div.fs-notice.success, div.fs-notice.promotion{display:none !important;}
15
+ </style>
16
+
17
+ <div class="wrap wpos-anylc-optin">
18
+
19
+ <?php if( isset($_GET['error']) && $_GET['error'] == 'wpos_anylc_error' ) { ?>
20
+ <div class="error">
21
+ <p><strong>Sorry, Something happened wrong. Please contact us on <a href="mailto:support@wponlinesupport.com">support@wponlinesupport.com</a></strong></p>
22
+ </div>
23
+ <?php } ?>
24
+
25
+ <form method="POST" action="http://analytics.wponlinesupport.com">
26
+ <div class="wpos-anylc-optin-wrap">
27
+ <div class="wpos-anylc-optin-icon-wrap">
28
+ <div class="wpos-anylc-optin-icon wpos-anylc-wp-badge"><i class="dashicons dashicons-wordpress"></i></div>
29
+ <div class="wpos-anylc-optin-plus"><i class="dashicons dashicons-plus"></i></div>
30
+ <div class="wpos-anylc-optin-icon"><img src="<?php echo $analy_product['icon']; ?>" alt="Icon" /></div>
31
+ <div class="wpos-anylc-optin-plus"><i class="dashicons dashicons-plus"></i></div>
32
+ <div class="wpos-anylc-optin-icon"><img src="<?php echo $analy_product['brand_icon']; ?>" alt="Icon" /></div>
33
+ </div>
34
+ <div class="wpos-anylc-optin-cnt">
35
+ <p>Hey <?php echo ucfirst($user_name); ?>,</p>
36
+ <p>Don't ever miss an opportunity to <b>opt in</b> for Email Notifications / Announcements about exciting New Features and Update Releases.</p>
37
+ <p>Contribute in helping us making <b><?php echo $product_name; ?></b> compatible with most themes and plugins by allowing to share non-sensitive data to <a target="_blank" href="https://www.wponlinesupport.com">wponlinesupport.com</a> about your website.</p>
38
+ <p>If you skip this, that's okay! <b><?php echo $product_name; ?></b> will still work just fine.</p>
39
+
40
+ <div class="wpos-anylc-subs-wrap">
41
+ <input type="hidden" name="subscribe" value="" />
42
+ <label><input type="checkbox" value="1" name="subscribe" checked="checked" /> Subscribe for Updates and Promotions</label>
43
+ </div>
44
+
45
+ <?php if( !empty( $analy_product['promotion'] ) ) { ?>
46
+ <div class="wpos-anylc-promotion-wrap">
47
+ <?php foreach( $analy_product['promotion'] as $promotion_key => $promotion_data ) { ?>
48
+ <div><label><input type="checkbox" value="<?php echo $promotion_key; ?>" name="promotion[]" checked="checked" /> <?php echo $promotion_data['name']; ?></label></div>
49
+ <?php } ?>
50
+ </div>
51
+ <?php } ?>
52
+ </div>
53
+ <div class="wpos-anylc-optin-action wpos-anylc-clearfix">
54
+ <button type="submit" name="wpos_anylc_optin" class="button button-primary button-large right wpos-anylc-allow-btn" value="wpos_anylc_optin">Allow and Continue</button>
55
+
56
+ <?php if( is_null( $opt_in ) ) { ?>
57
+ <a href="<?php echo esc_url( $skip_url ); ?>" class="button button-secondary button-large wpos-anylc-skip-btn">Skip</a>
58
+ <?php }
59
+
60
+ if( !empty( $optin_form_data ) ) {
61
+ foreach ($optin_form_data as $data_key => $data_value) {
62
+ echo '<input type="hidden" name="'.esc_attr( $data_key ).'" value="'.esc_attr( $data_value ).'" />';
63
+ }
64
+ }
65
+ ?>
66
+ </div>
67
+ <div class="wpos-anylc-optin-permission">
68
+ <a class="wpos-anylc-permission-toggle" href="javascript:void(0);">What permissions are being granted?</a>
69
+
70
+ <div class="wpos-anylc-permission-wrap wpos-anylc-hide">
71
+ <div class="wpos-anylc-permission">
72
+ <i class="dashicons dashicons-admin-users"></i>
73
+ <div>
74
+ <span class="wpos-anylc-permission-name">Your Profile Overview</span>
75
+ <span class="wpos-anylc-permission-info">Name and email address</span>
76
+ </div>
77
+ </div>
78
+ <div class="wpos-anylc-permission">
79
+ <i class="dashicons dashicons-admin-settings"></i>
80
+ <div>
81
+ <span class="wpos-anylc-permission-name">Your Site Overview</span>
82
+ <span class="wpos-anylc-permission-info">Site URL, WP version, PHP info & Theme</span>
83
+ </div>
84
+ </div>
85
+ <div class="wpos-anylc-permission">
86
+ <i class="dashicons dashicons-admin-plugins"></i>
87
+ <div>
88
+ <span class="wpos-anylc-permission-name">Current Plugin Events</span>
89
+ <span class="wpos-anylc-permission-info">Activation, Deactivation and Uninstall</span>
90
+ </div>
91
+ </div>
92
+ </div>
93
+ </div>
94
+ <div class="wpos-anylc-terms">
95
+ <a href="https://www.wponlinesupport.com/privacy-policy/" target="_blank">Privacy Policy</a> - <a href="https://www.wponlinesupport.com/term-and-condition/" target="_blank">Terms of Service</a>
96
+ </div>
97
+ </div>
98
+ </form>
99
+ </div><!-- end .wrap -->
wpos-analytics/templates/offers.php ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Offers Page
4
+ *
5
+ * @package Wpos Analytic
6
+ * @since 1.0.0
7
+ */
8
+
9
+ if ( !defined( 'ABSPATH' ) ) {
10
+ exit; // Exit if accessed directly
11
+ }
12
+ ?>
13
+ <style type="text/css">
14
+ .notice, .error, div.fs-notice.updated, div.fs-notice.success, div.fs-notice.promotion{display:none !important;}
15
+ </style>
16
+
17
+ <div class="wrap wpos-anylc-offers">
18
+
19
+ <?php foreach ($analy_product['offers'] as $offer_key => $offer_data) {
20
+
21
+ // If status wise offer is there
22
+ if( wpos_anylc_is_multi_arr( $offer_data ) ) {
23
+ $offer_data = isset( $offer_data[ $opt_in ] ) ? $offer_data[ $opt_in ] : false;
24
+ }
25
+
26
+ if( empty( $offer_data ) ) {
27
+ continue;
28
+ }
29
+
30
+ $has_offer = true;
31
+ $link = isset( $offer_data['link'] ) ? $offer_data['link'] : '';
32
+ $image = !empty( $offer_data['image'] ) ? add_query_arg( array('v' => time()), $offer_data['image'] ) : '';
33
+ ?>
34
+
35
+ <div class="wpos-anylc-offer-wrap">
36
+ <?php if( !empty( $offer_data['name'] ) ) { ?>
37
+ <div class="wpos-anylc-offer-title wpos-anylc-center"><?php echo $offer_data['name']; ?></div>
38
+ <?php } ?>
39
+
40
+ <?php if( $image ) { ?>
41
+ <div class="wpos-anylc-offer-body wpos-anylc-center">
42
+ <?php if( $link ) { ?>
43
+ <a href="<?php echo esc_url( $link ); ?>" target="_blank">
44
+ <img src="<?php echo esc_url( $image ); ?>" alt="" />
45
+ </a>
46
+ <?php } else { ?>
47
+ <img src="<?php echo esc_url( $image ); ?>" alt="" />
48
+ <?php } ?>
49
+ </div>
50
+ <?php } ?>
51
+
52
+ <?php if( !empty( $offer_data['desc'] ) ) { ?>
53
+ <div class="wpos-anylc-offer-desc wpos-anylc-center"><?php echo wpautop( $offer_data['desc'] ); ?></div>
54
+ <?php } ?>
55
+
56
+ <?php if( !empty( $offer_data['button'] ) ) { ?>
57
+ <div class="wpos-anylc-offer-footer wpos-anylc-center"><a href="<?php echo esc_url( $link ); ?>" class="button button-primary button-large wpos-anylc-btn" target="_blank"><?php echo $offer_data['button']; ?></a></div>
58
+ <?php } ?>
59
+ </div>
60
+
61
+ <?php } // End of foreach
62
+
63
+ // If no offer to display then redirect to main plugin screen
64
+ if( empty( $has_offer ) ) {
65
+ $redirect_url = wpos_anylc_pdt_url( $analy_product ); // Redirect URL
66
+ ?>
67
+ Please Wait... Redirecting to plugin screen. <a href="<?php echo $redirect_url; ?>">Click Here</a> in case you are not auto redirect.
68
+ <script type="text/javascript">
69
+ window.location = "<?php echo $redirect_url; ?>";
70
+ </script>
71
+ <?php } ?>
72
+
73
+ </div><!-- end .wrap -->
wpos-analytics/templates/optout-popup.php ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Analytic Optout Popup
4
+ *
5
+ * @package Wpos Analytic
6
+ * @since 1.0
7
+ */
8
+
9
+ if ( !defined( 'ABSPATH' ) ) {
10
+ exit; // Exit if accessed directly
11
+ }
12
+ ?>
13
+ <div class="wpos-anylc-popup wpos-anylc-popup-wrp wpos-anylc-hide" id="wpos-anylc-optout-<?php echo $module['id']; ?>">
14
+ <div class="wpos-anylc-popup-inr-wrp">
15
+ <div class="wpos-anylc-popup-block">
16
+
17
+ <div class="wpos-anylc-popup-header">Opt Out</div>
18
+ <div class="wpos-anylc-popup-body">
19
+ <p class="wpos-anylc-popup-heading">We appreciate your help to make the plugin better by letting us track some usage data.</p>
20
+ <p>Usage tracking is done in the name of making <b><?php echo $module['name']; ?></b> better. Making a better user experience, prioritizing new features, and more good things. We'd really appreciate if you'll reconsider letting us continue with the tracking.</p>
21
+ <p>By clicking "Opt Out", we will no longer be sending any data from <b><?php echo $module['name']; ?></b> to <a href="https://www.wponlinesupport.com/" target="_blank">wponlinesupport.com</a>.</p>
22
+ </div>
23
+ <div class="wpos-anylc-popup-footer">
24
+ <a href="<?php echo esc_url( $opt_out_link ); ?>" class="button button-secondary">Opt Out</a>
25
+ <button type="button" class="button button-primary wpos-anylc-popup-close">Sure, Let Me Continue Helping</button>
26
+ </div>
27
+
28
+ </div><!-- end .wpos-anylc-popup-block -->
29
+ </div><!-- end .wpos-anylc-popup-inr-wrp -->
30
+ </div><!-- end .wpos-anylc-popup-wrp -->
31
+ <div class="wpos-anylc-popup-overlay" id="wpos-anylc-optout-overlay-<?php echo $module['id']; ?>"></div>
wpos-analytics/wpos-analytics.php ADDED
@@ -0,0 +1,251 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * WPOS Analytics
4
+ *
5
+ * @author WP Online Support
6
+ * @package Wpos Analytic
7
+ * @since 1.0
8
+ */
9
+
10
+ if ( !defined( 'ABSPATH' ) ) {
11
+ exit; // Exit if accessed directly
12
+ }
13
+
14
+ if ( ! class_exists( 'WPOS_Analytics' ) ) :
15
+
16
+ /**
17
+ * Main Analytics Class By WP Online Support.
18
+ *
19
+ * @since 1.0
20
+ */
21
+ final class WPOS_Analytics {
22
+
23
+ /**
24
+ * @var Instance
25
+ * @since 1.0
26
+ */
27
+ protected static $instance = null;
28
+
29
+ /**
30
+ * Main Analytics Instance.
31
+ *
32
+ * Insures that only one instance of Analytics exists in memory at any one time.
33
+ * Also prevents needing to define globals all over the place.
34
+ *
35
+ * @since 1.0
36
+ * @uses WPOS_ANYLC::setup_constants() Setup the constants needed.
37
+ * @uses WPOS_ANYLC::includes() Include the required files.
38
+ * @uses WPOS_ANYLC::wpos_anylc_plugins_loaded() load the language files.
39
+ * @see PWPC()
40
+ * @return object The one true Analytics
41
+ */
42
+ public static function instance() {
43
+ if ( is_null( self::$instance ) ) {
44
+ self::$instance = new self();
45
+ }
46
+ return self::$instance;
47
+ }
48
+
49
+ /**
50
+ * Throw error on object clone.
51
+ *
52
+ * The whole idea of the singleton design pattern is that there is a single object therefore, we don't want the object to be cloned.
53
+ *
54
+ * @since 1.0
55
+ * @access protected
56
+ * @return void
57
+ */
58
+ public function __clone() {
59
+ // Cloning instances of the class is forbidden.
60
+ _doing_it_wrong( __FUNCTION__, __( 'Cheatin&#8217; huh?', 'pwpc' ), '1.0' );
61
+ }
62
+
63
+ /**
64
+ * Disable unserializing of the class.
65
+ *
66
+ * @since 1.0
67
+ * @access protected
68
+ * @return void
69
+ */
70
+ public function __wakeup() {
71
+ // Unserializing instances of the class is forbidden.
72
+ _doing_it_wrong( __FUNCTION__, __( 'Cheatin&#8217; huh?', 'pwpc' ), '1.0' );
73
+ }
74
+
75
+ /**
76
+ * Plugin Constructor.
77
+ */
78
+ public function __construct() {
79
+ $this->setup_constants();
80
+ $this->includes();
81
+
82
+ do_action( 'wpos_anylc_loaded' );
83
+ }
84
+
85
+ /**
86
+ * Define constant if not already set.
87
+ *
88
+ * @param string $name
89
+ * @param string|bool $value
90
+ */
91
+ public function define( $name, $value ) {
92
+ if ( ! defined( $name ) ) {
93
+ define( $name, $value );
94
+ }
95
+ }
96
+
97
+ /**
98
+ * Setup plugin constants. Basic plugin definitions
99
+ *
100
+ * @access private
101
+ * @since 1.0
102
+ */
103
+ private function setup_constants() {
104
+
105
+ $this->define( 'WPOS_ANYLC_VERSION', '1.0' );
106
+ $this->define( 'WPOS_ANYLC_DIR', plugin_dir_path( __FILE__ ) );
107
+ $this->define( 'WPOS_ANYLC_URL', plugin_dir_url( __FILE__ ) );
108
+ }
109
+
110
+ /**
111
+ * Include required files.
112
+ *
113
+ * @access private
114
+ * @since 1.0
115
+ */
116
+ private function includes() {
117
+
118
+ // Functions file
119
+ require_once WPOS_ANYLC_DIR .'/includes/wpos-anylc-function.php';
120
+
121
+ // Script Class
122
+ require_once WPOS_ANYLC_DIR .'/includes/class-anylc-script.php';
123
+
124
+ // Admin Class
125
+ require_once WPOS_ANYLC_DIR .'/includes/class-anylc-admin.php';
126
+ }
127
+ }
128
+
129
+ /**
130
+ *
131
+ * The main function responsible for returning the one true Analytics
132
+ * Instance to functions everywhere.
133
+ *
134
+ * Use this function like you would a global variable, except without needing
135
+ * to declare the global.
136
+ *
137
+ * Example: <?php $wpos_anylc = WPOS_ANYLC(); ?>
138
+ *
139
+ * @since 1.0
140
+ * @return object The one true Analytics Instance.
141
+ */
142
+ function WPOS_ANYLC() {
143
+ return WPOS_Analytics::instance();
144
+ }
145
+
146
+ /**
147
+ *
148
+ * Initialize Analytics Module
149
+ *
150
+ * @since 1.0
151
+ * @return object The one true Analytics Instance.
152
+ */
153
+ function wpos_anylc_init_module( $args = array() ) {
154
+
155
+ global $wpos_analytics_module, $wpos_analytics_product;
156
+
157
+ $defaul_args = array(
158
+ 'id' => null,
159
+ 'file' => null,
160
+ 'name' => null,
161
+ 'slug' => null,
162
+ 'type' => 'plugin',
163
+ 'menu' => false,
164
+ 'icon' => '',
165
+ 'text_domain' => 'wpos_analytics',
166
+ );
167
+
168
+ $args = wp_parse_args( $args, $defaul_args );
169
+
170
+ // If required data is not there then simply return
171
+ if( empty($args['id']) || empty( $args['file'] ) || empty( $args['slug'] ) ) {
172
+ return false;
173
+ }
174
+
175
+ // Additional args
176
+ $promotion = array();
177
+ $args['dir'] = pathinfo($args['file'], PATHINFO_DIRNAME);
178
+ $args['icon'] = empty( $icon ) ? trailingslashit( WP_PLUGIN_URL ).$args['dir'].'/wpos-analytics/assets/images/icon.png' : $args['icon'];
179
+ $args['brand_icon'] = plugin_dir_url( __FILE__ ).'assets/images/wpos-logo.png';
180
+ $args['anylc_optin'] = 'wpos_anylc_pdt_'.$args['id'];
181
+
182
+ if( isset( $args['promotion'] ) ) {
183
+ foreach ($args['promotion'] as $promotion_key => $promotion_data) {
184
+ if( empty( $promotion_data['name'] ) || empty( $promotion_data['file'] ) ) {
185
+ continue;
186
+ }
187
+
188
+ $promotion[$promotion_key] = $promotion_data;
189
+ }
190
+ }
191
+ $args['promotion'] = $promotion;
192
+
193
+ // Taking some variables
194
+ $wpos_analytics_module = !empty( $wpos_analytics_module ) ? $wpos_analytics_module : array();
195
+ $wpos_analytics_product = !empty( $wpos_analytics_product ) ? $wpos_analytics_product : array();
196
+
197
+ if( is_array( $wpos_analytics_module ) ) {
198
+ $wpos_analytics_module[ $args['file'] ] = $args;
199
+ }
200
+
201
+ if( is_array( $wpos_analytics_product ) ) {
202
+ $wpos_analytics_product[ $args['slug'] ] = $args;
203
+ }
204
+
205
+ return $wpos_analytics_module;
206
+ }
207
+
208
+ /**
209
+ *
210
+ * Function on any plugin deactivation
211
+ *
212
+ * @since 1.0
213
+ * @return object The one true Analytics Instance.
214
+ */
215
+ function wpos_anylc_plugin_activation( $plugin, $network_activation ) {
216
+
217
+ // return if activating from network, or bulk
218
+ if ( is_network_admin() ) {
219
+ return;
220
+ }
221
+
222
+ global $wpos_analytics_module;
223
+
224
+ if( isset( $wpos_analytics_module[ $plugin ] ) ) {
225
+
226
+ $opt_in_data = get_option( $wpos_analytics_module[ $plugin ]['anylc_optin'] );
227
+ $optin_status = isset( $opt_in_data['status'] ) ? $opt_in_data['status'] : -1;
228
+
229
+ if( $optin_status == -1 ) {
230
+ $redirect_link = add_query_arg( array('page' => $wpos_analytics_module[ $plugin ]['slug']), admin_url('admin.php') );
231
+ update_option( 'wpos_anylc_redirect', $redirect_link );
232
+ }
233
+ }
234
+ }
235
+ add_action( 'activated_plugin', 'wpos_anylc_plugin_activation', 10, 2 );
236
+
237
+ /**
238
+ *
239
+ * Initialize Analytics Class Once all stuff has been loaded
240
+ *
241
+ * @since 1.0
242
+ * @return object The one true Analytics Instance.
243
+ */
244
+ function wpos_anylc_plugins_loaded() {
245
+
246
+ // Get Analytics Running.
247
+ WPOS_ANYLC();
248
+ }
249
+ add_action( 'plugins_loaded', 'wpos_anylc_plugins_loaded', 12 );
250
+
251
+ endif; // End if class_exists check.