All features

Cherry Blossom feature

Updates: State

Stores the per-site parent-theme migration ledger.

Stores the per-site parent-theme migration ledger.

Capabilities and extension points

Persists parent-version and migration progress per WordPress site.

Lifecycle state option name.

  • var string

Gets stored lifecycle state with defaults for missing top-level keys.

  • return array { Per-site ledger; stored nested values are not deeply normalized.
  • type string $last_detected_version Last observed parent version.
  • type string $completed_version Last completed parent version.
  • type array $completed_migrations IDs mapped to version, operation and completed_at Unix timestamp.
  • type string $classification Current lifecycle classification.
  • type array|null $failure Operation, migration, message and failed_at Unix timestamp, or null. }

Replaces the per-site lifecycle state without autoloading it.

Prefer runner operations for normal maintenance. This low-level method replaces the whole ledger and does not validate or merge nested entries.

  • param array $state Lifecycle state.

Records the version and classification detected this request.

  • param string $version Running parent version.
  • param string $classification Lifecycle classification.

Records a completed migration in the persistent ledger.

  • param Migration|Interfaces\Migration $migration Migration instance.
  • param string $operation Migration operation.

Determines whether a migration is already complete.

  • param string $id Migration identifier.
  • return bool Whether the migration is complete.

Completes processing for the running parent version.

  • param string $version Running parent version.

Records a failed update operation.

  • param string $operation Operation being retried.
  • param string $migration Migration identifier.
  • param \Throwable $error Failure details.

Source reference

This editable reference page is based on the PHP documentation in updates/class-state.php.