DEV Community

Mammoth WP
Mammoth WP

Posted on

The Secrets API is out of WordPress 7.2. What that means for your plugin

The Secrets API was announced for WordPress 7.2 with a dev note on 11 November. Before RC1, core reverted it in changeset 65538.

The commit message gives two reasons. Feedback on the dev note questioned whether writing secrets belongs in the same API as reading secrets a host provides. A review also found that the new manage_secrets and manage_network_secrets capabilities were not checked when a secret was set. Rather than rework it late in the cycle, it was pulled so the design can be revisited. No later release has been named yet.

If you maintain a plugin that stores API keys:

  • Keep your current storage for 7.2. Don't migrate keys to an API that won't ship.
  • If you already wrote code for wp_get_secret(), make sure nothing calls it on a site where it doesn't exist.
  • Test against 7.2 RC1, not an earlier beta that still had the API.
  • Watch the core channels for the redesign. The read side and the write side may come back as different things.

We posted a Secrets API tip on 17 November. This is our correction.

Changeset: https://core.trac.wordpress.org/changeset/65538

Drafted with AI assistance and reviewed by the MammothWP team.

Top comments (0)