]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-content/plugins/akismet/_inc/form.js
WordPress 3.9
[autoinstalls/wordpress.git] / wp-content / plugins / akismet / _inc / form.js
diff --git a/wp-content/plugins/akismet/_inc/form.js b/wp-content/plugins/akismet/_inc/form.js
new file mode 100644 (file)
index 0000000..ec5e56e
--- /dev/null
@@ -0,0 +1,17 @@
+jQuery( function ( $ ) {
+       var ak_js = $( '#ak_js' );
+
+       // If the form field already exists just use that
+       if ( ak_js.length == 0 ) {
+               ak_js = $( '<input type="hidden" id="ak_js" name="ak_js" />' );
+       }
+       else {
+               ak_js.remove();
+       }
+
+       ak_js.val( ( new Date() ).getTime() );
+
+       // single page, front-end comment form
+       // inline comment reply, wp-admin
+       $( '#commentform, #replyrow td:first' ).append( ak_js );
+} );