New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
correct for-attribute, move secret-input down #100
Conversation
get rid of the input-field. its useless. add a filter instead. |
put two filter in the |
antispam_bee.php
Outdated
* @param int $post_id The post ID. | ||
*/ | ||
return apply_filters( | ||
'get_secret_id_for_post', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefix is missing here.
antispam_bee.php
Outdated
* @param int $post_id The post ID. | ||
*/ | ||
return apply_filters( | ||
'ab_get_secret_for_post', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add name
in the filter?
refactored |
|
||
// Hidden field check | ||
if ( empty($hidden_field) && ! empty($plugin_field) ) { | ||
$_POST['comment'] = $plugin_field; | ||
unset( $_POST[ self::get_secret_for_post( $post_id ) ] ); | ||
unset( $_POST[ self::get_secret_name_for_post( $post_id ) ] ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be unset( $plugin_field )
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could unset this too. But I think the general idea here is more get rid of the extra $_POST
-field after the data has been transfered to $_POST['comment']
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, nevermind, I misread the code.
Solves #99