wp_shake_js() WordPress Function
The wp_shake_js() function is used to trigger a browser-specific "shake" effect. This is typically used to indicate an error condition to the user.
wp_shake_js() #
Outputs the JavaScript to handle the form shaking on the login page.
Source
File: wp-login.php
function wp_shake_js() {
?>
<script type="text/javascript">
document.querySelector('form').classList.add('shake');
</script>
<?php
}
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
| Version | Description |
|---|---|
| 3.0.0 | Introduced. |