REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 1.90 KB
Close
/home/nshryvcy/radiantskinclinics.org/wp-content/plugins/wpforms-lite/src/Tasks/Actions/PurgeSpamTask.php
Text
Base64
<?php namespace WPForms\Tasks\Actions; use WPForms\Tasks\Task; /** * Class PurgeSpamTask. * * @since 1.9.1 */ class PurgeSpamTask extends Task { /** * Action name for this task. * * @since 1.9.1 */ const ACTION = 'wpforms_process_purge_spam'; /** * Interval in seconds. * * @since 1.9.1 * * @var int */ private $interval; /** * Tasks class instance. * * @since 1.9.1 * * @var Tasks */ private $tasks; /** * Log title. * * @since 1.9.1 * * @var string */ protected $log_title = 'Purge Spam'; /** * Class constructor. * * @since 1.9.1 */ public function __construct() { parent::__construct( self::ACTION ); $this->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.' ); } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 12
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
AsyncRequestTask.php
1.09 KB
lrw-r--r--
2025-04-24 14:53:30
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
DomainAutoRegistrationTask.php
2.38 KB
lrw-r--r--
2024-09-26 15:36:36
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
EntryEmailsMetaCleanupTask.php
2.11 KB
lrw-r--r--
2024-09-26 15:36:36
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
EntryEmailsTask.php
1.34 KB
lrw-r--r--
2020-03-19 18:01:16
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
FormsLocatorScanTask.php
12.73 KB
lrw-r--r--
2024-09-26 15:36:36
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
IconChoicesFontAwesomeUpgradeTask.php
3.07 KB
lrw-r--r--
2024-09-26 15:36:36
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Migration173Task.php
5.30 KB
lrw-r--r--
2024-09-26 15:36:36
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Migration175Task.php
11.82 KB
lrw-r--r--
2024-09-26 15:36:36
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
PurgeSpamTask.php
1.90 KB
lrw-r--r--
2024-09-26 15:36:36
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
SquareSubscriptionTransactionIDTask.php
3.04 KB
lrw-r--r--
2025-04-24 14:53:30
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
StripeLinkSubscriptionsTask.php
6.81 KB
lrw-r--r--
2024-09-26 15:36:36
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
WebhooksAutoConfigurationTask.php
2.39 KB
lrw-r--r--
2024-09-26 15:36:36
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).