deactivate the akismet nonce when processing our comments (#391)
This commit is contained in:
parent
78870cd206
commit
9e73081668
1 changed files with 16 additions and 0 deletions
|
@ -362,6 +362,14 @@ class Inbox {
|
|||
// do not require email for AP entries
|
||||
\add_filter( 'pre_option_require_name_email', '__return_false' );
|
||||
|
||||
// No nonce possible for this submission route
|
||||
\add_filter(
|
||||
'akismet_comment_nonce',
|
||||
function() {
|
||||
return 'inactive';
|
||||
}
|
||||
);
|
||||
|
||||
$state = \wp_new_comment( $commentdata, true );
|
||||
|
||||
\remove_filter( 'pre_option_require_name_email', '__return_false' );
|
||||
|
@ -419,6 +427,14 @@ class Inbox {
|
|||
// do not require email for AP entries
|
||||
\add_filter( 'pre_option_require_name_email', '__return_false' );
|
||||
|
||||
// No nonce possible for this submission route
|
||||
\add_filter(
|
||||
'akismet_comment_nonce',
|
||||
function() {
|
||||
return 'inactive';
|
||||
}
|
||||
);
|
||||
|
||||
$state = \wp_new_comment( $commentdata, true );
|
||||
|
||||
\remove_filter( 'pre_option_require_name_email', '__return_false' );
|
||||
|
|
Loading…
Reference in a new issue