mirror of
https://gh.wpcy.net/https://github.com/webguyio/dam-spam.git
synced 2026-05-25 03:03:57 +08:00
21 lines
No EOL
502 B
PHP
21 lines
No EOL
502 B
PHP
<?php
|
|
|
|
if ( !defined( 'ABSPATH' ) ) {
|
|
status_header( 404 );
|
|
exit;
|
|
}
|
|
|
|
class dam_spam_check_scripts extends dam_spam_module {
|
|
public function process( $ip, &$stats = array(), &$options = array(), &$post = array() ) {
|
|
$sname = $this->getSname();
|
|
if ( strpos( $sname, 'wp-cron.php' ) !== false ) {
|
|
return esc_html__( 'allow wp-cron', 'dam-spam' );
|
|
}
|
|
if ( strpos( $sname, 'admin-ajax.php' ) !== false ) {
|
|
return esc_html__( 'allow admin-ajax.php', 'dam-spam' );
|
|
}
|
|
return false;
|
|
}
|
|
}
|
|
|
|
?>
|