pmichael/ptm-ajax-comments — Issue #3: No-JS fallback
Author: pmichael
Created: 2012-01-21 11:49:35+00:00
State: open
Labels: enhancement, minor

I notice that the plugin uses comment_post_redirect regardless of whether the comment is posted via the ajax call or via the standard form (i.e. if JS is disabled on client). I like this plugin, but our blog needs to work for noscript users, so perhaps something like this?
js/ptm-ajax-comments.dev.js:51 Add:
jQuery('#submit').after('');
lib/Class.PTM_AJAXCommentsFront.php:21 Add:
if(array_key_exists('ptm-enabled', $_POST))
add_action( 'comment_post_redirect', ...
Basically, neuter the plugin if the javascript-created "ptm-enabled" input is absent in the post handler. Agree?