I've got as far as successfully filtering the global nonce_life but am running into trouble applying the filter in a specific function in the way described in this answer.
function quote_nonce_lifetime( $day_in_seconds ) {
return 604800; // 7 days
}
add_filter( 'nonce_life', 'quote_nonce_lifetime' );
The above method works and affects all nonces. However, I only want to extend the nonce lifetime for a specific kind of nonce, something like:
add_filter( 'nonce_life', 'quote_nonce_lifetime' );
$link = wp_nonce_url( get_site_url().'/?quote='.$id, 'view-quote' );
remove_filter( 'nonce_life', 'quote_nonce_lifetime' );
... but it just renders my nonce link already expired. Should this method work or am I barking up the wrong tree?