Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I need to do something specific in my save_post callback for bulk and/or quick edits, so how do I check the nonce for that? I can only find _wpnonce in the edit.php html source, but can't find an action to match it with. I also tried check_admin_referrer() (no arguments) but it fails.

  1. What nonce whould I check for? OR
  2. Should I check for something else in save_post to know it's being fired from a

    a. bulk edit or

    b. quick edit action? I read that DOING_AJAX is there for quick edit, but is that enough on its own? what about for bulk edit?

share|improve this question
    
Any luck with my answer? –  Rutwick Gangurde Jun 23 '12 at 5:39
    
select an answer from below as correct answer. If any of these isn't the right answer. Write an answer and select it as correct answer. –  Sisir Jun 23 '12 at 7:56
    
i did, but i can only accept my own answer in 2 days. :/ –  Ana Ban Jun 23 '12 at 9:04

2 Answers 2

up vote 0 down vote accepted

I found check_admin_referer('bulk-posts') in wp-admin/edit.php:49 for bulk edit. With @Rutwick Gangurde's help, I found check_ajax_referer( 'inlineeditnonce', '_inline_edit' ) in wp-admin/includes/ajax-actions.php:1318. Thanks y'all.

share|improve this answer
3  
Why did you copy over @RutwickGangurdes answer instead of marking his as solution? –  kaiser Nov 6 '12 at 15:18

It's inlineeditnonce. Check line 1185 of admin-ajax.php for details.

share|improve this answer
    
ok, i searched for inlineeditnonce and found check_ajax_referer( 'inlineeditnonce', '_inline_edit' ) in wp-admin/includes/ajax-actions.php:1318. thanks for pointing me to the right direction! –  Ana Ban Jun 23 '12 at 6:10
    
aww i can't upvote you! –  Ana Ban Jun 23 '12 at 6:11
1  
No problem! You can mark the answer as accepted. –  Rutwick Gangurde Jun 23 '12 at 6:14

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.