You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: projects/plugins/jetpack/modules/sitemaps/abilities/class-sitemaps-abilities.php
+9-6Lines changed: 9 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -126,7 +126,7 @@ public static function get_abilities(): array {
126
126
127
127
'jetpack-sitemaps/request-rebuild' => array(
128
128
'label' => __( 'Request a Jetpack Sitemaps rebuild', 'jetpack' ),
129
-
'description' => __( 'Dispatch a full sitemap regeneration by scheduling the existing `jp_sitemap_cron_hook` cron event. Returns { dispatched, status, next_scheduled_at } where status is one of "queued" (a single-event cron tick was just scheduled), "running" (a build is already in flight per the `jetpack-sitemap-state-lock` transient), or "already_running" (alias of "running"; surfaced so callers can branch on either spelling). `next_scheduled_at` is the next `jp_sitemap_cron_hook` tick as a "YYYY-MM-DD HH:mm:ss" UTC string, or null when nothing is scheduled (e.g. status=running with no future tick queued) — it tells the caller when the build they queued (or the one already pending) will actually run. Idempotent — calling this while a build is already in flight or already queued returns dispatched=false and the matching status rather than stacking duplicate cron events.', 'jetpack' ),
129
+
'description' => __( 'Dispatch a full sitemap regeneration by scheduling the existing `jp_sitemap_cron_hook` cron event. Returns { dispatched, status, next_scheduled_at } where status is one of "queued" (a single-event cron tick was just scheduled), "running" (a build is already in flight per the `jetpack-sitemap-state-lock` transient), or "already_running" (alias of "running"; surfaced so callers can branch on either spelling). `next_scheduled_at` is the next `jp_sitemap_cron_hook` tick as an ISO 8601 UTC string with an explicit `Z` zone designator (e.g. `2026-05-19T19:33:20Z`), or null when nothing is scheduled (e.g. status=running with no future tick queued) — it tells the caller when the build they queued (or the one already pending) will actually run. Idempotent — calling this while a build is already in flight or already queued returns dispatched=false and the matching status rather than stacking duplicate cron events.', 'jetpack' ),
130
130
'input_schema' => array(
131
131
'type' => 'object',
132
132
'additionalProperties' => false,
@@ -423,22 +423,25 @@ protected static function schedule_rebuild(): void {
423
423
}
424
424
425
425
/**
426
-
* When the next `jp_sitemap_cron_hook` build tick is scheduled, as a UTC
427
-
* "Y-m-d H:i:s" string, or null when nothing is scheduled.
426
+
* When the next `jp_sitemap_cron_hook` build tick is scheduled, as an
427
+
* ISO 8601 UTC string (e.g. `2026-05-19T19:33:20Z`), or null when nothing
428
+
* is scheduled.
428
429
*
429
430
* Returned alongside the dispatch result so callers immediately know when
430
431
* the build they queued (or the one already pending) will actually run,
431
432
* without a second round-trip. Null in the `running` case when the lock is
432
433
* held but no future tick is queued.
433
434
*
434
-
* UTC string (not `human_time_diff()`) for an unambiguous, locale-stable,
435
-
* machine-parseable value consistent with the rest of the sitemaps surface.
435
+
* ISO 8601 with the explicit `Z` zone designator (not `human_time_diff()`,
436
+
* not a bare "Y-m-d H:i:s") so the timezone is unambiguous and the value is
437
+
* locale-stable and machine-parseable — the same format the `sitemaps[]`
0 commit comments