Submit
Path:
~
/
/
var
/
softaculous
/
sitepad
/
editor
/
site-data
/
plugins
/
kkart-pro
/
packages
/
action-scheduler
/
classes
/
File Content:
ActionScheduler_FatalErrorMonitor.php
<?php /** * Class ActionScheduler_FatalErrorMonitor */ class ActionScheduler_FatalErrorMonitor { /** @var ActionScheduler_ActionClaim */ private $claim = NULL; /** @var ActionScheduler_Store */ private $store = NULL; private $action_id = 0; public function __construct( ActionScheduler_Store $store ) { $this->store = $store; } public function attach( ActionScheduler_ActionClaim $claim ) { $this->claim = $claim; add_action( 'shutdown', array( $this, 'handle_unexpected_shutdown' ) ); add_action( 'action_scheduler_before_execute', array( $this, 'track_current_action' ), 0, 1 ); add_action( 'action_scheduler_after_execute', array( $this, 'untrack_action' ), 0, 0 ); add_action( 'action_scheduler_execution_ignored', array( $this, 'untrack_action' ), 0, 0 ); add_action( 'action_scheduler_failed_execution', array( $this, 'untrack_action' ), 0, 0 ); } public function detach() { $this->claim = NULL; $this->untrack_action(); remove_action( 'shutdown', array( $this, 'handle_unexpected_shutdown' ) ); remove_action( 'action_scheduler_before_execute', array( $this, 'track_current_action' ), 0 ); remove_action( 'action_scheduler_after_execute', array( $this, 'untrack_action' ), 0 ); remove_action( 'action_scheduler_execution_ignored', array( $this, 'untrack_action' ), 0 ); remove_action( 'action_scheduler_failed_execution', array( $this, 'untrack_action' ), 0 ); } public function track_current_action( $action_id ) { $this->action_id = $action_id; } public function untrack_action() { $this->action_id = 0; } public function handle_unexpected_shutdown() { if ( $error = error_get_last() ) { if ( in_array( $error['type'], array( E_ERROR, E_PARSE, E_COMPILE_ERROR, E_USER_ERROR, E_RECOVERABLE_ERROR ) ) ) { if ( !empty($this->action_id) ) { $this->store->mark_failure( $this->action_id ); do_action( 'action_scheduler_unexpected_shutdown', $this->action_id, $error ); } } $this->store->release_claim( $this->claim ); } } }
Submit
FILE
FOLDER
Name
Size
Permission
Action
WP_CLI
---
0755
abstracts
---
0755
actions
---
0755
data-stores
---
0755
migration
---
0755
schedules
---
0755
schema
---
0755
ActionScheduler_ActionClaim.php
374 bytes
0644
ActionScheduler_ActionFactory.php
7939 bytes
0644
ActionScheduler_AdminView.php
5161 bytes
0644
ActionScheduler_AsyncRequest_QueueRunner.php
2221 bytes
0644
ActionScheduler_Compatibility.php
3143 bytes
0644
ActionScheduler_DataController.php
5263 bytes
0644
ActionScheduler_DateTime.php
1592 bytes
0644
ActionScheduler_Exception.php
211 bytes
0644
ActionScheduler_FatalErrorMonitor.php
2023 bytes
0644
ActionScheduler_InvalidActionException.php
1255 bytes
0644
ActionScheduler_ListTable.php
19023 bytes
0644
ActionScheduler_LogEntry.php
1764 bytes
0644
ActionScheduler_NullLogEntry.php
219 bytes
0644
ActionScheduler_OptionLock.php
1777 bytes
0644
ActionScheduler_QueueCleaner.php
5140 bytes
0644
ActionScheduler_QueueRunner.php
7530 bytes
0644
ActionScheduler_Versions.php
1263 bytes
0644
ActionScheduler_WPCommentCleaner.php
4392 bytes
0644
ActionScheduler_wcSystemStatus.php
4512 bytes
0644
N4ST4R_ID | Naxtarrr