Check codex info about Nonces life time here.
Here is a quick code that will echo life time of nonces in footer of your site’s front-end as html comment. Put it in your functions.php file.
$n = "";
add_filter('nonce_life', 'wptuts_change_nonce_hourly');
function wptuts_change_nonce_hourly( $nonce_life ) {
global $n ;
$n = $nonce_life;
return $nonce_life;
}
// Display in footer comments
add_filter("wp_footer","d");
function d(){
global $n;
echo "<!- Nonce Life =". $n ."-->";
}
NOTE: This code does not give the ideal way to check life time of nonce, but a quick fix to get the desired info. You should delete this code from functions.php once you get the info.
Related Posts:
- AJAX requests broken due to HTTPS for wp-admin
- wp-admin AJAX with Fetch API is done without user
- WP Admin AJAX Security – using POST to include a relative URL
- How to get a unique nonce for each Ajax request?
- Nonces and Cache
- Is it safe to assume that a nonce may be validated more than once?
- Multiple ajax nonce requests
- Using Nonces for AJAX that only retrieves data
- How to verify nonce from Bulk/Quick Edit in save_post?
- How to add WordPress nonces to ajax request
- Ajax form submission from admin panel
- Nonces and Ajax request to REST API and verification
- Ajax function returns -1
- How to securely add an Ajax button to a WP Admin page?
- Serving nonces through AJAX is not refreshing nonce, returning 403 error
- wp_remote_get() to get AJAX url /wp-admin/admin-ajax.php
- wp_verify_nonce always returns false when logged in as admin
- ajax and nonce when JavaScript is in a seperate file
- wp_verify_nonce doesn’t return true on server when it matches the nonce
- Nonces, AJAX, script variables & security in WordPress
- Why does WordPress Heartbeat login not refresh the nonces?
- How do I check if AJAX nonces are implemented correctly?
- How to check an ajax nonce in PHP
- Can a wp_nonce created from domain 1 to be verified on domain 2?
- how to send Ajax request in wordpress backend
- Identical wp_rest nonce returned from rest_api
- wp_create_nonce() in REST API makes user->ID zero
- ajax nonce verification failing
- WordPress Ajax Not Working ( Custom Admin page)
- Why a strange discrepency between get_current_user_id() when using AJAX versus output of document.cookie?
- SSO autologin WordPress + Ajax
- Pass additional parameter with async upload
- Nonce fails on ajax save
- Use WP admin AJAX url to hide API key
- Unable to successfully verify nonce
- Cache plugins and ajax nonce verification
- Nonce doesn’t validate in nopriv call
- Why does check_ajax_referer give a 403 error on https websites?
- WordPress is creating nonce as a logged in user but verifying it incorrectly
- Preprocess submitted data
- javascript ajax and nonce
- Using nonce when loading posts with AJAX
- Use AJAX in a WordPress Plugin to Get Data From Custom Database?
- admin-ajax.php returns 0 even when the post status code is 200 OK
- Should wordpress nonce be placed in html form or in javascript file
- Can I use application/json content type in WordPress
- wp_verify_nonce not working on the mobile device
- How do I mitigate replay attacks when talking about actions that shouldn’t happen twice?
- wordpress admin ajax trash_comment
- Ajax call not working anymore
- AJAX form not working, still reloads on submit
- WorddPress website admin part not working correctly – I think ajax/json issue
- How modify comments metabox on post edit screen in WordPress?
- Ajax Security regarding user priviliges and nonces
- Weird admin-ajax.php problem
- WordPress Get Header and Footer using in Admin Area
- How to use nonces for frontend AJAX voting if the page gets cached?
- get_comments() returns empty array if called through AJAX
- WordPress blocking polling request when signed into Admin
- WordPress wp_localize_script nonce and ajax URL
- randomly get 400 error while user is logged in wp_ajax
- Blocking admin-ajax.php from outside domain
- wp-admin/admin-ajax.php 400 Bad request (chrome console)
- How to stop a nonce from being cached in an inline script, or alternatives to regenerate it if expired?
- contact form 7 form not working in admin panel
- How does the security of admin_ajax.php work?
- Why use wp_send_json() over echo json_encode()?
- Custom column for changing post status via ajax
- How to properly use wp.ajax.post?
- Change theme based on window size
- Class WP_Rewrite not found
- WordPress function to get term or post object by id
- Conditional success callback based on Ajax Response not working
- Keep getting 400 Bad Request error when trying out AJAX on custom theme
- How to load new text widgets and polls into the sidebar without reloading the page?
- Ajaxify Form That Submits To Same Page To Display Post Data [closed]
- Retrieve JSON file from JS trough php
- Sql formatting for post data within function
- Get returned URL from wp_remote_post if response code is 302
- Change URL without reload Ajax
- problem using ajax url
- How to display contact form 7 form in vanilla js without jquery in frontend
- Error sending array data from php to javascript
- Sharing variables in both actions wp_footer and wp_ajax
- Opening Modal popup on Ajax form submission
- Ajax sometimes work and sometimes just don’t work
- admin-ajax error 400
- Failed to load resource: the server responded with a status of 404 (Not Found) admin-ajax.php
- Javascript output now showing in custom widget
- Many buttons not functioning in WordPress dashboard (as admin)
- Create a post with REST API and adding a category
- how to correctly use json_encode with ajax
- Retrieve Header Background Image with AJAX
- How to block search engines indexing certain AJAX actions
- Ajax Comment: Page reloads whenever the comment submission form is reloaded
- wp_ajax_action, wp_ajax_nopriv_action not working
- Static var overwritten with WP AJAX action, works fine without AJAX
- using ajax to query sql
- Adding custom fields to Wired Impact Volunteer Management Plugin
- How to update my jquery/PHP function to add/remove user as favorites in (WordPress) users list