General: Pass $action to nonce_life filter.

This changeset contextualizes the usage of `nonce_life` filter by passing the `$action` parameter. It allows to alterate the default lifespan of nonces on a case by case basis.

Props giuseppemazzapica, dwainm, DrewAPicture, jorbin, audrasjb, SergeyBiryukov, costdev, antonvlasenko.
Fixes #35188.


git-svn-id: https://develop.svn.wordpress.org/trunk@54218 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jb Audras
2022-09-19 21:34:52 +00:00
parent 8127aaed05
commit 0c248dc0df
2 changed files with 11 additions and 7 deletions
+1 -1
View File
@@ -201,7 +201,7 @@ class Tests_Pluggable extends WP_UnitTestCase {
'deprecated' => null,
'notify' => '',
),
'wp_nonce_tick' => array(),
'wp_nonce_tick' => array( 'action' => -1 ),
'wp_verify_nonce' => array(
'nonce',
'action' => -1,