mirror of
https://gh.wpcy.net/https://github.com/webguyio/dam-spam.git
synced 2026-05-25 03:03:57 +08:00
22 lines
667 B
PHP
22 lines
667 B
PHP
<?php
|
|
|
|
if ( !defined( 'ABSPATH' ) ) {
|
|
status_header( 404 );
|
|
exit;
|
|
}
|
|
|
|
class dam_spam_check_form extends dam_spam_module {
|
|
public function process( $ip, &$stats = array(), &$options = array(), &$post = array() ) {
|
|
$uri = isset( $_SERVER['REQUEST_URI'] ) ? sanitize_text_field( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : '';
|
|
if ( strpos( $uri, 'wp-comments-post.php' ) !== false ) {
|
|
return false;
|
|
}
|
|
if ( strpos( $uri, 'wp-login.php' ) !== false ) {
|
|
return false;
|
|
}
|
|
// translators: %s is the URI that's not a standard form
|
|
return sprintf( esc_html__( 'Post request not in wp-comments-post.php or wp-login.php — %s', 'dam-spam' ), $uri );
|
|
}
|
|
}
|
|
|
|
?>
|