Make WordPress Core

Ticket #35188: 35188-3.patch

File 35188-3.patch, 897 bytes (added by dwainm, 9 years ago)

35188-patch-3

  • src/wp-includes/pluggable.php

     
    17721772 *
    17731773 * @since 2.5.0
    17741774 *
     1775 * @param string|int $action the current action.
     1776 *
    17751777 * @return float Float value rounded up to the next highest integer.
    17761778 */
    1777 function wp_nonce_tick() {
     1779function wp_nonce_tick( $action = -1 ) {
    17781780        /**
    17791781         * Filters the lifespan of nonces in seconds.
    17801782         *
     
    17811783         * @since 2.5.0
    17821784         *
    17831785         * @param int $lifespan Lifespan of nonces in seconds. Default 86,400 seconds, or one day.
     1786         * @param string|int $action The current nonce action.
    17841787         */
    1785         $nonce_life = apply_filters( 'nonce_life', DAY_IN_SECONDS );
     1788        $nonce_life = apply_filters( 'nonce_life', DAY_IN_SECONDS, $action );
    17861789
    17871790        return ceil(time() / ( $nonce_life / 2 ));
    17881791}