HEX
Server: Apache
System: Linux cpanelx.inxs.ro 4.18.0-477.27.2.lve.el8.x86_64 #1 SMP Wed Oct 11 12:32:56 UTC 2023 x86_64
User: crowdandsafety (1041)
PHP: 8.1.34
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/crowdandsafety/public_html/wp-content/plugins/wp-crontrol/src/Event/StandardEvent.php
<?php
/**
 * Represents a standard WordPress cron event.
 */

namespace Crontrol\Event;

use Crontrol\Context\UserContext;
use Crontrol\Context\FeatureContext;

use function Crontrol\json_output;

/**
 * Represents a standard WordPress cron event.
 */
final class StandardEvent extends Event {
	#[\Override]
	public function editable( UserContext $user, FeatureContext $features ): bool {
		return $user->can_edit_standard_cron_events();
	}

	#[\Override]
	public function runnable( UserContext $user, FeatureContext $features ): bool {
		return $user->can_run_standard_cron_events()
			&& ! $this->has_error()
			&& ! $this->is_paused();
	}

	#[\Override]
	public function deletable( UserContext $user, FeatureContext $features ): bool {
		return $user->can_delete_standard_cron_events();
	}

	#[\Override]
	public function pausable(): bool {
		return true;
	}

	#[\Override]
	public function get_args_display(): string {
		if ( empty( $this->args ) ) {
			return '';
		}
		return json_output( $this->args, false );
	}

	#[\Override]
	public function is_enabled( FeatureContext $features ): bool {
		return true;
	}
}