Changeset 47226 for trunk/src/wp-login.php
- Timestamp:
- 02/10/2020 01:50:33 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-login.php
r47219 r47226 63 63 64 64 if ( $shake_error_codes && $wp_error->has_errors() && in_array( $wp_error->get_error_code(), $shake_error_codes, true ) ) { 65 add_action( 'login_ head', 'wp_shake_js', 12 );65 add_action( 'login_footer', 'wp_shake_js', 12 ); 66 66 } 67 67 … … 336 336 ?> 337 337 <script type="text/javascript"> 338 addLoadEvent = function(func){if(typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}}; 339 function s(id,pos){g(id).left=pos+'px';} 340 function g(id){return document.getElementById(id).style;} 341 function shake(id,a,d){c=a.shift();s(id,c);if(a.length>0){setTimeout(function(){shake(id,a,d);},d);}else{try{g(id).position='static';wp_attempt_focus();}catch(e){}}} 342 addLoadEvent(function(){ var p=new Array(15,30,15,0,-15,-30,-15,0);p=p.concat(p.concat(p));var i=document.forms[0].id;g(i).position='relative';shake(i,p,20);}); 338 document.querySelector('form').classList.add('shake'); 343 339 </script> 344 340 <?php
Note: See TracChangeset
for help on using the changeset viewer.