WordPress.org

Make WordPress Core

Ticket #35188: 35188-4.patch

File 35188-4.patch, 1.0 KB (added by dwainm, 3 years ago)

Adding changelog entries

  • src/wp-includes/pluggable.php

     
    17711771 * updated, e.g. by autosave.
    17721772 *
    17731773 * @since 2.5.0
     1774 * @since 4.6.0 Added `action` argument.
    17741775 *
     1776 * @param string|int $action the current action.
     1777 *
    17751778 * @return float Float value rounded up to the next highest integer.
    17761779 */
    1777 function wp_nonce_tick() {
     1780function wp_nonce_tick( $action = -1 ) {
    17781781        /**
    17791782         * Filters the lifespan of nonces in seconds.
    17801783         *
    17811784         * @since 2.5.0
     1785         * @since 4.6.0 Added `action` argument to allow for more targeted filters.
    17821786         *
    17831787         * @param int $lifespan Lifespan of nonces in seconds. Default 86,400 seconds, or one day.
     1788         * @param string|int $action The current nonce action.
    17841789         */
    1785         $nonce_life = apply_filters( 'nonce_life', DAY_IN_SECONDS );
     1790        $nonce_life = apply_filters( 'nonce_life', DAY_IN_SECONDS, $action );
    17861791
    17871792        return ceil(time() / ( $nonce_life / 2 ));
    17881793}