As of 4.1.1, the nonce is defined in wp-includes/media.php, line 2883:
$settings['post'] = array(
'id' => $post->ID,
'nonce' => wp_create_nonce( 'update-post_' . $post->ID ),
);
So to verify the nonce:
wp_verify_nonce( $nonce, "update-post_$post_ID" );
Related Posts:
- i’m trying to get all my media query attachments via ajax in wordpress
- How to get a unique nonce for each Ajax request?
- Using Backbone with the WordPress AJAX API
- 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
- Nonces and Ajax request to REST API and verification
- Ajax function returns -1
- Serving nonces through AJAX is not refreshing nonce, returning 403 error
- Why this plugin doesn’t work with media upload page?
- 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
- AJAX requests broken due to HTTPS for wp-admin
- Is there a hook to process a backbone restful PUT request inside wordpress?
- Nonces, AJAX, script variables & security in WordPress
- Why does WordPress Heartbeat login not refresh the nonces?
- wp-admin AJAX with Fetch API is done without user
- Show selected images on top in Media Manager
- How do I check if AJAX nonces are implemented correctly?
- 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 Admin AJAX Security – using POST to include a relative URL
- wp_create_nonce() in REST API makes user->ID zero
- ajax nonce verification failing
- SSO autologin WordPress + Ajax
- Mapping Backbone Models to serialized array in wp_options table
- Update attachment metadata fails
- Nonce fails on ajax save
- 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
- javascript ajax and nonce
- How to check nonce lifetime value of plugins?
- Using nonce when loading posts with AJAX
- Should wordpress nonce be placed in html form or in javascript file
- Query data after an Ajax insert
- wp_verify_nonce not working on the mobile device
- Frontend AJAX Media Upload returning 404
- How do I mitigate replay attacks when talking about actions that shouldn’t happen twice?
- AJAX form not working, still reloads on submit
- Ajax Security regarding user priviliges and nonces
- How to use nonces for frontend AJAX voting if the page gets cached?
- delete attachment for one post without deleting actual attachment post
- WordPress wp_localize_script nonce and ajax URL
- How to stop a nonce from being cached in an inline script, or alternatives to regenerate it if expired?
- How to show custom fields in modal in category page
- Including WordPress in RESTful API
- How to tie built in AJAX to an add_action?
- admin-ajax.php vs .load() in WordPress
- Ajax form submission from admin panel
- Ajax response is always 0
- Ajax is not working for logged out users
- Elegantly using JavaScript on widget admin forms
- WordPress AJAX Call Not Return Result
- Form data is empty while posting form through ajax using jquery in WordPress
- load next and previous posts by Ajax and URL update
- Buddypress: Load Ajax Without Template Pack [closed]
- Woocommerce Ajax Add cart not working
- I have to post data by AJAX in wordpress to another Website
- Placement of add_action() for ajax callback?
- WordPress ajax problem need wordpress expert?
- wp_ajax function did not call
- wp_handle_upload returns empty error array
- Single page site + pushState?
- “Loadmore” button is not working in buddypress [closed]
- Uncaught ReferenceError: the_ajax_script is not defined . How is this not defined?
- Right way to include blog-header.php?
- AJAX action through direct link
- Ajax call on new site with jupiterx theme getting 400 response [closed]
- Creating an auto result search bar
- update_option is not saving an array, but saving the string ‘Array’
- Get title and featured image using Ajax
- My function containing a mysql query launched by ajax is not working in wordpress. What am I missing?
- wordpress ajax search posts
- Ajax call from Plugin using Class
- Ajax by worpdress affects called jquery inside template file
- Call public static method from ajax ‘wpcf7_mail_sent’ hook
- Update user meta via ajax from frontend, saving issue
- How to get the admin page slug using wp_loaded hook?
- Having a self updating list
- Unexpected WordPress search results
- WordPress Get Header and Footer using in Admin Area
- Tie the sending of an ajax request to WordPress hooks
- AJAX: admin-ajax.php is adding extra content to my script’s response – how to exclude header, footer, etc.?
- ajax page template
- apply_filters, EMBEDS and AJAX not a friends? [duplicate]
- Using Javascript Callback from plugin in a theme
- Why does my Ajax Get request give a 400 bad request?
- How to get data with Select AJAX PHP
- Add “load more” functionality to an AJAX response
- weird Internal Server Error – no error log produced
- Why are the most recent posts not appearing in a fetch request, unless I’m logged in?
- Successful ajax call returns lots of whitespace and text of code with 0