From 3bc4da626768f4c9ed5c3d13b06f909cd81d6329 Mon Sep 17 00:00:00 2001 From: Peter Wilson Date: Thu, 30 Jan 2025 00:02:18 +0000 Subject: [PATCH] Options/Meta APIs: Rename `setted_(site_)_transient` to `set_...`. Deprecate the actions `setted_transient` and `setted_site_transient` in favour of `set_transient` and `set_site_transient` respectively. This serves two purposes, the name is consistent with the transient specific actions `set_(site_)_transient_{$transient}`, and to make the names grammatically correct. Props sukhendu2002, swissspidy, johnbillion, peterwilsoncc. Fixes #62849. Built from https://develop.svn.wordpress.org/trunk@59735 git-svn-id: http://core.svn.wordpress.org/trunk@59077 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/option.php | 34 +++++++++++++++++++++++++++++----- wp-includes/version.php | 2 +- 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/wp-includes/option.php b/wp-includes/option.php index 4b26504b76..8114b51bc7 100644 --- a/wp-includes/option.php +++ b/wp-includes/option.php @@ -1596,14 +1596,26 @@ function set_transient( $transient, $value, $expiration = 0 ) { /** * Fires after the value for a transient has been set. * - * @since 3.0.0 - * @since 3.6.0 The `$value` and `$expiration` parameters were added. + * @since 6.8.0 * * @param string $transient The name of the transient. * @param mixed $value Transient value. * @param int $expiration Time until expiration in seconds. */ - do_action( 'setted_transient', $transient, $value, $expiration ); + do_action( 'set_transient', $transient, $value, $expiration ); + + /** + * Fires after the transient is set. + * + * @since 3.0.0 + * @since 3.6.0 The `$value` and `$expiration` parameters were added. + * @deprecated 6.8.0 Use {@see 'set_transient'} instead. + * + * @param string $transient The name of the transient. + * @param mixed $value Transient value. + * @param int $expiration Time until expiration in seconds. + */ + do_action_deprecated( 'setted_transient', array( $transient, $value, $expiration ), '6.8.0', 'set_transient' ); } return $result; @@ -2676,13 +2688,25 @@ function set_site_transient( $transient, $value, $expiration = 0 ) { /** * Fires after the value for a site transient has been set. * - * @since 3.0.0 + * @since 6.8.0 * * @param string $transient The name of the site transient. * @param mixed $value Site transient value. * @param int $expiration Time until expiration in seconds. */ - do_action( 'setted_site_transient', $transient, $value, $expiration ); + do_action( 'set_site_transient', $transient, $value, $expiration ); + + /** + * Fires after the value for a site transient has been set. + * + * @since 3.0.0 + * @deprecated 6.8.0 Use {@see 'set_site_transient'} instead. + * + * @param string $transient The name of the site transient. + * @param mixed $value Site transient value. + * @param int $expiration Time until expiration in seconds. + */ + do_action_deprecated( 'setted_site_transient', array( $transient, $value, $expiration ), '6.8.0', 'set_site_transient' ); } return $result; diff --git a/wp-includes/version.php b/wp-includes/version.php index dffe42a827..7b8153d32e 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.8-alpha-59734'; +$wp_version = '6.8-alpha-59735'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.