PluginProbe
WP Crontrol / trunk
WP Crontrol vtrunk
1.21.2 trunk 0.1 0.2 0.3 1.0 1.0-beta1 1.0-beta2 1.0-beta3 1.1 1.10.0 1.11.0 1.12.0 1.12.1 1.13.0 1.13.1 1.13.2 1.14.0 1.15.0 1.15.1 1.15.2 1.15.3 1.16.0 1.16.1 1.16.2 All 57 releases
wp-crontrol / src / Context / WordPressFeatureContext.php

WordPressFeatureContext.php in WP Crontrol trunk, at src/Context/WordPressFeatureContext.php

29 lines 646 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * WordPress feature flag context implementation.
4 *
5 * @package wp-crontrol
6 */
7
8 namespace Crontrol\Context;
9
10 use function Crontrol\php_cron_events_enabled;
11 use function Crontrol\url_cron_events_enabled;
12
13 /**
14 * FeatureContext implementation that checks WordPress constants and options.
15 *
16 * This is the production implementation that reads from the WordPress environment.
17 */
18 class WordPressFeatureContext implements FeatureContext {
19 #[\Override]
20 public function php_crons_enabled(): bool {
21 return php_cron_events_enabled();
22 }
23
24 #[\Override]
25 public function url_crons_enabled(): bool {
26 return url_cron_events_enabled();
27 }
28 }
29