deactivate the akismet nonce when processing our comments (#391)

This commit is contained in:
Matt Wiebe 2023-08-16 10:12:31 -05:00 committed by GitHub
parent 78870cd206
commit 9e73081668
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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' );