Custom Login Page Customizer | LoginPress - Version 1.3.2

Version Description

2019-10-23 = * Bugfix: Firefox CSS conflict with premium templates. * Bugfix: Compatible with Thrive Themes. Dequeue their stylesheet on login page only. * Enhancement: Added a filter loginpress_exclude_role_session to exclude the user roles from session expiration. * Enhancement: Compatible with Password Protected plugin. Login logo title fixed.

Download this release

Release Info

Developer hiddenpearls
Plugin Icon 128x128 Custom Login Page Customizer | LoginPress
Version 1.3.2
Comparing to
See all releases

Code changes from version 1.3.1 to 1.3.2

css/style-login.php CHANGED
@@ -914,6 +914,10 @@ text-shadow: none;
914
  #loginform .user-pass-fields {
915
  margin-bottom: 18px;
916
  position: relative;
 
 
 
 
917
  }
918
  /* LoginPress input field since 1.1.20 */
919
  /* .loginpress-input-wrap{
@@ -1018,7 +1022,408 @@ body.login label[for="authcode"]+input{
1018
  padding-left: 15px;
1019
  }
1020
  </style>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1021
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1022
  <?php // $content = ob_get_clean(); ?>
1023
  <?php if ( isset( $loginpress_display_bg_video ) && $loginpress_display_bg_video && ! empty( $loginpress_bg_video ) ) : ?>
1024
  <?php if ( ( $loginpress_theme_tem == 'default6' || $loginpress_theme_tem == 'default10' || $loginpress_theme_tem == 'default17' ) ) : ?>
914
  #loginform .user-pass-fields {
915
  margin-bottom: 18px;
916
  position: relative;
917
+ }
918
+ #login form p.submit{
919
+ position: relative;
920
+ clear: both;
921
  }
922
  /* LoginPress input field since 1.1.20 */
923
  /* .loginpress-input-wrap{
1022
  padding-left: 15px;
1023
  }
1024
  </style>
1025
+ <?php if ( ( $loginpress_theme_tem == 'default19' ) ) : ?>
1026
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/1.20.3/TweenMax.min.js"></script>
1027
+ <script>
1028
+ /*!
1029
+ * VERSION: 0.8.6
1030
+ * DATE: 2016-07-08
1031
+ * UPDATES AND DOCS AT: http://greensock.com
1032
+ *
1033
+ * @license Copyright (c) 2008-2016, GreenSock. All rights reserved.
1034
+ * MorphSVGPlugin is a Club GreenSock membership benefit; You must have a valid membership to use
1035
+ * this code without violating the terms of use. Visit http://greensock.com/club/ to sign up or get more details.
1036
+ * This work is subject to the software agreement that was issued with your membership.
1037
+ *
1038
+ * @author: Jack Doyle, jack@greensock.com
1039
+ */
1040
+ var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";var a=Math.PI/180,b=180/Math.PI,c=/[achlmqstvz]|(-?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,d=/(?:(-|-=|\+=)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,e=/[achlmqstvz]/gi,f=/[\+\-]?\d*\.?\d+e[\+\-]?\d+/gi,g=_gsScope._gsDefine.globals.TweenLite,h=function(a){window.console&&console.log(a)},i=function(b,c){var d,e,f,g,h,i,j=Math.ceil(Math.abs(c)/90),k=0,l=[];for(b*=a,c*=a,d=c/j,e=4/3*Math.sin(d/2)/(1+Math.cos(d/2)),i=0;j>i;i++)f=b+i*d,g=Math.cos(f),h=Math.sin(f),l[k++]=g-e*h,l[k++]=h+e*g,f+=d,g=Math.cos(f),h=Math.sin(f),l[k++]=g+e*h,l[k++]=h-e*g,l[k++]=g,l[k++]=h;return l},j=function(c,d,e,f,g,h,j,k,l){if(c!==k||d!==l){e=Math.abs(e),f=Math.abs(f);var m=g%360*a,n=Math.cos(m),o=Math.sin(m),p=(c-k)/2,q=(d-l)/2,r=n*p+o*q,s=-o*p+n*q,t=e*e,u=f*f,v=r*r,w=s*s,x=v/t+w/u;x>1&&(e=Math.sqrt(x)*e,f=Math.sqrt(x)*f,t=e*e,u=f*f);var y=h===j?-1:1,z=(t*u-t*w-u*v)/(t*w+u*v);0>z&&(z=0);var A=y*Math.sqrt(z),B=A*(e*s/f),C=A*-(f*r/e),D=(c+k)/2,E=(d+l)/2,F=D+(n*B-o*C),G=E+(o*B+n*C),H=(r-B)/e,I=(s-C)/f,J=(-r-B)/e,K=(-s-C)/f,L=Math.sqrt(H*H+I*I),M=H;y=0>I?-1:1;var N=y*Math.acos(M/L)*b;L=Math.sqrt((H*H+I*I)*(J*J+K*K)),M=H*J+I*K,y=0>H*K-I*J?-1:1;var O=y*Math.acos(M/L)*b;!j&&O>0?O-=360:j&&0>O&&(O+=360),O%=360,N%=360;var P,Q,R,S=i(N,O),T=n*e,U=o*e,V=o*-f,W=n*f,X=S.length-2;for(P=0;X>P;P+=2)Q=S[P],R=S[P+1],S[P]=Q*T+R*V+F,S[P+1]=Q*U+R*W+G;return S[S.length-2]=k,S[S.length-1]=l,S}},k=function(a){var b,d,e,g,i,k,l,m,n,o,p,q,r,s=(a+"").replace(f,function(a){var b=+a;return 1e-4>b&&b>-1e-4?0:b}).match(c)||[],t=[],u=0,v=0,w=s.length,x=2,y=0;if(!a||!isNaN(s[0])||isNaN(s[1]))return h("ERROR: malformed path data: "+a),t;for(b=0;w>b;b++)if(r=i,isNaN(s[b])?(i=s[b].toUpperCase(),k=i!==s[b]):b--,e=+s[b+1],g=+s[b+2],k&&(e+=u,g+=v),0===b&&(m=e,n=g),"M"===i)l&&l.length<8&&(t.length-=1,x=0),u=m=e,v=n=g,l=[e,g],y+=x,x=2,t.push(l),b+=2,i="L";else if("C"===i)l||(l=[0,0]),l[x++]=e,l[x++]=g,k||(u=v=0),l[x++]=u+1*s[b+3],l[x++]=v+1*s[b+4],l[x++]=u+=1*s[b+5],l[x++]=v+=1*s[b+6],b+=6;else if("S"===i)"C"===r||"S"===r?(o=u-l[x-4],p=v-l[x-3],l[x++]=u+o,l[x++]=v+p):(l[x++]=u,l[x++]=v),l[x++]=e,l[x++]=g,k||(u=v=0),l[x++]=u+=1*s[b+3],l[x++]=v+=1*s[b+4],b+=4;else if("Q"===i)o=e-u,p=g-v,l[x++]=u+2*o/3,l[x++]=v+2*p/3,k||(u=v=0),u+=1*s[b+3],v+=1*s[b+4],o=e-u,p=g-v,l[x++]=u+2*o/3,l[x++]=v+2*p/3,l[x++]=u,l[x++]=v,b+=4;else if("T"===i)o=u-l[x-4],p=v-l[x-3],l[x++]=u+o,l[x++]=v+p,o=u+1.5*o-e,p=v+1.5*p-g,l[x++]=e+2*o/3,l[x++]=g+2*p/3,l[x++]=u=e,l[x++]=v=g,b+=2;else if("H"===i)g=v,l[x++]=u+(e-u)/3,l[x++]=v+(g-v)/3,l[x++]=u+2*(e-u)/3,l[x++]=v+2*(g-v)/3,l[x++]=u=e,l[x++]=g,b+=1;else if("V"===i)g=e,e=u,k&&(g+=v-u),l[x++]=e,l[x++]=v+(g-v)/3,l[x++]=e,l[x++]=v+2*(g-v)/3,l[x++]=e,l[x++]=v=g,b+=1;else if("L"===i||"Z"===i)"Z"===i&&(e=m,g=n,l.closed=!0),("L"===i||Math.abs(u-e)>.5||Math.abs(v-g)>.5)&&(l[x++]=u+(e-u)/3,l[x++]=v+(g-v)/3,l[x++]=u+2*(e-u)/3,l[x++]=v+2*(g-v)/3,l[x++]=e,l[x++]=g,"L"===i&&(b+=2)),u=e,v=g;else if("A"===i){for(q=j(u,v,1*s[b+1],1*s[b+2],1*s[b+3],1*s[b+4],1*s[b+5],(k?u:0)+1*s[b+6],(k?v:0)+1*s[b+7]),d=0;d<q.length;d++)l[x++]=q[d];u=l[x-2],v=l[x-1],b+=7}else h("Error: malformed path data: "+a);return t.totalPoints=y+x,t},l=function(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q=0,r=.999999,s=a.length,t=b/((s-2)/6);for(o=2;s>o;o+=6)for(q+=t;q>r;)c=a[o-2],d=a[o-1],e=a[o],f=a[o+1],g=a[o+2],h=a[o+3],i=a[o+4],j=a[o+5],p=1/(Math.floor(q)+1),k=c+(e-c)*p,m=e+(g-e)*p,k+=(m-k)*p,m+=(g+(i-g)*p-m)*p,l=d+(f-d)*p,n=f+(h-f)*p,l+=(n-l)*p,n+=(h+(j-h)*p-n)*p,a.splice(o,4,c+(e-c)*p,d+(f-d)*p,k,l,k+(m-k)*p,l+(n-l)*p,m,n,g+(i-g)*p,h+(j-h)*p),o+=6,s+=6,q--;return a},m=function(a){var b,c,d,e,f="",g=a.length,h=100;for(c=0;g>c;c++){for(e=a[c],f+="M"+e[0]+","+e[1]+" C",b=e.length,d=2;b>d;d++)f+=(e[d++]*h|0)/h+","+(e[d++]*h|0)/h+" "+(e[d++]*h|0)/h+","+(e[d++]*h|0)/h+" "+(e[d++]*h|0)/h+","+(e[d]*h|0)/h+" ";e.closed&&(f+="z")}return f},n=function(a){for(var b=[],c=a.length-1,d=0;--c>-1;)b[d++]=a[c],b[d++]=a[c+1],c--;for(c=0;d>c;c++)a[c]=b[c];a.reversed=a.reversed?!1:!0},o=function(a){var b,c=a.length,d=0,e=0;for(b=0;c>b;b++)d+=a[b++],e+=a[b];return[d/(c/2),e/(c/2)]},p=function(a){var b,c,d,e=a.length,f=a[0],g=f,h=a[1],i=h;for(d=6;e>d;d+=6)b=a[d],c=a[d+1],b>f?f=b:g>b&&(g=b),c>h?h=c:i>c&&(i=c);return a.centerX=(f+g)/2,a.centerY=(h+i)/2,a.size=(f-g)*(h-i)},q=function(a){for(var b,c,d,e,f,g=a.length,h=a[0][0],i=h,j=a[0][1],k=j;--g>-1;)for(f=a[g],b=f.length,e=6;b>e;e+=6)c=f[e],d=f[e+1],c>h?h=c:i>c&&(i=c),d>j?j=d:k>d&&(k=d);return a.centerX=(h+i)/2,a.centerY=(j+k)/2,a.size=(h-i)*(j-k)},r=function(a,b){return b.length-a.length},s=function(a,b){var c=a.size||p(a),d=b.size||p(b);return Math.abs(d-c)<(c+d)/20?b.centerX-a.centerX||b.centerY-a.centerY:d-c},t=function(a,b){var c,d,e=a.slice(0),f=a.length,g=f-2;for(b=0|b,c=0;f>c;c++)d=(c+b)%g,a[c++]=e[d],a[c]=e[d+1]},u=function(a,b,c,d,e){var f,g,h,i,j=a.length,k=0,l=j-2;for(c*=6,g=0;j>g;g+=6)f=(g+c)%l,i=a[f]-(b[g]-d),h=a[f+1]-(b[g+1]-e),k+=Math.sqrt(h*h+i*i);return k},v=function(a,b,c){var d,e,f,g=a.length,h=o(a),i=o(b),j=i[0]-h[0],k=i[1]-h[1],l=u(a,b,0,j,k),m=0;for(f=6;g>f;f+=6)e=u(a,b,f/6,j,k),l>e&&(l=e,m=f);if(c)for(d=a.slice(0),n(d),f=6;g>f;f+=6)e=u(d,b,f/6,j,k),l>e&&(l=e,m=-f);return m/6},w=function(a,b,c){for(var d,e,f,g,h,i,j=a.length,k=99999999999,l=0,m=0;--j>-1;)for(d=a[j],i=d.length,h=0;i>h;h+=6)e=d[h]-b,f=d[h+1]-c,g=Math.sqrt(e*e+f*f),k>g&&(k=g,l=d[h],m=d[h+1]);return[l,m]},x=function(a,b,c,d,e,f){var g,h,i,j,k,l=b.length,m=0,n=Math.min(a.size||p(a),b[c].size||p(b[c]))*d,o=999999999999,q=a.centerX+e,r=a.centerY+f;for(h=c;l>h&&(g=b[h].size||p(b[h]),!(n>g));h++)i=b[h].centerX-q,j=b[h].centerY-r,k=Math.sqrt(i*i+j*j),o>k&&(m=h,o=k);return k=b[m],b.splice(m,1),k},y=function(a,b,c,d){var e,f,g,i,j,k,m,o=b.length-a.length,u=o>0?b:a,y=o>0?a:b,z=0,A="complexity"===d?r:s,B="position"===d?0:"number"==typeof d?d:.8,C=y.length,D="object"==typeof c&&c.push?c.slice(0):[c],E="reverse"===D[0]||D[0]<0,F="log"===c;if(y[0]){if(u.length>1&&(a.sort(A),b.sort(A),k=u.size||q(u),k=y.size||q(y),k=u.centerX-y.centerX,m=u.centerY-y.centerY,A===s))for(C=0;C<y.length;C++)u.splice(C,0,x(y[C],u,C,B,k,m));if(o)for(0>o&&(o=-o),u[0].length>y[0].length&&l(y[0],(u[0].length-y[0].length)/6|0),C=y.length;o>z;)i=u[C].size||p(u[C]),g=w(y,u[C].centerX,u[C].centerY),i=g[0],j=g[1],y[C++]=[i,j,i,j,i,j,i,j],y.totalPoints+=8,z++;for(C=0;C<a.length;C++)e=b[C],f=a[C],o=e.length-f.length,0>o?l(e,-o/6|0):o>0&&l(f,o/6|0),E&&!f.reversed&&n(f),c=D[C]||0===D[C]?D[C]:"auto",c&&(f.closed||Math.abs(f[0]-f[f.length-2])<.5&&Math.abs(f[1]-f[f.length-1])<.5?"auto"===c||"log"===c?(D[C]=c=v(f,e,0===C),0>c&&(E=!0,n(f),c=-c),t(f,6*c)):"reverse"!==c&&(C&&0>c&&n(f),t(f,6*(0>c?-c:c))):!E&&("auto"===c&&Math.abs(e[0]-f[0])+Math.abs(e[1]-f[1])+Math.abs(e[e.length-2]-f[f.length-2])+Math.abs(e[e.length-1]-f[f.length-1])>Math.abs(e[0]-f[f.length-2])+Math.abs(e[1]-f[f.length-1])+Math.abs(e[e.length-2]-f[0])+Math.abs(e[e.length-1]-f[1])||c%2)?(n(f),D[C]=-1,E=!0):"auto"===c?D[C]=0:"reverse"===c&&(D[C]=-1),f.closed!==e.closed&&(f.closed=e.closed=!1));return F&&h("shapeIndex:["+D.join(",")+"]"),D}},z=function(a,b,c,d){var e=k(a[0]),f=k(a[1]);y(e,f,b||0===b?b:"auto",c)&&(a[0]=m(e),a[1]=m(f),("log"===d||d===!0)&&h('precompile:["'+a[0]+'","'+a[1]+'"]'))},A=function(a,b,c){return b||c||a||0===a?function(d){z(d,a,b,c)}:z},B=function(a,b){if(!b)return a;var c,e,f,g=a.match(d)||[],h=g.length,i="";for("reverse"===b?(e=h-1,c=-2):(e=(2*(parseInt(b,10)||0)+1+100*h)%h,c=2),f=0;h>f;f+=2)i+=g[e-1]+","+g[e]+" ",e=(e+c)%h;return i},C=function(a,b){var c,d,e,f,g,h,i,j=0,k=parseFloat(a[0]),l=parseFloat(a[1]),m=k+","+l+" ",n=.999999;for(e=a.length,c=.5*b/(.5*e-1),d=0;e-2>d;d+=2){if(j+=c,h=parseFloat(a[d+2]),i=parseFloat(a[d+3]),j>n)for(g=1/(Math.floor(j)+1),f=1;j>n;)m+=(k+(h-k)*g*f).toFixed(2)+","+(l+(i-l)*g*f).toFixed(2)+" ",j--,f++;m+=h+","+i+" ",k=h,l=i}return m},D=function(a){var b=a[0].match(d)||[],c=a[1].match(d)||[],e=c.length-b.length;e>0?a[0]=C(b,e):a[1]=C(c,-e)},E=function(a){return isNaN(a)?D:function(b){D(b),b[1]=B(b[1],parseInt(a,10))}},F=function(a,b){var c=document.createElementNS("http://www.w3.org/2000/svg","path"),d=Array.prototype.slice.call(a.attributes),e=d.length;for(b=","+b+",";--e>-1;)-1===b.indexOf(","+d[e].nodeName+",")&&c.setAttributeNS(null,d[e].nodeName,d[e].nodeValue);return c},G=function(a,b){var c,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y=a.tagName.toLowerCase(),z=.552284749831;return"path"!==y&&a.getBBox?(i=F(a,"x,y,width,height,cx,cy,rx,ry,r,x1,x2,y1,y2,points"),"rect"===y?(g=+a.getAttribute("rx")||0,h=+a.getAttribute("ry")||0,e=+a.getAttribute("x")||0,f=+a.getAttribute("y")||0,m=(+a.getAttribute("width")||0)-2*g,n=(+a.getAttribute("height")||0)-2*h,g||h?(o=e+g*(1-z),p=e+g,q=p+m,r=q+g*z,s=q+g,t=f+h*(1-z),u=f+h,v=u+n,w=v+h*z,x=v+h,c="M"+s+","+u+" V"+v+" C"+[s,w,r,x,q,x,q-(q-p)/3,x,p+(q-p)/3,x,p,x,o,x,e,w,e,v,e,v-(v-u)/3,e,u+(v-u)/3,e,u,e,t,o,f,p,f,p+(q-p)/3,f,q-(q-p)/3,f,q,f,r,f,s,t,s,u].join(",")+"z"):c="M"+(e+m)+","+f+" v"+n+" h"+-m+" v"+-n+" h"+m+"z"):"circle"===y||"ellipse"===y?("circle"===y?(g=h=+a.getAttribute("r")||0,k=g*z):(g=+a.getAttribute("rx")||0,h=+a.getAttribute("ry")||0,k=h*z),e=+a.getAttribute("cx")||0,f=+a.getAttribute("cy")||0,j=g*z,c="M"+(e+g)+","+f+" C"+[e+g,f+k,e+j,f+h,e,f+h,e-j,f+h,e-g,f+k,e-g,f,e-g,f-k,e-j,f-h,e,f-h,e+j,f-h,e+g,f-k,e+g,f].join(",")+"z"):"line"===y?c="M"+a.getAttribute("x1")+","+a.getAttribute("y1")+" L"+a.getAttribute("x2")+","+a.getAttribute("y2"):("polyline"===y||"polygon"===y)&&(l=(a.getAttribute("points")+"").match(d)||[],e=l.shift(),f=l.shift(),c="M"+e+","+f+" L"+l.join(","),"polygon"===y&&(c+=","+e+","+f+"z")),i.setAttribute("d",c),b&&a.parentNode&&(a.parentNode.insertBefore(i,a),a.parentNode.removeChild(a)),i):a},H=function(a,b,c){var e,f,i="string"==typeof a;return(!i||(a.match(d)||[]).length<3)&&(e=i?g.selector(a):a&&a[0]?a:[a],e&&e[0]?(e=e[0],f=e.nodeName.toUpperCase(),b&&"PATH"!==f&&(e=G(e,!1),f="PATH"),a=e.getAttribute("PATH"===f?"d":"points")||"",e===c&&(a=e.getAttributeNS(null,"data-original")||a)):(h("WARNING: invalid morph to: "+a),a=!1)),a},I="Use MorphSVGPlugin.convertToPath(elementOrSelectorText) to convert to a path before morphing.",J=_gsScope._gsDefine.plugin({propName:"morphSVG",API:2,global:!0,version:"0.8.6",init:function(a,b,c,d){var f,g,i,j,k;return"function"!=typeof a.setAttribute?!1:("function"==typeof b&&(b=b(d,a)),f=a.nodeName.toUpperCase(),k="POLYLINE"===f||"POLYGON"===f,"PATH"===f||k?(g="PATH"===f?"d":"points",("string"==typeof b||b.getBBox||b[0])&&(b={shape:b}),j=H(b.shape||b.d||b.points||"","d"===g,a),k&&e.test(j)?(h("WARNING: a <"+f+"> cannot accept path data. "+I),!1):(j&&(this._target=a,a.getAttributeNS(null,"data-original")||a.setAttributeNS(null,"data-original",a.getAttribute(g)),i=this._addTween(a,"setAttribute",a.getAttribute(g)+"",j+"","morphSVG",!1,g,"object"==typeof b.precompile?function(a){a[0]=b.precompile[0],a[1]=b.precompile[1]}:"d"===g?A(b.shapeIndex,b.map||J.defaultMap,b.precompile):E(b.shapeIndex)),i&&(this._overwriteProps.push("morphSVG"),i.end=j,i.endProp=g)),!0)):(h("WARNING: cannot morph a <"+f+"> SVG element. "+I),!1))},set:function(a){var b;if(this._super.setRatio.call(this,a),1===a)for(b=this._firstPT;b;)b.end&&this._target.setAttribute(b.endProp,b.end),b=b._next}});J.pathFilter=z,J.pointsFilter=D,J.subdivideRawBezier=l,J.defaultMap="size",J.pathDataToRawBezier=function(a){return k(H(a,!0))},J.equalizeSegmentQuantity=y,J.convertToPath=function(a,b){"string"==typeof a&&(a=g.selector(a));for(var c=a&&0!==a.length?a.length&&a[0]&&a[0].nodeType?Array.prototype.slice.call(a,0):[a]:[],d=c.length;--d>-1;)c[d]=G(c[d],b!==!1);return c},J.pathDataToBezier=function(a,b){var c,d,e,f,h,i,j,l,m=k(H(a,!0))[0]||[],n=0;if(b=b||{},l=b.align||b.relative,f=b.matrix||[1,0,0,1,0,0],h=b.offsetX||0,i=b.offsetY||0,"relative"===l||l===!0?(h-=m[0]*f[0]+m[1]*f[2],i-=m[0]*f[1]+m[1]*f[3],n="+="):(h+=f[4],i+=f[5],l&&(l="string"==typeof l?g.selector(l):l&&l[0]?l:[l],l&&l[0]&&(j=l[0].getBBox()||{x:0,y:0},h-=j.x,i-=j.y))),c=[],e=m.length,f)for(d=0;e>d;d+=2)c.push({x:n+(m[d]*f[0]+m[d+1]*f[2]+h),y:n+(m[d]*f[1]+m[d+1]*f[3]+i)});else for(d=0;e>d;d+=2)c.push({x:n+(m[d]+h),y:n+(m[d+1]+i)});return c}}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(a){"use strict";var b=function(){return(_gsScope.GreenSockGlobals||_gsScope)[a]};"function"==typeof define&&define.amd?define(["TweenLite"],b):"undefined"!=typeof module&&module.exports&&(require("../TweenLite.js"),module.exports=b())}("MorphSVGPlugin");
1041
+ </script>
1042
+ <script>
1043
+ document.addEventListener( 'DOMContentLoaded', function(){
1044
+ document.querySelector('#login h1 a').innerHTML = '<div class="loginpress_svgContainer"> <div> <svg class="loginpress_mySVG" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 200 200"> <defs> <circle id="loginpress_armMaskPath" cx="100" cy="100" r="100"/> </defs> <clipPath id="loginpress_armMask"> <use xlink:href="#loginpress_armMaskPath" overflow="visible"/> </clipPath> <circle cx="100" cy="100" r="100" fill="#a9ddf3"/> <g class="loginpress_body"> <path class="loginpress_bodyBGchanged" style="display: none;" fill="#FFFFFF" d="M200,122h-35h-14.9V72c0-27.6-22.4-50-50-50s-50,22.4-50,50v50H35.8H0l0,91h200L200,122z"/> <path class="loginpress_bodyBGnormal" stroke="#3A5E77" stroke-width="2.5" stroke-linecap="round" stroke-linejoinn="round" fill="#FFFFFF" d="M200,158.5c0-20.2-14.8-36.5-35-36.5h-14.9V72.8c0-27.4-21.7-50.4-49.1-50.8c-28-0.5-50.9,22.1-50.9,50v50 H35.8C16,122,0,138,0,157.8L0,213h200L200,158.5z"/> <path fill="#DDF1FA" d="M100,156.4c-22.9,0-43,11.1-54.1,27.7c15.6,10,34.2,15.9,54.1,15.9s38.5-5.8,54.1-15.9 C143,167.5,122.9,156.4,100,156.4z"/> </g> <g class="loginpress_earL"> <g class="loginpress_outerEar" fill="#ddf1fa" stroke="#3a5e77" stroke-width="2.5"> <circle cx="47" cy="83" r="11.5"/> <path d="M46.3 78.9c-2.3 0-4.1 1.9-4.1 4.1 0 2.3 1.9 4.1 4.1 4.1" stroke-linecap="round" stroke-linejoin="round"/> </g> <g class="loginpress_earHair"> <rect x="51" y="64" fill="#FFFFFF" width="15" height="35"/> <path d="M53.4 62.8C48.5 67.4 45 72.2 42.8 77c3.4-.1 6.8-.1 10.1.1-4 3.7-6.8 7.6-8.2 11.6 2.1 0 4.2 0 6.3.2-2.6 4.1-3.8 8.3-3.7 12.5 1.2-.7 3.4-1.4 5.2-1.9" fill="#fff" stroke="#3a5e77" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/> </g> </g> <g class="loginpress_earR"> <g class="loginpress_outerEar"> <circle fill="#DDF1FA" stroke="#3A5E77" stroke-width="2.5" cx="153" cy="83" r="11.5"/> <path fill="#DDF1FA" stroke="#3A5E77" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" d="M153.7,78.9 c2.3,0,4.1,1.9,4.1,4.1c0,2.3-1.9,4.1-4.1,4.1"/> </g> <g class="loginpress_earHair"> <rect x="134" y="64" fill="#FFFFFF" width="15" height="35"/> <path fill="#FFFFFF" stroke="#3A5E77" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" d="M146.6,62.8 c4.9,4.6,8.4,9.4,10.6,14.2c-3.4-0.1-6.8-0.1-10.1,0.1c4,3.7,6.8,7.6,8.2,11.6c-2.1,0-4.2,0-6.3,0.2c2.6,4.1,3.8,8.3,3.7,12.5 c-1.2-0.7-3.4-1.4-5.2-1.9"/> </g> </g> <path class="loginpress_chin" d="M84.1 121.6c2.7 2.9 6.1 5.4 9.8 7.5l.9-4.5c2.9 2.5 6.3 4.8 10.2 6.5 0-1.9-.1-3.9-.2-5.8 3 1.2 6.2 2 9.7 2.5-.3-2.1-.7-4.1-1.2-6.1" fill="none" stroke="#3a5e77" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/> <path class="loginpress_face" fill="#DDF1FA" d="M134.5,46v35.5c0,21.815-15.446,39.5-34.5,39.5s-34.5-17.685-34.5-39.5V46"/> <path class="loginpress_hair" fill="#FFFFFF" stroke="#3A5E77" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" d="M81.457,27.929 c1.755-4.084,5.51-8.262,11.253-11.77c0.979,2.565,1.883,5.14,2.712,7.723c3.162-4.265,8.626-8.27,16.272-11.235 c-0.737,3.293-1.588,6.573-2.554,9.837c4.857-2.116,11.049-3.64,18.428-4.156c-2.403,3.23-5.021,6.391-7.852,9.474"/> <g class="loginpress_eyebrow"> <path fill="#FFFFFF" d="M138.142,55.064c-4.93,1.259-9.874,2.118-14.787,2.599c-0.336,3.341-0.776,6.689-1.322,10.037 c-4.569-1.465-8.909-3.222-12.996-5.226c-0.98,3.075-2.07,6.137-3.267,9.179c-5.514-3.067-10.559-6.545-15.097-10.329 c-1.806,2.889-3.745,5.73-5.816,8.515c-7.916-4.124-15.053-9.114-21.296-14.738l1.107-11.768h73.475V55.064z"/> <path fill="#FFFFFF" stroke="#3A5E77" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" d="M63.56,55.102 c6.243,5.624,13.38,10.614,21.296,14.738c2.071-2.785,4.01-5.626,5.816-8.515c4.537,3.785,9.583,7.263,15.097,10.329 c1.197-3.043,2.287-6.104,3.267-9.179c4.087,2.004,8.427,3.761,12.996,5.226c0.545-3.348,0.986-6.696,1.322-10.037 c4.913-0.481,9.857-1.34,14.787-2.599"/> </g> <g class="loginpress_eyeL"> <circle cx="85.5" cy="78.5" r="3.5" fill="#3a5e77"/> <circle cx="84" cy="76" r="1" fill="#fff"/> </g> <g class="loginpress_eyeR"> <circle cx="114.5" cy="78.5" r="3.5" fill="#3a5e77"/> <circle cx="113" cy="76" r="1" fill="#fff"/> </g> <g class="loginpress_mouth"> <path class="loginpress_mouthBG" fill="#617E92" d="M100.2,101c-0.4,0-1.4,0-1.8,0c-2.7-0.3-5.3-1.1-8-2.5c-0.7-0.3-0.9-1.2-0.6-1.8 c0.2-0.5,0.7-0.7,1.2-0.7c0.2,0,0.5,0.1,0.6,0.2c3,1.5,5.8,2.3,8.6,2.3s5.7-0.7,8.6-2.3c0.2-0.1,0.4-0.2,0.6-0.2 c0.5,0,1,0.3,1.2,0.7c0.4,0.7,0.1,1.5-0.6,1.9c-2.6,1.4-5.3,2.2-7.9,2.5C101.7,101,100.5,101,100.2,101z"/> <path style="display: none;" class="loginpress_mouthSmallBG" fill="#617E92" d="M100.2,101c-0.4,0-1.4,0-1.8,0c-2.7-0.3-5.3-1.1-8-2.5c-0.7-0.3-0.9-1.2-0.6-1.8 c0.2-0.5,0.7-0.7,1.2-0.7c0.2,0,0.5,0.1,0.6,0.2c3,1.5,5.8,2.3,8.6,2.3s5.7-0.7,8.6-2.3c0.2-0.1,0.4-0.2,0.6-0.2 c0.5,0,1,0.3,1.2,0.7c0.4,0.7,0.1,1.5-0.6,1.9c-2.6,1.4-5.3,2.2-7.9,2.5C101.7,101,100.5,101,100.2,101z"/> <path style="display: none;" class="loginpress_mouthMediumBG" d="M95,104.2c-4.5,0-8.2-3.7-8.2-8.2v-2c0-1.2,1-2.2,2.2-2.2h22c1.2,0,2.2,1,2.2,2.2v2 c0,4.5-3.7,8.2-8.2,8.2H95z"/> <path style="display: none;" class="loginpress_mouthLargeBG" d="M100 110.2c-9 0-16.2-7.3-16.2-16.2 0-2.3 1.9-4.2 4.2-4.2h24c2.3 0 4.2 1.9 4.2 4.2 0 9-7.2 16.2-16.2 16.2z" fill="#617e92" stroke="#3a5e77" stroke-linejoin="round" stroke-width="2.5"/> <defs> <path id="loginpress_mouthMaskPath" d="M100.2,101c-0.4,0-1.4,0-1.8,0c-2.7-0.3-5.3-1.1-8-2.5c-0.7-0.3-0.9-1.2-0.6-1.8 c0.2-0.5,0.7-0.7,1.2-0.7c0.2,0,0.5,0.1,0.6,0.2c3,1.5,5.8,2.3,8.6,2.3s5.7-0.7,8.6-2.3c0.2-0.1,0.4-0.2,0.6-0.2 c0.5,0,1,0.3,1.2,0.7c0.4,0.7,0.1,1.5-0.6,1.9c-2.6,1.4-5.3,2.2-7.9,2.5C101.7,101,100.5,101,100.2,101z"/> </defs> <clipPath id="loginpress_mouthMask"> <use xlink:href="#loginpress_mouthMaskPath" overflow="visible"/> </clipPath> <g clip-path="url(#loginpress_mouthMask)"> <g class="loginpress_tongue"> <circle cx="100" cy="107" r="8" fill="#cc4a6c"/> <ellipse class="loginpress_tongueHighlight" cx="100" cy="100.5" rx="3" ry="1.5" opacity=".1" fill="#fff"/> </g> </g> <path clip-path="url(#loginpress_mouthMask)" class="loginpress_tooth" style="fill:#FFFFFF;" d="M106,97h-4c-1.1,0-2-0.9-2-2v-2h8v2C108,96.1,107.1,97,106,97z"/> <path class="loginpress_mouthOutline" fill="none" stroke="#3A5E77" stroke-width="2.5" stroke-linejoin="round" d="M100.2,101c-0.4,0-1.4,0-1.8,0c-2.7-0.3-5.3-1.1-8-2.5c-0.7-0.3-0.9-1.2-0.6-1.8 c0.2-0.5,0.7-0.7,1.2-0.7c0.2,0,0.5,0.1,0.6,0.2c3,1.5,5.8,2.3,8.6,2.3s5.7-0.7,8.6-2.3c0.2-0.1,0.4-0.2,0.6-0.2 c0.5,0,1,0.3,1.2,0.7c0.4,0.7,0.1,1.5-0.6,1.9c-2.6,1.4-5.3,2.2-7.9,2.5C101.7,101,100.5,101,100.2,101z"/> </g> <path class="loginpress_nose" d="M97.7 79.9h4.7c1.9 0 3 2.2 1.9 3.7l-2.3 3.3c-.9 1.3-2.9 1.3-3.8 0l-2.3-3.3c-1.3-1.6-.2-3.7 1.8-3.7z" fill="#3a5e77"/> <g class="loginpress_arms" clip-path="url(#loginpress_armMask)"> <g class="loginpress_armL" style="visibility: hidden;"> <polygon fill="#DDF1FA" stroke="#3A5E77" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="121.3,98.4 111,59.7 149.8,49.3 169.8,85.4"/> <path fill="#DDF1FA" stroke="#3A5E77" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="M134.4,53.5l19.3-5.2c2.7-0.7,5.4,0.9,6.1,3.5v0c0.7,2.7-0.9,5.4-3.5,6.1l-10.3,2.8"/> <path fill="#DDF1FA" stroke="#3A5E77" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="M150.9,59.4l26-7c2.7-0.7,5.4,0.9,6.1,3.5v0c0.7,2.7-0.9,5.4-3.5,6.1l-21.3,5.7"/> <g class="loginpress_twoFingers"> <path fill="#DDF1FA" stroke="#3A5E77" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="M158.3,67.8l23.1-6.2c2.7-0.7,5.4,0.9,6.1,3.5v0c0.7,2.7-0.9,5.4-3.5,6.1l-23.1,6.2"/> <path fill="#A9DDF3" d="M180.1,65l2.2-0.6c1.1-0.3,2.2,0.3,2.4,1.4v0c0.3,1.1-0.3,2.2-1.4,2.4l-2.2,0.6L180.1,65z"/> <path fill="#DDF1FA" stroke="#3A5E77" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="M160.8,77.5l19.4-5.2c2.7-0.7,5.4,0.9,6.1,3.5v0c0.7,2.7-0.9,5.4-3.5,6.1l-18.3,4.9"/> <path fill="#A9DDF3" d="M178.8,75.7l2.2-0.6c1.1-0.3,2.2,0.3,2.4,1.4v0c0.3,1.1-0.3,2.2-1.4,2.4l-2.2,0.6L178.8,75.7z"/> </g> <path fill="#A9DDF3" d="M175.5,55.9l2.2-0.6c1.1-0.3,2.2,0.3,2.4,1.4v0c0.3,1.1-0.3,2.2-1.4,2.4l-2.2,0.6L175.5,55.9z"/> <path fill="#A9DDF3" d="M152.1,50.4l2.2-0.6c1.1-0.3,2.2,0.3,2.4,1.4v0c0.3,1.1-0.3,2.2-1.4,2.4l-2.2,0.6L152.1,50.4z"/> <path fill="#FFFFFF" stroke="#3A5E77" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" d="M123.5,97.8 c-41.4,14.9-84.1,30.7-108.2,35.5L1.2,81c33.5-9.9,71.9-16.5,111.9-21.8"/> <path fill="#FFFFFF" stroke="#3A5E77" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" d="M108.5,60.4 c7.7-5.3,14.3-8.4,22.8-13.2c-2.4,5.3-4.7,10.3-6.7,15.1c4.3,0.3,8.4,0.7,12.3,1.3c-4.2,5-8.1,9.6-11.5,13.9 c3.1,1.1,6,2.4,8.7,3.8c-1.4,2.9-2.7,5.8-3.9,8.5c2.5,3.5,4.6,7.2,6.3,11c-4.9-0.8-9-0.7-16.2-2.7"/> <path fill="#FFFFFF" stroke="#3A5E77" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" d="M94.5,103.8 c-0.6,4-3.8,8.9-9.4,14.7c-2.6-1.8-5-3.7-7.2-5.7c-2.5,4.1-6.6,8.8-12.2,14c-1.9-2.2-3.4-4.5-4.5-6.9c-4.4,3.3-9.5,6.9-15.4,10.8 c-0.2-3.4,0.1-7.1,1.1-10.9"/> <path fill="#FFFFFF" stroke="#3A5E77" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" d="M97.5,63.9 c-1.7-2.4-5.9-4.1-12.4-5.2c-0.9,2.2-1.8,4.3-2.5,6.5c-3.8-1.8-9.4-3.1-17-3.8c0.5,2.3,1.2,4.5,1.9,6.8c-5-0.6-11.2-0.9-18.4-1 c2,2.9,0.9,3.5,3.9,6.2"/> </g> <g class="loginpress_armR" style="visibility: hidden;"> <path fill="#ddf1fa" stroke="#3a5e77" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2.5" d="M265.4 97.3l10.4-38.6-38.9-10.5-20 36.1z"/> <path fill="#ddf1fa" stroke="#3a5e77" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2.5" d="M252.4 52.4L233 47.2c-2.7-.7-5.4.9-6.1 3.5-.7 2.7.9 5.4 3.5 6.1l10.3 2.8M226 76.4l-19.4-5.2c-2.7-.7-5.4.9-6.1 3.5-.7 2.7.9 5.4 3.5 6.1l18.3 4.9M228.4 66.7l-23.1-6.2c-2.7-.7-5.4.9-6.1 3.5-.7 2.7.9 5.4 3.5 6.1l23.1 6.2M235.8 58.3l-26-7c-2.7-.7-5.4.9-6.1 3.5-.7 2.7.9 5.4 3.5 6.1l21.3 5.7"/> <path fill="#a9ddf3" d="M207.9 74.7l-2.2-.6c-1.1-.3-2.2.3-2.4 1.4-.3 1.1.3 2.2 1.4 2.4l2.2.6 1-3.8zM206.7 64l-2.2-.6c-1.1-.3-2.2.3-2.4 1.4-.3 1.1.3 2.2 1.4 2.4l2.2.6 1-3.8zM211.2 54.8l-2.2-.6c-1.1-.3-2.2.3-2.4 1.4-.3 1.1.3 2.2 1.4 2.4l2.2.6 1-3.8zM234.6 49.4l-2.2-.6c-1.1-.3-2.2.3-2.4 1.4-.3 1.1.3 2.2 1.4 2.4l2.2.6 1-3.8z"/> <path fill="#fff" stroke="#3a5e77" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5" d="M263.3 96.7c41.4 14.9 84.1 30.7 108.2 35.5l14-52.3C352 70 313.6 63.5 273.6 58.1"/> <path fill="#fff" stroke="#3a5e77" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5" d="M278.2 59.3l-18.6-10 2.5 11.9-10.7 6.5 9.9 8.7-13.9 6.4 9.1 5.9-13.2 9.2 23.1-.9M284.5 100.1c-.4 4 1.8 8.9 6.7 14.8 3.5-1.8 6.7-3.6 9.7-5.5 1.8 4.2 5.1 8.9 10.1 14.1 2.7-2.1 5.1-4.4 7.1-6.8 4.1 3.4 9 7 14.7 11 1.2-3.4 1.8-7 1.7-10.9M314 66.7s5.4-5.7 12.6-7.4c1.7 2.9 3.3 5.7 4.9 8.6 3.8-2.5 9.8-4.4 18.2-5.7.1 3.1.1 6.1 0 9.2 5.5-1 12.5-1.6 20.8-1.9-1.4 3.9-2.5 8.4-2.5 8.4"/> </g> </g> </svg> </div> </div>';
1045
+ var emailLabel = document.querySelector('[for="user_login"]'),
1046
+ email = document.querySelector('#user_login'),
1047
+ passwordLabel = document.querySelector('[for="user_pass"]'),
1048
+ check_box = document.createElement("input"),
1049
+ check_wrapper = document.createElement("div"),
1050
+ check_box_label = document.createElement("label");
1051
+ check_box_label.setAttribute('for','loginpress_showPasswordCheck');
1052
+ check_box_label.setAttribute('id','loginpress_showPasswordToggle');
1053
+ check_wrapper.setAttribute('id','loginpress_showPasswordWrapper');
1054
+ check_box_label.innerHTML = "Show Password";
1055
+ check_box.setAttribute('type','checkbox');
1056
+ check_box.setAttribute('id','loginpress_showPasswordCheck');
1057
+ check_box.value = "Show Password";
1058
+ passwordLabel.appendChild(check_wrapper);
1059
+ document.querySelector('#loginpress_showPasswordWrapper').appendChild(check_box);
1060
+ document.querySelector('#loginpress_showPasswordWrapper').appendChild(check_box_label);
1061
+ password = document.querySelector('#user_pass'), showPasswordCheck = document.querySelector('#loginpress_showPasswordCheck'), showPasswordToggle = document.querySelector('#loginpress_showPasswordToggle'), mySVG = document.querySelector('.loginpress_svgContainer'), twoFingers = document.querySelector('.loginpress_twoFingers'), armL = document.querySelector('.loginpress_armL'), armR = document.querySelector('.loginpress_armR'), eyeL = document.querySelector('.loginpress_eyeL'), eyeR = document.querySelector('.loginpress_eyeR'), nose = document.querySelector('.loginpress_nose'), mouth = document.querySelector('.loginpress_mouth'), mouthBG = document.querySelector('.loginpress_mouthBG'), mouthSmallBG = document.querySelector('.loginpress_mouthSmallBG'), mouthMediumBG = document.querySelector('.loginpress_mouthMediumBG'), mouthLargeBG = document.querySelector('.loginpress_mouthLargeBG'), mouthMaskPath = document.querySelector('#loginpress_mouthMaskPath'), mouthOutline = document.querySelector('.loginpress_mouthOutline'), tooth = document.querySelector('.loginpress_tooth'), tongue = document.querySelector('.loginpress_tongue'), chin = document.querySelector('.loginpress_chin'), face = document.querySelector('.loginpress_face'), eyebrow = document.querySelector('.loginpress_eyebrow'), outerEarL = document.querySelector('.loginpress_earL .loginpress_outerEar'), outerEarR = document.querySelector('.loginpress_earR .loginpress_outerEar'), earHairL = document.querySelector('.loginpress_earL .loginpress_earHair'), earHairR = document.querySelector('.loginpress_earR .loginpress_earHair'), hair = document.querySelector('.loginpress_hair'), bodyBG = document.querySelector('.loginpress_bodyBGnormal'), bodyBGchanged = document.querySelector('.loginpress_bodyBGchanged');
1062
+ var activeElement, curEmailIndex, screenCenter, svgCoords, emailCoords, emailScrollMax, chinMin = .5, dFromC, mouthStatus = "small", blinking, eyeScale = 1, eyesCovered = false, showPasswordClicked = false;
1063
+ var eyeLCoords, eyeRCoords, noseCoords, mouthCoords, eyeLAngle, eyeLX, eyeLY, eyeRAngle, eyeRX, eyeRY, noseAngle, noseX, noseY, mouthAngle, mouthX, mouthY, mouthR, chinX, chinY, chinS, faceX, faceY, faceSkew, eyebrowSkew, outerEarX, outerEarY, hairX, hairS;
1064
+ function calculateFaceMoveLoginPress(e) {
1065
+ var
1066
+ carPos = email.selectionEnd,
1067
+ div = document.createElement('div'),
1068
+ span = document.createElement('span'),
1069
+ copyStyle = getComputedStyle(email),
1070
+ caretCoords = {}
1071
+ ;
1072
+ if(carPos == null || carPos == 0) {
1073
+ // if browser doesn't support 'selectionEnd' property on input[type="email"], use 'value.length' property instead
1074
+ carPos = email.value.length;
1075
+ }
1076
+ [].forEach.call(copyStyle, function(prop){
1077
+ div.style[prop] = copyStyle[prop];
1078
+ });
1079
+ div.style.position = 'absolute';
1080
+ document.body.appendChild(div);
1081
+ div.textContent = email.value.substr(0, carPos);
1082
+ span.textContent = email.value.substr(carPos) || '.';
1083
+ div.appendChild(span);
1084
+
1085
+ if(email.scrollWidth <= emailScrollMax) {
1086
+ caretCoords = getPositionLoginPress(span);
1087
+ dFromC = screenCenter - (caretCoords.x + emailCoords.x);
1088
+ eyeLAngle = getAngleLoginPress(eyeLCoords.x, eyeLCoords.y, emailCoords.x + caretCoords.x, emailCoords.y + 25);
1089
+ eyeRAngle = getAngleLoginPress(eyeRCoords.x, eyeRCoords.y, emailCoords.x + caretCoords.x, emailCoords.y + 25);
1090
+ noseAngle = getAngleLoginPress(noseCoords.x, noseCoords.y, emailCoords.x + caretCoords.x, emailCoords.y + 25);
1091
+ mouthAngle = getAngleLoginPress(mouthCoords.x, mouthCoords.y, emailCoords.x + caretCoords.x, emailCoords.y + 25);
1092
+ } else {
1093
+ eyeLAngle = getAngleLoginPress(eyeLCoords.x, eyeLCoords.y, emailCoords.x + emailScrollMax, emailCoords.y + 25);
1094
+ eyeRAngle = getAngleLoginPress(eyeRCoords.x, eyeRCoords.y, emailCoords.x + emailScrollMax, emailCoords.y + 25);
1095
+ noseAngle = getAngleLoginPress(noseCoords.x, noseCoords.y, emailCoords.x + emailScrollMax, emailCoords.y + 25);
1096
+ mouthAngle = getAngleLoginPress(mouthCoords.x, mouthCoords.y, emailCoords.x + emailScrollMax, emailCoords.y + 25);
1097
+ }
1098
+
1099
+ eyeLX = Math.cos(eyeLAngle) * 20;
1100
+ eyeLY = Math.sin(eyeLAngle) * 10;
1101
+ eyeRX = Math.cos(eyeRAngle) * 20;
1102
+ eyeRY = Math.sin(eyeRAngle) * 10;
1103
+ noseX = Math.cos(noseAngle) * 23;
1104
+ noseY = Math.sin(noseAngle) * 10;
1105
+ mouthX = Math.cos(mouthAngle) * 23;
1106
+ mouthY = Math.sin(mouthAngle) * 10;
1107
+ mouthR = Math.cos(mouthAngle) * 6;
1108
+ chinX = mouthX * .8;
1109
+ chinY = mouthY * .5;
1110
+ chinS = 1 - ((dFromC * .15) / 100);
1111
+ if(chinS > 1) {
1112
+ chinS = 1 - (chinS - 1);
1113
+ if(chinS < chinMin) {
1114
+ chinS = chinMin;
1115
+ }
1116
+ }
1117
+ faceX = mouthX * .3;
1118
+ faceY = mouthY * .4;
1119
+ faceSkew = Math.cos(mouthAngle) * 5;
1120
+ eyebrowSkew = Math.cos(mouthAngle) * 25;
1121
+ outerEarX = Math.cos(mouthAngle) * 4;
1122
+ outerEarY = Math.cos(mouthAngle) * 5;
1123
+ hairX = Math.cos(mouthAngle) * 6;
1124
+ hairS = 1.2;
1125
+
1126
+ TweenMax.to(eyeL, 1, {x: -eyeLX , y: -eyeLY, ease: Expo.easeOut});
1127
+ TweenMax.to(eyeR, 1, {x: -eyeRX , y: -eyeRY, ease: Expo.easeOut});
1128
+ TweenMax.to(nose, 1, {x: -noseX, y: -noseY, rotation: mouthR, transformOrigin: "center center", ease: Expo.easeOut});
1129
+ TweenMax.to(mouth, 1, {x: -mouthX , y: -mouthY, rotation: mouthR, transformOrigin: "center center", ease: Expo.easeOut});
1130
+ TweenMax.to(chin, 1, {x: -chinX, y: -chinY, scaleY: chinS, ease: Expo.easeOut});
1131
+ TweenMax.to(face, 1, {x: -faceX, y: -faceY, skewX: -faceSkew, transformOrigin: "center top", ease: Expo.easeOut});
1132
+ TweenMax.to(eyebrow, 1, {x: -faceX, y: -faceY, skewX: -eyebrowSkew, transformOrigin: "center top", ease: Expo.easeOut});
1133
+ TweenMax.to(outerEarL, 1, {x: outerEarX, y: -outerEarY, ease: Expo.easeOut});
1134
+ TweenMax.to(outerEarR, 1, {x: outerEarX, y: outerEarY, ease: Expo.easeOut});
1135
+ TweenMax.to(earHairL, 1, {x: -outerEarX, y: -outerEarY, ease: Expo.easeOut});
1136
+ TweenMax.to(earHairR, 1, {x: -outerEarX, y: outerEarY, ease: Expo.easeOut});
1137
+ TweenMax.to(hair, 1, {x: hairX, scaleY: hairS, transformOrigin: "center bottom", ease: Expo.easeOut});
1138
+
1139
+ document.body.removeChild(div);
1140
+ };
1141
+
1142
+ function onLoginPressEmailInput(e) {
1143
+ calculateFaceMoveLoginPress(e);
1144
+ var value = email.value;
1145
+ curEmailIndex = value.length;
1146
+
1147
+ // very crude email validation to trigger effects
1148
+ if(curEmailIndex > 0) {
1149
+ if(mouthStatus == "small") {
1150
+ mouthStatus = "medium";
1151
+ TweenMax.to([mouthBG, mouthOutline, mouthMaskPath], 1, {morphSVG: mouthMediumBG, shapeIndex: 8, ease: Expo.easeOut});
1152
+ TweenMax.to(tooth, 1, {x: 0, y: 0, ease: Expo.easeOut});
1153
+ TweenMax.to(tongue, 1, {x: 0, y: 1, ease: Expo.easeOut});
1154
+ TweenMax.to([eyeL, eyeR], 1, {scaleX: .85, scaleY: .85, ease: Expo.easeOut});
1155
+ eyeScale = .85;
1156
+ }
1157
+ if(value.includes("@")) {
1158
+ mouthStatus = "large";
1159
+ TweenMax.to([mouthBG, mouthOutline, mouthMaskPath], 1, {morphSVG: mouthLargeBG, ease: Expo.easeOut});
1160
+ TweenMax.to(tooth, 1, {x: 3, y: -2, ease: Expo.easeOut});
1161
+ TweenMax.to(tongue, 1, {y: 2, ease: Expo.easeOut});
1162
+ TweenMax.to([eyeL, eyeR], 1, {scaleX: .65, scaleY: .65, ease: Expo.easeOut, transformOrigin: "center center"});
1163
+ eyeScale = .65;
1164
+ } else {
1165
+ mouthStatus = "medium";
1166
+ TweenMax.to([mouthBG, mouthOutline, mouthMaskPath], 1, {morphSVG: mouthMediumBG, ease: Expo.easeOut});
1167
+ TweenMax.to(tooth, 1, {x: 0, y: 0, ease: Expo.easeOut});
1168
+ TweenMax.to(tongue, 1, {x: 0, y: 1, ease: Expo.easeOut});
1169
+ TweenMax.to([eyeL, eyeR], 1, {scaleX: .85, scaleY: .85, ease: Expo.easeOut});
1170
+ eyeScale = .85;
1171
+ }
1172
+ } else {
1173
+ mouthStatus = "small";
1174
+ TweenMax.to([mouthBG, mouthOutline, mouthMaskPath], 1, {morphSVG: mouthSmallBG, shapeIndex: 9, ease: Expo.easeOut});
1175
+ TweenMax.to(tooth, 1, {x: 0, y: 0, ease: Expo.easeOut});
1176
+ TweenMax.to(tongue, 1, {y: 0, ease: Expo.easeOut});
1177
+ TweenMax.to([eyeL, eyeR], 1, {scaleX: 1, scaleY: 1, ease: Expo.easeOut});
1178
+ eyeScale = 1;
1179
+ }
1180
+ }
1181
+
1182
+ function onLoginPressEmailFocus(e) {
1183
+ activeElement = "email";
1184
+ e.target.parentElement.classList.add("focusWithText");
1185
+ //stopBlinkingLoginPress();
1186
+ //calculateFaceMoveLoginPress();
1187
+ onLoginPressEmailInput();
1188
+ }
1189
+
1190
+ function onLoginPressEmailBlur(e) {
1191
+ activeElement = null;
1192
+ setTimeout(function() {
1193
+ if(activeElement == "email") {
1194
+ } else {
1195
+ if(e.target.value == "") {
1196
+ e.target.parentElement.classList.remove("focusWithText");
1197
+ }
1198
+ //startBlinkingLoginPress();
1199
+ resetFaceLoginPress();
1200
+ }
1201
+ }, 100);
1202
+ }
1203
+
1204
+ function onLoginPressEmailLabelClick(e) {
1205
+ activeElement = "email";
1206
+ }
1207
+
1208
+ function onLoginPressPasswordFocus(e) {
1209
+ activeElement = "password";
1210
+ if(!eyesCovered) {
1211
+ coverEyesLoginPress();
1212
+ }
1213
+ }
1214
+
1215
+ function onLoginPressPasswordBlur(e) {
1216
+ activeElement = null;
1217
+ setTimeout(function() {
1218
+ if(activeElement == "toggle" || activeElement == "password") {
1219
+ } else {
1220
+ uncoverEyesLoginPress();
1221
+ }
1222
+ }, 100);
1223
+ }
1224
+
1225
+ function onLoginPressPasswordToggleFocus(e) {
1226
+ activeElement = "toggle";
1227
+ if(!eyesCovered) {
1228
+ coverEyesLoginPress();
1229
+ }
1230
+ }
1231
+
1232
+ function onLoginPressPasswordToggleBlur(e) {
1233
+ activeElement = null;
1234
+ if(!showPasswordClicked) {
1235
+ setTimeout(function() {
1236
+ if(activeElement == "password" || activeElement == "toggle") {
1237
+ } else {
1238
+ uncoverEyesLoginPress();
1239
+ }
1240
+ }, 100);
1241
+ }
1242
+ }
1243
+
1244
+ function onLoginPressPasswordToggleMouseDown(e) {
1245
+ showPasswordClicked = true;
1246
+ }
1247
+
1248
+ function onLoginPressPasswordToggleMouseUp(e) {
1249
+ showPasswordClicked = false;
1250
+ }
1251
 
1252
+ function onLoginPressPasswordToggleChange(e) {
1253
+ setTimeout(function() {
1254
+ // if checkbox is checked, show password
1255
+ if(e.target.checked) {
1256
+ password.type = "text";
1257
+ spreadFingersLoginPress();
1258
+
1259
+ // if checkbox is off, hide password
1260
+ } else {
1261
+ password.type = "password";
1262
+ closeFingersLoginPress();
1263
+ }
1264
+ }, 100);
1265
+ }
1266
+
1267
+ function onLoginPressPasswordToggleClick(e) {
1268
+ //console.log("click: " + e.target.id);
1269
+ e.target.focus();
1270
+ }
1271
+
1272
+ function spreadFingersLoginPress() {
1273
+ TweenMax.to(twoFingers, .35, {transformOrigin: "bottom left", rotation: 30, x: -9, y: -2, ease: Power2.easeInOut});
1274
+ }
1275
+
1276
+ function closeFingersLoginPress() {
1277
+ TweenMax.to(twoFingers, .35, {transformOrigin: "bottom left", rotation: 0, x: 0, y: 0, ease: Power2.easeInOut});
1278
+ }
1279
+
1280
+ function coverEyesLoginPress() {
1281
+ TweenMax.killTweensOf([armL, armR]);
1282
+ TweenMax.set([armL, armR], {visibility: "visible"});
1283
+ TweenMax.to(armL, .45, {x: -93, y: 10, rotation: 0, ease: Quad.easeOut});
1284
+ TweenMax.to(armR, .45, {x: -93, y: 10, rotation: 0, ease: Quad.easeOut, delay: .1});
1285
+ TweenMax.to(bodyBG, .45, {morphSVG: bodyBGchanged, ease: Quad.easeOut});
1286
+ eyesCovered = true;
1287
+ }
1288
+
1289
+ function uncoverEyesLoginPress() {
1290
+ TweenMax.killTweensOf([armL, armR]);
1291
+ TweenMax.to(armL, 1.35, {y: 220, ease: Quad.easeOut});
1292
+ TweenMax.to(armL, 1.35, {rotation: 105, ease: Quad.easeOut, delay: .1});
1293
+ TweenMax.to(armR, 1.35, {y: 220, ease: Quad.easeOut});
1294
+ TweenMax.to(armR, 1.35, {rotation: -105, ease: Quad.easeOut, delay: .1, onComplete: function() {
1295
+ TweenMax.set([armL, armR], {visibility: "hidden"});
1296
+ }});
1297
+ TweenMax.to(bodyBG, .45, {morphSVG: bodyBG, ease: Quad.easeOut});
1298
+ eyesCovered = false;
1299
+ }
1300
+
1301
+ function resetFaceLoginPress() {
1302
+ TweenMax.to([eyeL, eyeR], 1, {x: 0, y: 0, ease: Expo.easeOut});
1303
+ TweenMax.to(nose, 1, {x: 0, y: 0, scaleX: 1, scaleY: 1, ease: Expo.easeOut});
1304
+ TweenMax.to(mouth, 1, {x: 0, y: 0, rotation: 0, ease: Expo.easeOut});
1305
+ TweenMax.to(chin, 1, {x: 0, y: 0, scaleY: 1, ease: Expo.easeOut});
1306
+ TweenMax.to([face, eyebrow], 1, {x: 0, y: 0, skewX: 0, ease: Expo.easeOut});
1307
+ TweenMax.to([outerEarL, outerEarR, earHairL, earHairR, hair], 1, {x: 0, y: 0, scaleY: 1, ease: Expo.easeOut});
1308
+ }
1309
+
1310
+ function startBlinkingLoginPress(delay) {
1311
+ if(delay) {
1312
+ delay = getRandomIntLoginPress(delay);
1313
+ } else {
1314
+ delay = 1;
1315
+ }
1316
+ blinking = TweenMax.to([eyeL, eyeR], .1, {delay: delay, scaleY: 0, yoyo: true, repeat: 1, transformOrigin: "center center", onComplete: function() {
1317
+ startBlinkingLoginPress(12);
1318
+ }});
1319
+ }
1320
+
1321
+ function stopBlinkingLoginPress() {
1322
+ blinking.kill();
1323
+ blinking = null;
1324
+ TweenMax.set([eyeL, eyeR], {scaleY: eyeScale});
1325
+ }
1326
+
1327
+ function getRandomIntLoginPress(max) {
1328
+ return Math.floor(Math.random() * Math.floor(max));
1329
+ }
1330
+
1331
+ function getAngleLoginPress(x1, y1, x2, y2) {
1332
+ var angle = Math.atan2(y1 - y2, x1 - x2);
1333
+ return angle;
1334
+ }
1335
+
1336
+ function getPositionLoginPress(el) {
1337
+ var xPos = 0;
1338
+ var yPos = 0;
1339
+
1340
+ while (el) {
1341
+ if (el.tagName == "BODY") {
1342
+ // deal with browser quirks with body/window/document and page scroll
1343
+ var xScroll = el.scrollLeft || document.documentElement.scrollLeft;
1344
+ var yScroll = el.scrollTop || document.documentElement.scrollTop;
1345
+
1346
+ xPos += (el.offsetLeft - xScroll + el.clientLeft);
1347
+ yPos += (el.offsetTop - yScroll + el.clientTop);
1348
+ } else {
1349
+ // for all other non-BODY elements
1350
+ xPos += (el.offsetLeft - el.scrollLeft + el.clientLeft);
1351
+ yPos += (el.offsetTop - el.scrollTop + el.clientTop);
1352
+ }
1353
+
1354
+ el = el.offsetParent;
1355
+ }
1356
+ //console.log("xPos: " + xPos + ", yPos: " + yPos);
1357
+ return {
1358
+ x: xPos,
1359
+ y: yPos
1360
+ };
1361
+ }
1362
+
1363
+ function isMobileDeviceLoginPress() {
1364
+ var check = false;
1365
+ (function(a){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4))) check = true;})(navigator.userAgent||navigator.vendor||window.opera);
1366
+ return check;
1367
+ };
1368
+
1369
+ function initLoginPressForm() {
1370
+ // some measurements for the svg's elements
1371
+ svgCoords = getPositionLoginPress(mySVG);
1372
+ emailCoords = getPositionLoginPress(email);
1373
+ screenCenter = svgCoords.x + (mySVG.offsetWidth / 2);
1374
+ eyeLCoords = {x: svgCoords.x + 84, y: svgCoords.y + 76};
1375
+ eyeRCoords = {x: svgCoords.x + 113, y: svgCoords.y + 76};
1376
+ noseCoords = {x: svgCoords.x + 97, y: svgCoords.y + 81};
1377
+ mouthCoords = {x: svgCoords.x + 100, y: svgCoords.y + 100};
1378
+
1379
+ // handle events for email input
1380
+ email.addEventListener('focus', onLoginPressEmailFocus);
1381
+ email.addEventListener('blur', onLoginPressEmailBlur);
1382
+ email.addEventListener('input', onLoginPressEmailInput);
1383
+ emailLabel.addEventListener('click', onLoginPressEmailLabelClick);
1384
+
1385
+ // handle events for password input
1386
+ password.addEventListener('focus', onLoginPressPasswordFocus);
1387
+ password.addEventListener('blur', onLoginPressPasswordBlur);
1388
+ //passwordLabel.addEventListener('click', onLoginPressPasswordLabelClick);
1389
+
1390
+ // handle events for password checkbox
1391
+ showPasswordCheck.addEventListener('change', onLoginPressPasswordToggleChange);
1392
+ showPasswordCheck.addEventListener('focus', onLoginPressPasswordToggleFocus);
1393
+ showPasswordCheck.addEventListener('blur', onLoginPressPasswordToggleBlur);
1394
+ showPasswordCheck.addEventListener('click', onLoginPressPasswordToggleClick);
1395
+ showPasswordToggle.addEventListener('mouseup', onLoginPressPasswordToggleMouseUp);
1396
+ showPasswordToggle.addEventListener('mousedown', onLoginPressPasswordToggleMouseDown);
1397
+
1398
+ // move arms to initial positions
1399
+ TweenMax.set(armL, {x: -93, y: 220, rotation: 105, transformOrigin: "top left"});
1400
+ TweenMax.set(armR, {x: -93, y: 220, rotation: -105, transformOrigin: "top right"});
1401
+
1402
+ // set initial mouth property (fixes positioning bug)
1403
+ TweenMax.set(mouth, {transformOrigin: "center center"});
1404
+
1405
+ // activate blinking
1406
+ startBlinkingLoginPress(5);
1407
+
1408
+ // determine how far email input can go before scrolling occurs
1409
+ // will be used as the furthest point avatar will look to the right
1410
+ emailScrollMax = email.scrollWidth;
1411
+
1412
+ // check if we're on mobile/tablet, if so then show password initially
1413
+ if(isMobileDeviceLoginPress()) {
1414
+ password.type = "text";
1415
+ showPasswordCheck.checked = true;
1416
+ TweenMax.set(twoFingers, {transformOrigin: "bottom left", rotation: 30, x: -9, y: -2, ease: Power2.easeInOut});
1417
+ }
1418
+
1419
+ // clear the console
1420
+ console.clear();
1421
+ }
1422
+
1423
+ initLoginPressForm();
1424
+ }, false );
1425
+ </script>
1426
+ <?php endif; ?>
1427
  <?php // $content = ob_get_clean(); ?>
1428
  <?php if ( isset( $loginpress_display_bg_video ) && $loginpress_display_bg_video && ! empty( $loginpress_bg_video ) ) : ?>
1429
  <?php if ( ( $loginpress_theme_tem == 'default6' || $loginpress_theme_tem == 'default10' || $loginpress_theme_tem == 'default17' ) ) : ?>
custom.php CHANGED
@@ -309,7 +309,8 @@ class LoginPress_Entities {
309
  __( 'Geek', 'loginpress' ),
310
  __( 'Innovation', 'loginpress' ),
311
  __( 'Photographers', 'loginpress' ),
312
- __( 'Animated Wapo', 'loginpress' ) );
 
313
 
314
  // 1st template that is default
315
  $loginpress_free_templates["default1" ] = array(
@@ -1620,7 +1621,7 @@ class LoginPress_Entities {
1620
  if ( $this->loginpress_key && array_key_exists( 'customize_logo_hover', $this->loginpress_key ) && ! empty( $this->loginpress_key['customize_logo_hover'] ) ) {
1621
  return $this->loginpress_key["customize_logo_hover"];
1622
  } else {
1623
- return home_url();
1624
  }
1625
  }
1626
 
@@ -1648,7 +1649,7 @@ class LoginPress_Entities {
1648
  if ( $this->loginpress_key && array_key_exists( 'customize_logo_hover_title', $this->loginpress_key ) && ! empty( $this->loginpress_key['customize_logo_hover_title'] ) ) {
1649
  return $this->loginpress_key["customize_logo_hover_title"];
1650
  } else {
1651
- return home_url();
1652
  }
1653
  }
1654
 
309
  __( 'Geek', 'loginpress' ),
310
  __( 'Innovation', 'loginpress' ),
311
  __( 'Photographers', 'loginpress' ),
312
+ __( 'Animated Wapo', 'loginpress' ),
313
+ __( 'Animated Wapo 2','loginpress' ) );
314
 
315
  // 1st template that is default
316
  $loginpress_free_templates["default1" ] = array(
1621
  if ( $this->loginpress_key && array_key_exists( 'customize_logo_hover', $this->loginpress_key ) && ! empty( $this->loginpress_key['customize_logo_hover'] ) ) {
1622
  return $this->loginpress_key["customize_logo_hover"];
1623
  } else {
1624
+ return home_url();
1625
  }
1626
  }
1627
 
1649
  if ( $this->loginpress_key && array_key_exists( 'customize_logo_hover_title', $this->loginpress_key ) && ! empty( $this->loginpress_key['customize_logo_hover_title'] ) ) {
1650
  return $this->loginpress_key["customize_logo_hover_title"];
1651
  } else {
1652
+ return home_url();
1653
  }
1654
  }
1655
 
img/thumbnail/default-18.png CHANGED
Binary file
img/thumbnail/default-19.png ADDED
Binary file
include/compatibility.php CHANGED
@@ -4,7 +4,7 @@
4
  * This is a LoginPress Compatibility to make it compatible for older versions.
5
  *
6
  * @since 1.0.22
7
- * @version 1.2.2
8
  */
9
 
10
 
@@ -51,11 +51,20 @@ if ( ! class_exists( 'LoginPress_Compatibility' ) ) :
51
  * Remove conflictions.
52
  * Add CSS Support.
53
  * @since 1.0.3
54
- * @version 1.2.3
55
  */
56
  class LoginPress_Compatibility {
57
 
 
 
 
 
 
 
 
 
58
  public function __construct() {
 
59
  $this->dependencies();
60
  }
61
 
@@ -68,15 +77,27 @@ if ( ! class_exists( 'LoginPress_Compatibility' ) ) :
68
  /*************************************
69
  WebArx Compatibility Fix // v1.2.3
70
  *************************************/
71
-
72
  add_filter( 'wp_redirect', array( $this, 'wp_redirect_remove_filter' ), 9 );
73
  add_filter( 'site_url', array( $this, 'site_url_remove_filter' ) , 9 );
74
  add_filter( 'network_site_url', array( $this, 'network_site_url_remove_filter' ), 9 );
75
  add_action( 'plugins_loaded', array( $this, 'plugins_loaded_remove_action' ), 10 );
76
  add_action( 'wp_loaded', array( $this, 'wp_loaded_remove_action' ), 9 );
77
- add_action( 'init', array( $this, 'init_remove_action' ), 9 );
78
- }
79
-
 
 
 
 
 
 
 
 
 
 
 
 
 
80
  public function wp_redirect_remove_filter( $location ) {
81
  if ( class_exists( 'Webarx' ) ) {
82
 
@@ -182,14 +203,16 @@ if ( ! class_exists( 'LoginPress_Compatibility' ) ) :
182
  * Enqueue LoginPress CSS on Password_Protected plugin.
183
  *
184
  * Hooked to the password_protected_login_head action,
185
- * Head URL on logo as well.
186
- *
187
  * so that it is after the script was enqueued.
188
  * @since 1.0.3
 
189
  */
190
  if ( class_exists( 'Password_Protected' ) ) {
191
  add_action( 'password_protected_login_head', array( $this, 'enqueue_loginpress_script' ) );
192
- add_filter('password_protected_login_headerurl', array( $this, 'password_protected_login_headerurl_cb' ) );
 
193
  }
194
  }
195
 
@@ -241,18 +264,30 @@ if ( ! class_exists( 'LoginPress_Compatibility' ) ) :
241
  }
242
 
243
  /**
244
- * Password protected plugin compatlibility iwth logo url.
245
  * @since 1.3.1
 
246
  */
247
  public function password_protected_login_headerurl_cb() {
248
- $logo_url = get_option( 'loginpress_customization' );
249
- $logo_url = $logo_url['customize_logo_hover'];
250
 
251
  return $logo_url;
252
  }
253
 
 
 
 
 
 
 
 
 
 
 
 
254
  }
255
 
256
  endif;
257
 
258
- new LoginPress_Compatibility;
4
  * This is a LoginPress Compatibility to make it compatible for older versions.
5
  *
6
  * @since 1.0.22
7
+ * @version 1.3.2
8
  */
9
 
10
 
51
  * Remove conflictions.
52
  * Add CSS Support.
53
  * @since 1.0.3
54
+ * @version 1.3.2
55
  */
56
  class LoginPress_Compatibility {
57
 
58
+ /**
59
+ * Variable that Check for LoginPress Key.
60
+ *
61
+ * @var string
62
+ * @since 1.3.2
63
+ */
64
+ public $loginpress_key;
65
+
66
  public function __construct() {
67
+ $this->loginpress_key = get_option( 'loginpress_customization' );
68
  $this->dependencies();
69
  }
70
 
77
  /*************************************
78
  WebArx Compatibility Fix // v1.2.3
79
  *************************************/
 
80
  add_filter( 'wp_redirect', array( $this, 'wp_redirect_remove_filter' ), 9 );
81
  add_filter( 'site_url', array( $this, 'site_url_remove_filter' ) , 9 );
82
  add_filter( 'network_site_url', array( $this, 'network_site_url_remove_filter' ), 9 );
83
  add_action( 'plugins_loaded', array( $this, 'plugins_loaded_remove_action' ), 10 );
84
  add_action( 'wp_loaded', array( $this, 'wp_loaded_remove_action' ), 9 );
85
+ add_action( 'init', array( $this, 'init_remove_action' ), 9 );
86
+
87
+ // Thrive theme compatibility.
88
+ add_action( 'login_enqueue_scripts', array( $this, 'dequeue_thrive_conflicting_scripts' ), 99 );
89
+ }
90
+
91
+ /**
92
+ * Dequeue thrive theme login page styles.
93
+ * This will enable the loginpress customization with thrive themes.
94
+ *
95
+ */
96
+ function dequeue_thrive_conflicting_scripts() {
97
+ wp_dequeue_style( 'thrive-custom-login' );
98
+ wp_dequeue_script( 'thrive-custom-login' );
99
+ }
100
+
101
  public function wp_redirect_remove_filter( $location ) {
102
  if ( class_exists( 'Webarx' ) ) {
103
 
203
  * Enqueue LoginPress CSS on Password_Protected plugin.
204
  *
205
  * Hooked to the password_protected_login_head action,
206
+ * Head URL & Title on logo as well.
207
+ *
208
  * so that it is after the script was enqueued.
209
  * @since 1.0.3
210
+ * @version 1.3.2
211
  */
212
  if ( class_exists( 'Password_Protected' ) ) {
213
  add_action( 'password_protected_login_head', array( $this, 'enqueue_loginpress_script' ) );
214
+ add_filter( 'password_protected_login_headerurl', array( $this, 'password_protected_login_headerurl_cb' ) );
215
+ add_filter( 'password_protected_login_headertitle', array( $this, 'password_protected_login_headertitle_cb' ) );
216
  }
217
  }
218
 
264
  }
265
 
266
  /**
267
+ * Password protected plugin compatlibility with logo url.
268
  * @since 1.3.1
269
+ * @version 1.3.2
270
  */
271
  public function password_protected_login_headerurl_cb() {
272
+
273
+ $logo_url = $this->loginpress_key && isset( $this->loginpress_key['customize_logo_hover'] ) && ! empty( $this->loginpress_key['customize_logo_hover'] ) ? $this->loginpress_key['customize_logo_hover'] : home_url( '/' );
274
 
275
  return $logo_url;
276
  }
277
 
278
+ /**
279
+ * Password protected plugin compatlibility with logo title.
280
+ * @since 1.3.2
281
+ */
282
+ public function password_protected_login_headertitle_cb() {
283
+
284
+ $logo_title = $this->loginpress_key && isset( $this->loginpress_key['customize_logo_hover_title'] ) && ! empty( $this->loginpress_key['customize_logo_hover_title'] ) ? $this->loginpress_key['customize_logo_hover_title'] : get_bloginfo( 'name' );
285
+
286
+ return $logo_title;
287
+ }
288
+
289
  }
290
 
291
  endif;
292
 
293
+ new LoginPress_Compatibility;
js/script-login.php CHANGED
@@ -32,58 +32,94 @@ if ( ! empty( $loginpress_custom_js ) ) : ?>
32
  <script>
33
 
34
  document.addEventListener('DOMContentLoaded', function(){
 
 
 
 
35
  // your code goes here
36
- var loginpress_user_pass = document.getElementById('user_pass');
37
- var loginpress_wrapper = document.createElement('div');
38
- loginpress_wrapper.classList.add('user-pass-fields');
39
- // insert wrapper before el in the DOM tree
40
- user_pass.parentNode.insertBefore(loginpress_wrapper, loginpress_user_pass);
41
-
42
- // move el into wrapper
43
- loginpress_wrapper.appendChild(loginpress_user_pass);
44
- var loginpress_user_ps = document.getElementsByClassName('user-pass-fields');
45
- var loginpress_node = document.createElement("div");
46
- loginpress_node.classList.add('loginpress-caps-lock');
47
- var loginpress_textnode = document.createTextNode('<?php echo $loginpress_capslock; ?>');
48
- loginpress_node.appendChild(loginpress_textnode);
49
- loginpress_user_ps[0].appendChild(loginpress_node);
 
 
 
50
  }, false);
51
  window.onload = function(e) {
52
 
53
  var capsLock = 'off';
54
  var passwordField = document.getElementById("user_pass");
 
 
 
 
 
 
 
 
 
55
 
56
- passwordField.onkeydown = function(e) {
57
- var el = this;
58
- var caps = event.getModifierState && event.getModifierState( 'CapsLock' );
59
- if ( caps ) {
60
 
61
- capsLock = 'on';
62
- el.nextElementSibling.style.display = "block";
63
- } else {
64
 
65
- capsLock = 'off';
66
  el.nextElementSibling.style.display = "none";
67
- }
68
- };
69
 
70
- passwordField.onblur = function(e) {
71
 
72
- var el = this;
73
- el.nextElementSibling.style.display = "none";
74
- };
75
 
76
- passwordField.onfocus = function(e) {
 
77
 
78
- var el = this;
79
- if ( capsLock == 'on' ) {
 
 
80
 
81
- el.nextElementSibling.style.display = "block";
82
- }else{
83
 
84
- el.nextElementSibling.style.display = "none";
85
- }
86
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
87
  };
88
 
89
  <?php if ( 'off' != $loginpress_autorm ) : ?>
32
  <script>
33
 
34
  document.addEventListener('DOMContentLoaded', function(){
35
+ if (navigator.userAgent.indexOf("Firefox") != -1) {
36
+ var body = document.body;
37
+ body.classList.add("firefox");
38
+ }
39
  // your code goes here
40
+ if ( document.getElementById('user_pass') ) {
41
+ var loginpress_user_pass = document.getElementById('user_pass');
42
+ var loginpress_wrapper = document.createElement('div');
43
+ loginpress_wrapper.classList.add('user-pass-fields');
44
+ // insert wrapper before el in the DOM tree
45
+ user_pass.parentNode.insertBefore(loginpress_wrapper, loginpress_user_pass);
46
+
47
+ // move el into wrapper
48
+ loginpress_wrapper.appendChild(loginpress_user_pass);
49
+ var loginpress_user_ps = document.getElementsByClassName('user-pass-fields');
50
+ var loginpress_node = document.createElement("div");
51
+ loginpress_node.classList.add('loginpress-caps-lock');
52
+ var loginpress_textnode = document.createTextNode('<?php echo $loginpress_capslock; ?>');
53
+ loginpress_node.appendChild(loginpress_textnode);
54
+ loginpress_user_ps[0].appendChild(loginpress_node);
55
+ }
56
+
57
  }, false);
58
  window.onload = function(e) {
59
 
60
  var capsLock = 'off';
61
  var passwordField = document.getElementById("user_pass");
62
+ if ( passwordField ) {
63
+ passwordField.onkeydown = function(e) {
64
+ var el = this;
65
+ var caps = event.getModifierState && event.getModifierState( 'CapsLock' );
66
+ if ( caps ) {
67
+
68
+ capsLock = 'on';
69
+ el.nextElementSibling.style.display = "block";
70
+ } else {
71
 
72
+ capsLock = 'off';
73
+ el.nextElementSibling.style.display = "none";
74
+ }
75
+ };
76
 
77
+ passwordField.onblur = function(e) {
 
 
78
 
79
+ var el = this;
80
  el.nextElementSibling.style.display = "none";
81
+ };
 
82
 
83
+ passwordField.onfocus = function(e) {
84
 
85
+ var el = this;
86
+ if ( capsLock == 'on' ) {
 
87
 
88
+ el.nextElementSibling.style.display = "block";
89
+ }else{
90
 
91
+ el.nextElementSibling.style.display = "none";
92
+ }
93
+ };
94
+ }
95
 
 
 
96
 
97
+ // if ( document.getElementById("loginform") ) {
98
+ // document.getElementById("loginform").addEventListener( "submit", _LoginPressFormSubmitLoader );
99
+ // }
100
+ // if ( document.getElementById("registerform") ) {
101
+ // document.getElementById("registerform").addEventListener( "submit", _LoginPressFormSubmitLoader );
102
+ // }
103
+ // if ( document.getElementById("lostpasswordform") ) {
104
+ // document.getElementById("lostpasswordform").addEventListener( "submit", _LoginPressFormSubmitLoader );
105
+ // }
106
+
107
+
108
+ function _LoginPressFormSubmitLoader() {
109
+
110
+ var subButton = document.getElementsByClassName("submit");
111
+ var myButton = document.getElementById("wp-submit");
112
+ var image = document.createElement("img");
113
+
114
+ myButton.setAttribute('disabled', 'disabled');
115
+ image.setAttribute( "src", "<?php echo admin_url( 'images/loading.gif' ); ?>" );
116
+ image.setAttribute( "width", "20" );
117
+ image.setAttribute( "height", "20" );
118
+ image.setAttribute( "alt", "Login Loader" );
119
+ image.setAttribute( "style", "display: block;margin: 0 auto;position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);" );
120
+ subButton[0].appendChild(image);
121
+ }
122
+
123
  };
124
 
125
  <?php if ( 'off' != $loginpress_autorm ) : ?>
loginpress.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: LoginPress - Customizing the WordPress Login
4
  * Plugin URI: https://WPBrigade.com/wordpress/plugins/loginpress/
5
  * Description: LoginPress is the best <code>wp-login</code> Login Page Customizer plugin by <a href="https://wpbrigade.com/">WPBrigade</a> which allows you to completely change the layout of login, register and forgot password forms.
6
- * Version: 1.3.1
7
  * Author: WPBrigade
8
  * Author URI: https://WPBrigade.com/
9
  * Text Domain: loginpress
@@ -22,7 +22,7 @@ if ( ! class_exists( 'LoginPress' ) ) :
22
  /**
23
  * @var string
24
  */
25
- public $version = '1.3.1';
26
 
27
  /**
28
  * @var The single instance of the class
@@ -331,19 +331,49 @@ if ( ! class_exists( 'LoginPress' ) ) :
331
  * Session Expiration
332
  *
333
  * @since 1.0.18
 
334
  */
335
  function _change_auth_cookie_expiration( $expiration, $user_id, $remember ) {
336
 
337
- $loginpress_setting = get_option( 'loginpress_setting' );
338
- $_expiration = isset( $loginpress_setting['session_expiration'] ) ? intval( $loginpress_setting['session_expiration'] ) : '';
 
 
 
 
 
 
 
 
339
 
340
- if ( empty( $_expiration ) || '0' == $_expiration ) {
341
- return $expiration;
342
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
343
 
344
- $expiration = $_expiration * 60; // Convert Duration (minutes) of the expiration period in seconds.
 
345
 
346
- return $expiration;
347
  }
348
 
349
  /**
3
  * Plugin Name: LoginPress - Customizing the WordPress Login
4
  * Plugin URI: https://WPBrigade.com/wordpress/plugins/loginpress/
5
  * Description: LoginPress is the best <code>wp-login</code> Login Page Customizer plugin by <a href="https://wpbrigade.com/">WPBrigade</a> which allows you to completely change the layout of login, register and forgot password forms.
6
+ * Version: 1.3.2
7
  * Author: WPBrigade
8
  * Author URI: https://WPBrigade.com/
9
  * Text Domain: loginpress
22
  /**
23
  * @var string
24
  */
25
+ public $version = '1.3.2';
26
 
27
  /**
28
  * @var The single instance of the class
331
  * Session Expiration
332
  *
333
  * @since 1.0.18
334
+ * @version 1.3.2
335
  */
336
  function _change_auth_cookie_expiration( $expiration, $user_id, $remember ) {
337
 
338
+ $loginpress_setting = get_option( 'loginpress_setting' );
339
+ $_expiration = isset( $loginpress_setting['session_expiration'] ) ? intval( $loginpress_setting['session_expiration'] ) : '';
340
+
341
+ /**
342
+ * return the WordPress default $expiration time if LoginPress Session Expiration time set 0 or empty.
343
+ * @since 1.0.18
344
+ */
345
+ if ( empty( $_expiration ) || '0' == $_expiration ) {
346
+ return $expiration;
347
+ }
348
 
349
+ /**
350
+ * $filter_role Use filter `loginpress_exclude_role_session` for return the role.
351
+ * By default it's false and $expiration time will apply on all user.
352
+ *
353
+ * @return string/array role name.
354
+ * @since 1.3.2
355
+ */
356
+ $filter_role = apply_filters( 'loginpress_exclude_role_session', false );
357
+
358
+ if ( $filter_role ) {
359
+ $user_roles = get_userdata( $user_id )->roles;
360
+
361
+ // if $filter_role is array, return the default $expiration for each defined role.
362
+ if ( is_array( $filter_role ) ) {
363
+ foreach ( $filter_role as $role ) {
364
+ if ( in_array( $role, $user_roles ) ) {
365
+ return $expiration;
366
+ }
367
+ }
368
+ } else if ( in_array( $filter_role, $user_roles ) ) {
369
+ return $expiration;
370
+ }
371
+ }
372
 
373
+ // Convert Duration (minutes) of the expiration period in seconds.
374
+ $expiration = $_expiration * 60;
375
 
376
+ return $expiration;
377
  }
378
 
379
  /**
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tested up to: 5.2
4
  Contributors: WPBrigade, hiddenpearls, AbdulWahab610
5
  Author URI: https://wpbrigade.com
6
  Tags: wp-login, login, login customizer, custom login, wordpress login,
7
- Stable tag: 1.3.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -214,11 +214,15 @@ Please visit <a target="_blank" rel="friend" href="https://WPBrigade.com/wordpre
214
 
215
  == Changelog ==
216
 
217
-
 
 
 
 
218
 
219
  = 1.3.1 – 2019-08-17 =
220
  * BugFix: Fatal error in wp-admin when WebARX is installed on site.
221
- * BugFix: Add compatibility with Password Protected plugin. logo URL fixed.
222
 
223
  = 1.3.0 – 2019-08-09 =
224
  * New Feature: Create Filter to remove LoginPress custom error messages.
@@ -526,5 +530,5 @@ Please visit <a target="_blank" rel="friend" href="https://WPBrigade.com/wordpre
526
 
527
  == Upgrade Notice ==
528
 
529
- = 1.3.1 =
530
  * Important Release, upgrade immediately.
4
  Contributors: WPBrigade, hiddenpearls, AbdulWahab610
5
  Author URI: https://wpbrigade.com
6
  Tags: wp-login, login, login customizer, custom login, wordpress login,
7
+ Stable tag: 1.3.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
214
 
215
  == Changelog ==
216
 
217
+ = 1.3.2 – 2019-10-23 =
218
+ * Bugfix: Firefox CSS conflict with premium templates.
219
+ * Bugfix: Compatible with Thrive Themes. Dequeue their stylesheet on login page only.
220
+ * Enhancement: Added a filter `loginpress_exclude_role_session` to exclude the user roles from session expiration.
221
+ * Enhancement: Compatible with Password Protected plugin. Login logo title fixed.
222
 
223
  = 1.3.1 – 2019-08-17 =
224
  * BugFix: Fatal error in wp-admin when WebARX is installed on site.
225
+ * Enhancement: Add compatibility with Password Protected plugin. logo URL fixed.
226
 
227
  = 1.3.0 – 2019-08-09 =
228
  * New Feature: Create Filter to remove LoginPress custom error messages.
530
 
531
  == Upgrade Notice ==
532
 
533
+ = 1.3.2 =
534
  * Important Release, upgrade immediately.