Edit File by line
/home/zeestwma/richards.../wp-conte.../plugins/hostinge.../includes/Admin/Jobs
File: ActionScheduler.php
<?php
[0] Fix | Delete
[1] Fix | Delete
namespace Hostinger\Admin\Jobs;
[2] Fix | Delete
[3] Fix | Delete
defined( 'ABSPATH' ) || exit;
[4] Fix | Delete
[5] Fix | Delete
class ActionScheduler {
[6] Fix | Delete
[7] Fix | Delete
public const STATUS_PENDING = 'pending';
[8] Fix | Delete
public const STATUS_COMPLETE = 'complete';
[9] Fix | Delete
public const STATUS_FAILED = 'failed';
[10] Fix | Delete
[11] Fix | Delete
public function get_group(): string {
[12] Fix | Delete
return defined( 'HOSTINGER_PLUGIN_SETTINGS_OPTION' ) ? HOSTINGER_PLUGIN_SETTINGS_OPTION : 'hostinger_tools';
[13] Fix | Delete
}
[14] Fix | Delete
[15] Fix | Delete
public function schedule_single( int $timestamp, string $hook, $args = array() ): int {
[16] Fix | Delete
if ( ! function_exists( 'as_schedule_single_action' ) ) {
[17] Fix | Delete
return 0;
[18] Fix | Delete
}
[19] Fix | Delete
[20] Fix | Delete
return as_schedule_single_action( $timestamp, $hook, $args, $this->get_group() );
[21] Fix | Delete
}
[22] Fix | Delete
[23] Fix | Delete
public function schedule_immediate( string $hook, $args = array() ): int {
[24] Fix | Delete
if ( ! function_exists( 'as_schedule_single_action' ) ) {
[25] Fix | Delete
return 0;
[26] Fix | Delete
}
[27] Fix | Delete
[28] Fix | Delete
return as_schedule_single_action( gmdate( 'U' ) - 1, $hook, $args, $this->get_group() );
[29] Fix | Delete
}
[30] Fix | Delete
[31] Fix | Delete
public function has_scheduled_action( string $hook, $args = array() ): bool {
[32] Fix | Delete
if ( ! function_exists( 'as_next_scheduled_action' ) ) {
[33] Fix | Delete
return false;
[34] Fix | Delete
}
[35] Fix | Delete
[36] Fix | Delete
return as_next_scheduled_action( $hook, $args, $this->get_group() ) !== false;
[37] Fix | Delete
}
[38] Fix | Delete
}
[39] Fix | Delete
[40] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function