Skip to content

Commit 24ecf5f

Browse files
committed
Update WP Crontrol plugin from 1.19.3 to 1.20.0
1 parent d0a4e82 commit 24ecf5f

42 files changed

Lines changed: 2108 additions & 789 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

wp-content/plugins/wp-crontrol/SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Security Policy
1+
# WP Crontrol Security Policy
22

33
## How can I report a security bug?
44

wp-content/plugins/wp-crontrol/composer.json

Lines changed: 32 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,13 @@
2626
}
2727
},
2828
"require-dev": {
29-
"behat/gherkin": "< 4.13.0",
30-
"codeception/module-asserts": "^1.0",
31-
"codeception/module-db": "^1.0",
32-
"codeception/module-webdriver": "^1.0",
33-
"codeception/util-universalframework": "^1.0",
34-
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
35-
"johnbillion/plugin-infrastructure": "dev-trunk",
36-
"johnbillion/wp-compat": "^1.2",
37-
"lucatume/wp-browser": "3.2.1",
38-
"phpcompatibility/phpcompatibility-wp": "2.1.6",
39-
"phpstan/phpstan": "2.1.12",
40-
"roots/wordpress-core-installer": "1.100.0",
41-
"roots/wordpress-full": "*",
42-
"szepeviktor/phpstan-wordpress": "2.0.1",
43-
"wp-coding-standards/wpcs": "3.1.0"
29+
"johnbillion/plugin-infrastructure": "2.1.7",
30+
"johnbillion/wp-compat": "1.4.0",
31+
"php-stubs/wordpress-stubs": "6.9.0",
32+
"phpcompatibility/phpcompatibility-wp": "2.1.8",
33+
"phpstan/phpstan": "2.1.33",
34+
"szepeviktor/phpstan-wordpress": "2.0.3",
35+
"wp-coding-standards/wpcs": "3.3.0"
4436
},
4537
"require": {
4638
"php": ">=7.4",
@@ -51,6 +43,11 @@
5143
"src"
5244
]
5345
},
46+
"autoload-dev": {
47+
"psr-4": {
48+
"Crontrol\\Tests\\": "tests/integration"
49+
}
50+
},
5451
"extra": {
5552
"wordpress-install-dir": "vendor/wordpress/wordpress"
5653
},
@@ -61,27 +58,43 @@
6158
"test": [
6259
"@composer validate --strict --no-check-lock",
6360
"@test:phpstan",
61+
"@test:phpcbf",
6462
"@test:phpcs",
65-
"tests-start",
63+
"@test:start",
64+
"@test:integration",
6665
"@test:acceptance",
67-
"tests-stop"
66+
"@test:stop"
6867
],
6968
"test:acceptance": [
7069
"acceptance-tests"
7170
],
71+
"test:integration": [
72+
"integration-tests"
73+
],
7274
"test:phpcs": [
7375
"phpcs -nps --colors --report-code --report-summary --report-width=80 --basepath=./ ."
7476
],
77+
"test:phpcbf": [
78+
"phpcbf -nps --colors --report-code --report-summary --report-width=80 --basepath=./ ."
79+
],
7580
"test:phpstan": [
76-
"codecept build #",
7781
"phpstan analyze -v --memory-limit=1024M"
82+
],
83+
"test:start": [
84+
"tests-start"
85+
],
86+
"test:stop": [
87+
"tests-stop"
88+
],
89+
"test:destroy": [
90+
"tests-destroy"
7891
]
7992
},
8093
"support": {
8194
"issues": "https://github.com/johnbillion/wp-crontrol/issues",
8295
"forum": "https://wordpress.org/support/plugin/wp-crontrol",
8396
"source": "https://github.com/johnbillion/wp-crontrol",
84-
"security": "https://patchstack.com/database/vdp/wp-crontrol"
97+
"security": "https://wp-crontrol.com/security/"
8598
},
8699
"funding": [
87100
{

wp-content/plugins/wp-crontrol/css/index.php

Lines changed: 0 additions & 4 deletions
This file was deleted.

wp-content/plugins/wp-crontrol/css/wp-crontrol.css

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@ table.wp-list-table {
1212
margin: 0;
1313
}
1414

15+
.wp-list-table details summary {
16+
cursor: pointer;
17+
}
18+
19+
.wp-list-table details pre {
20+
margin-top: 5px;
21+
}
22+
1523
.wp-list-table code {
1624
background: transparent;
1725
padding: 0;
@@ -36,8 +44,8 @@ table.wp-list-table {
3644
border-color: #d63638;
3745
}
3846

39-
.wp-list-table tr.crontrol-inactive .column-crontrol_next,
40-
.wp-list-table tr.crontrol-inactive .column-crontrol_schedule,
47+
.wp-list-table tr.crontrol-disabled .column-crontrol_next,
48+
.wp-list-table tr.crontrol-disabled .column-crontrol_schedule,
4149
.wp-list-table tr.crontrol-paused .column-crontrol_next,
4250
.wp-list-table tr.crontrol-paused .column-crontrol_schedule,
4351
.wp-list-table tr.crontrol-paused:not(.crontrol-no-action) .column-crontrol_actions {
@@ -69,7 +77,7 @@ table.wp-list-table {
6977
color: #d63638;
7078
}
7179

72-
.status-crontrol-inactive .dashicons {
80+
.status-crontrol-disabled .dashicons {
7381
background: #646970;
7482
border-radius: 50%;
7583
color: #fff;
@@ -108,3 +116,7 @@ input[type="time"][step="1"] {
108116
.crontrol-edit-event-php .crontrol-event-standard {
109117
display: none;
110118
}
119+
120+
#crontrol-event-not-found {
121+
margin-top: 2em;
122+
}

wp-content/plugins/wp-crontrol/index.php

Lines changed: 0 additions & 4 deletions
This file was deleted.

wp-content/plugins/wp-crontrol/js/index.php

Lines changed: 0 additions & 4 deletions
This file was deleted.

wp-content/plugins/wp-crontrol/readme.txt

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
Contributors: johnbillion, scompt
44
Tags: cron, wp-cron, crontrol, debug, woocommerce
5-
Tested up to: 6.8
6-
Stable tag: 1.19.3
5+
Tested up to: 6.9
6+
Stable tag: 1.20.0
77
License: GPL v2 or later
88
Donate link: https://github.com/sponsors/johnbillion
99

@@ -143,7 +143,7 @@ There are two steps to getting a functioning cron event that executes regularly.
143143

144144
*Step One: Adding the event*
145145

146-
From the Tools → Cron Events menu, click on Add New Cron Event. Fill out the details of the event. You're best off using a hook name that conforms to normal PHP variable naming conventions. The schedule is how often the event will be executed. If you don't see a good interval, then add one in the Settings → Cron Schedules menu.
146+
From the Tools → Cron Events menu, click on Add Cron Event. Fill out the details of the event. You're best off using a hook name that conforms to normal PHP variable naming conventions. The schedule is how often the event will be executed. If you don't see a good interval, then add one in the Settings → Cron Schedules menu.
147147

148148
*Step Two: Writing the function*
149149

@@ -163,13 +163,13 @@ function my_function() {
163163

164164
### How can I create a cron event that requests a URL?
165165

166-
From the Tools → Cron Events menu, click on Add New Cron Event. Select the "URL cron event" option, fill out the details, and press the "Add Event" button.
166+
From the Tools → Cron Events menu, click on Add Cron Event. Select the "URL cron event" option, fill out the details, and press the "Add Event" button.
167167

168168
[You can read all about the features and security of URL cron events on the WP Crontrol website](https://wp-crontrol.com/docs/url-cron-events/).
169169

170170
### How do I create a new PHP cron event?
171171

172-
From the Tools → Cron Events menu, click on Add New Cron Event. Select the "PHP cron event" option and enter the schedule and next run time. The event schedule is how often your event will be executed. If you don't see a good interval, then add one in the Settings → Cron Schedules menu. In the "PHP Code" area, enter the PHP code that should be run when your cron event is executed. You don't need to provide the PHP opening tag (`<?php`).
172+
From the Tools → Cron Events menu, click on Add Cron Event. Select the "PHP cron event" option and enter the schedule and next run time. The event schedule is how often your event will be executed. If you don't see a good interval, then add one in the Settings → Cron Schedules menu. In the "PHP Code" area, enter the PHP code that should be run when your cron event is executed. You don't need to provide the PHP opening tag (`<?php`).
173173

174174
Creating, editing, and running PHP cron events is subject to restrictive security permissions. [You can read all about the features and security of PHP cron events on the WP Crontrol website](https://wp-crontrol.com/docs/php-cron-events/).
175175

@@ -212,6 +212,13 @@ The photo was taken by <a href="https://www.flickr.com/photos/michaelpardo/21453
212212
3. New cron schedules can be added, giving plugin developers more options when scheduling events
213213
## Changelog ##
214214

215+
### 1.20.0 (17 December 2025) ###
216+
217+
* Confirms support for WordPress 6.9
218+
* Minor UI and UX improvements
219+
* Some architectural changes to prepare for future enhancements
220+
221+
215222
### 1.19.3 (23 October 2025) ###
216223

217224
* Corrects the handling of closures as cron event actions.
@@ -262,10 +269,6 @@ The photo was taken by <a href="https://www.flickr.com/photos/michaelpardo/21453
262269
* Confirms support for WordPress 6.5
263270

264271

265-
### 1.16.1 (16 November 2023) ###
266-
267-
* Confirms support for WordPress 6.4
268-
269272
### Earlier versions ###
270273

271274
For the changelog of earlier versions, <a href="https://github.com/johnbillion/wp-crontrol/releases">refer to the releases page on GitHub</a>.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
/**
3+
* Feature flag context for WP Crontrol.
4+
*
5+
* @package wp-crontrol
6+
*/
7+
8+
namespace Crontrol\Context;
9+
10+
/**
11+
* Interface for checking feature flags.
12+
*
13+
* Provides methods to check if various cron event features are enabled.
14+
*/
15+
interface FeatureContext {
16+
/**
17+
* Check whether PHP cron events are enabled globally on the site.
18+
*/
19+
public function php_crons_enabled(): bool;
20+
21+
/**
22+
* Check whether URL cron events are enabled globally on the site.
23+
*/
24+
public function url_crons_enabled(): bool;
25+
}
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
<?php
2+
/**
3+
* User capability context for WP Crontrol.
4+
*
5+
* @package wp-crontrol
6+
*/
7+
8+
namespace Crontrol\Context;
9+
10+
/**
11+
* Interface for checking user capabilities.
12+
*
13+
* Provides methods to check if the current user has permission to perform
14+
* various operations on different types of cron events.
15+
*/
16+
interface UserContext {
17+
/**
18+
* Check if the user can create PHP cron events.
19+
*/
20+
public function can_create_php_cron_events(): bool;
21+
22+
/**
23+
* Check if the user can edit PHP cron events.
24+
*/
25+
public function can_edit_php_cron_events(): bool;
26+
27+
/**
28+
* Check if the user can delete PHP cron events.
29+
*/
30+
public function can_delete_php_cron_events(): bool;
31+
32+
/**
33+
* Check if the user can run PHP cron events.
34+
*/
35+
public function can_run_php_cron_events(): bool;
36+
37+
/**
38+
* Check if the user can create URL cron events.
39+
*/
40+
public function can_create_url_cron_events(): bool;
41+
42+
/**
43+
* Check if the user can edit URL cron events.
44+
*/
45+
public function can_edit_url_cron_events(): bool;
46+
47+
/**
48+
* Check if the user can delete URL cron events.
49+
*/
50+
public function can_delete_url_cron_events(): bool;
51+
52+
/**
53+
* Check if the user can run URL cron events.
54+
*/
55+
public function can_run_url_cron_events(): bool;
56+
57+
/**
58+
* Check if the user can create standard cron events.
59+
*/
60+
public function can_create_standard_cron_events(): bool;
61+
62+
/**
63+
* Check if the user can edit standard cron events.
64+
*/
65+
public function can_edit_standard_cron_events(): bool;
66+
67+
/**
68+
* Check if the user can delete standard cron events.
69+
*/
70+
public function can_delete_standard_cron_events(): bool;
71+
72+
/**
73+
* Check if the user can run standard cron events.
74+
*/
75+
public function can_run_standard_cron_events(): bool;
76+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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+
}

0 commit comments

Comments
 (0)