|
Server : LiteSpeed System : Linux quebec.us.hostns.io 5.14.0-687.42.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Aug 27 11:55:12 EDT 2026 x86_64 User : gazetufm ( 1431) PHP Version : 8.1.35 Disable Function : NONE Directory : /home2/gazetufm/public_html/wp/wp-content/plugins/wp-crontrol/src/Event/ | |
|
Path: //home2/gazetufm/public_html/wp/wp-content/plugins/wp-crontrol/src/Event/StandardEvent.php
Size: 1.09 KB
Permissions: 0644
<?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;
}
}