/home/vianto5/hidalgoresidences.mx/wp-content/plugins/wpforms/src/Tasks/Actions
NameSizeModeActions
AsyncRequestTask.php11170644editdlrm
DomainAutoRegistrationTask.php24330644editdlrm
EntryEmailsMetaCleanupTask.php21640644editdlrm
EntryEmailsTask.php13700644editdlrm
FormsLocatorScanTask.php130350644editdlrm
IconChoicesFontAwesomeUpgradeTask.php31430644editdlrm
Migration173Task.php54240644editdlrm
Migration175Task.php121010644editdlrm
PurgeSpamTask.php19500644editdlrm
SquareSubscriptionTransactionIDTask.php31180644editdlrm
StripeLinkSubscriptionsTask.php69690644editdlrm
WebhooksAutoConfigurationTask.php24490644editdlrm
Edit: /home/vianto5/hidalgoresidences.mx/wp-content/plugins/wpforms/src/Tasks/Actions/PurgeSpamTask.php (1950B)
init(); $this->hooks(); } /** * Init. * * @since 1.9.1 */ public function init() { /** * Filter the interval for the purge spam task, in seconds. * * @since 1.9.1 * * @param int $interval Interval in seconds. * * @return int */ $this->interval = (int) apply_filters( 'wpforms_tasks_actions_purge_spam_task_interval', DAY_IN_SECONDS ); $this->tasks = wpforms()->obj( 'tasks' ); // Do not add a new one if scheduled. if ( $this->tasks->is_scheduled( self::ACTION ) !== false ) { if ( $this->interval <= 0 ) { $this->cancel(); } return; } $this->add_scan_task(); } /** * Add hooks. * * @since 1.9.1 */ public function hooks() { add_action( self::ACTION, [ $this, 'process' ] ); } /** * Add a new task. * * @since 1.9.1 */ private function add_scan_task() { if ( $this->interval <= 0 ) { return; } $this->tasks->create( self::ACTION ) ->recurring( time(), $this->interval ) ->params() ->register(); } /** * Purge spam action. * * @since 1.9.1 */ public function process() { $entry_obj = wpforms()->obj( 'entry' ); if ( ! $entry_obj ) { return; } $entry_obj->purge_spam(); $this->log( 'Purge spam completed.' ); } }