Changeset 7197 for trunk/src/includes/extend/akismet.php
- Timestamp:
- 04/26/2021 07:28:21 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/extend/akismet.php
r7196 r7197 209 209 if ( apply_filters( 'bbp_bypass_spam_enforcement', $skip_spam, $post_data ) ) { 210 210 return $post_data; 211 } 212 213 // Discard obvious spam 214 if ( get_option( 'akismet_strictness' ) ) { 215 216 // Akismet is 100% confident this is spam 217 if ( 218 ! empty( $post_data['bbp_akismet_result_headers']['x-akismet-pro-tip'] ) 219 && 220 ( 'discard' === $post_data['bbp_akismet_result_headers']['x-akismet-pro-tip'] ) 221 ) { 222 223 // URL to redirect to (current, or forum root) 224 $redirect_to = ( ! empty( $_SERVER['HTTP_HOST'] ) && ! empty( $_SERVER['REQUEST_URI'] ) ) 225 ? bbp_get_url_scheme() . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] 226 : bbp_get_root_url(); 227 228 // Do the redirect (post data not saved!) 229 bbp_redirect( $redirect_to ); 230 } 211 231 } 212 232
Note: See TracChangeset
for help on using the changeset viewer.