Make WordPress Core

Changeset 59735


Ignore:
Timestamp:
01/30/2025 12:00:18 AM (3 months ago)
Author:
peterwilsoncc
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/option.php

    r59631 r59735  
    15971597         * Fires after the value for a transient has been set.
    15981598         *
    1599          * @since 3.0.0
    1600          * @since 3.6.0 The `$value` and `$expiration` parameters were added.
     1599         * @since 6.8.0
    16011600         *
    16021601         * @param string $transient  The name of the transient.
     
    16041603         * @param int    $expiration Time until expiration in seconds.
    16051604         */
    1606         do_action( 'setted_transient', $transient, $value, $expiration );
     1605        do_action( 'set_transient', $transient, $value, $expiration );
     1606
     1607        /**
     1608         * Fires after the transient is set.
     1609         *
     1610         * @since 3.0.0
     1611         * @since 3.6.0 The `$value` and `$expiration` parameters were added.
     1612         * @deprecated 6.8.0 Use {@see 'set_transient'} instead.
     1613         *
     1614         * @param string $transient  The name of the transient.
     1615         * @param mixed  $value      Transient value.
     1616         * @param int    $expiration Time until expiration in seconds.
     1617         */
     1618        do_action_deprecated( 'setted_transient', array( $transient, $value, $expiration ), '6.8.0', 'set_transient' );
    16071619    }
    16081620
     
    26772689         * Fires after the value for a site transient has been set.
    26782690         *
    2679          * @since 3.0.0
     2691         * @since 6.8.0
    26802692         *
    26812693         * @param string $transient  The name of the site transient.
     
    26832695         * @param int    $expiration Time until expiration in seconds.
    26842696         */
    2685         do_action( 'setted_site_transient', $transient, $value, $expiration );
     2697        do_action( 'set_site_transient', $transient, $value, $expiration );
     2698
     2699        /**
     2700         * Fires after the value for a site transient has been set.
     2701         *
     2702         * @since 3.0.0
     2703         * @deprecated 6.8.0 Use {@see 'set_site_transient'} instead.
     2704         *
     2705         * @param string $transient  The name of the site transient.
     2706         * @param mixed  $value      Site transient value.
     2707         * @param int    $expiration Time until expiration in seconds.
     2708         */
     2709        do_action_deprecated( 'setted_site_transient', array( $transient, $value, $expiration ), '6.8.0', 'set_site_transient' );
    26862710    }
    26872711
Note: See TracChangeset for help on using the changeset viewer.