diff options
Diffstat (limited to 'plugins/akismet/_inc/akismet.js')
-rw-r--r-- | plugins/akismet/_inc/akismet.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/plugins/akismet/_inc/akismet.js b/plugins/akismet/_inc/akismet.js index 8ed3add1..6cb85e6c 100644 --- a/plugins/akismet/_inc/akismet.js +++ b/plugins/akismet/_inc/akismet.js @@ -146,10 +146,15 @@ jQuery( function ( $ ) { } ); } ); - $('.checkforspam:not(.button-disabled)').click( function(e) { + $( '.checkforspam' ).click( function( e ) { e.preventDefault(); - $('.checkforspam:not(.button-disabled)').addClass('button-disabled'); + if ( $( this ).hasClass( 'button-disabled' ) ) { + window.location.href = $( this ).data( 'success-url' ).replace( '__recheck_count__', 0 ).replace( '__spam_count__', 0 ); + return; + } + + $('.checkforspam').addClass('button-disabled').addClass( 'checking' ); $('.checkforspam-spinner').addClass( 'spinner' ).addClass( 'is-active' ); // Update the label on the "Check for Spam" button to use the active "Checking for Spam" language. |