wp_shake_js [ WordPress Function ]
wp_shake_js ( No parameters )
| Defined at: |
|
No description yet.
Source
<?php
function wp_shake_js() {
if ( wp_is_mobile() )
return;
?>
<script type="text/javascript">
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();}}};
function s(id,pos){g(id).left=pos+'px';}
function g(id){return document.getElementById(id).style;}
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){}}}
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);});
</script>
<?php
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- PHPXRef 0.7 : WordPress : Function Reference: wp_shake_js()
Function and Method Cross Reference. wp_shake_js(). Defined at: /wp-login.php -> line 147. No references found. Generated: Wed May 23 03:56:22 2012 ...
phpxref.ftwr.co.uk - PHPXRef 0.7 : WordPress : Detail view of wp-login.php
login_footer() wp_shake_js() s() g() shake() retrieve_password() ...
phpxref.ftwr.co.uk - [Plugin: SimpleModal Login] remove shake effect - WordPress
If you want to remove it now, you can add the following to your functions.php file: function my_login_head() { remove_action('login_head', 'wp_shake_js', 12); } ...
wordpress.org - PHPXRef 0.7 : WordPress (Trunk) : Detail view of wp-login.php
login_footer() wp_shake_js() s() g() shake() retrieve_password() ...
lab.yukei.net