Commit 532f19b259 for wordpress.org
commit 532f19b259bd8b389b6f0b10eba865727909193a
Author: whyisjake <whyisjake@git.wordpress.org>
Date: Tue Nov 10 18:51:00 2026 +0000
Docs: Mark the internal Secrets API helper functions as private.
Adds `@access private` to the eight underscore-prefixed functions in `wp-includes/secrets.php`: `_wp_secrets_get_store()`, `_wp_secrets_get_key_manager()`, `_wp_secrets_get_provider()`, `_wp_secrets_set()`, `_wp_secrets_get()`, `_wp_secrets_delete()`, `_wp_secrets_retire()` and `_wp_secrets_list()`.
These are internal helpers that only core calls. The tag makes the code reference show that they are not meant for plugins or themes.
Follow-up to r64337.
Props wildworks.
Fixes #66187.
Built from https://develop.svn.wordpress.org/trunk@65395
git-svn-id: http://core.svn.wordpress.org/trunk@64534 1a063a9b-81f0-0310-95a4-ce76da25c4cd
diff --git a/wp-includes/secrets.php b/wp-includes/secrets.php
index 0a8163c3e8..ce574beb7e 100644
--- a/wp-includes/secrets.php
+++ b/wp-includes/secrets.php
@@ -317,6 +317,7 @@ function wp_secrets_validate_name( string $name ) {
* be the exact silent downgrade this API refuses to make.
*
* @since 7.2.0
+ * @access private
*
* @global bool $wp_secrets_dropin_broken Whether the secrets.php drop-in failed to load cleanly.
* @global WP_Secrets_Store $wp_secrets_store Optional. Store override set by the drop-in.
@@ -356,6 +357,7 @@ function _wp_secrets_get_store(): WP_Secrets_Store {
* fails closed (WP_Secrets_Broken_Keyring) rather than falling back to the default.
*
* @since 7.2.0
+ * @access private
*
* @global bool $wp_secrets_dropin_broken Whether the secrets.php drop-in failed to load cleanly.
* @global WP_Secrets_Keyring $wp_secrets_keyring Optional. Keyring override set by the drop-in.
@@ -632,6 +634,7 @@ function wp_list_network_secrets( string $namespace = '' ) { // phpcs:ignore Uni
* to be empty.
*
* @since 7.2.0
+ * @access private
*
* @global bool $wp_secrets_dropin_broken Whether the secrets.php drop-in failed to load cleanly.
* @global WP_Secrets_Provider $wp_secrets_provider Optional. Provider override set by the drop-in.
@@ -781,6 +784,7 @@ function wp_secrets_provider_label(): string {
* Shared implementation behind wp_set_secret() and wp_set_network_secret().
*
* @since 7.2.0
+ * @access private
*
* @param string $name The secret's name.
* @param string $value The plaintext value.
@@ -805,6 +809,7 @@ function _wp_secrets_set(
* Shared implementation behind wp_get_secret() and wp_get_network_secret().
*
* @since 7.2.0
+ * @access private
*
* @param string $name The secret's name.
* @param string $version A WP_Secret_Version constant.
@@ -840,6 +845,7 @@ function _wp_secrets_get( string $name, string $version, bool $network ) {
* Shared implementation behind wp_delete_secret() and wp_delete_network_secret().
*
* @since 7.2.0
+ * @access private
*
* @param string $name The secret's name.
* @param bool $network Whether this is a network-scope secret.
@@ -853,6 +859,7 @@ function _wp_secrets_delete( string $name, bool $network ) {
* Shared implementation behind wp_retire_secret_version() and its network twin.
*
* @since 7.2.0
+ * @access private
*
* @param string $name The secret's name.
* @param bool $network Whether this is a network-scope secret.
@@ -866,6 +873,7 @@ function _wp_secrets_retire( string $name, bool $network ) {
* Shared implementation behind wp_list_secrets() and wp_list_network_secrets().
*
* @since 7.2.0
+ * @access private
*
* @param string $name_prefix Restrict to names beginning with this prefix.
* @param bool $network Whether to list network-scope secrets.
diff --git a/wp-includes/version.php b/wp-includes/version.php
index 23c5e3bc98..1492d479dc 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
-$wp_version = '7.2-beta5-65394';
+$wp_version = '7.2-beta5-65395';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.