The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
1answer
285 views

Custom post type: check permissions and validate nonce

I have a custom post type with the following capabilities: $capabilities = array( 'read_post' => 'administrator', 'read_private_posts' => 'administrator', 'publish_posts' => ...
6
votes
4answers
2k views

Do I need a nonce field for every meta box I add to my custom post type admin?

I'm currently working on the admin page of my custom post type, and I got stuck on deciding whether to add a nonce field again for the second metabox or not. I'm very new to custom post types, and ...
0
votes
1answer
1k views

Forms and WordPress Nonce

WordPress nonce is driving me nuts! I had this problem when I started my plugin and removed it but now I have come back to it and still don't know what to do. I have looked all over for a solution. ...
10
votes
1answer
2k views

wp_verify_nonce vs check_admin_referer

What is the difference, which one should I use? I know that wp_verify_nonce checks the time limit, and check_admin_referer I think calls wp_verify_nonce as well as checking for an admin url segment, ...
1
vote
2answers
627 views

wp_nonce_field displaying twice

I have wp_nonce_field in my code but it's creating two instances to the html code for some reason, one where I'd expect it and another at the start of the entry. Is this correct or am I doing ...
2
votes
1answer
420 views

Using nonce external of WP Admin

All, I've got two wordpress pages. One wordpress page displays a form to do some registration stuff for the website. The second wordpress page actually processes the data and inserts it into a custom ...
7
votes
2answers
897 views

Can I use the same nonce for multiple requests on the same page?

Or does this break the purpose of the nonce, which I admint I don't quite understand it? :) For example on two ajax requests that run on page load, or when something is clicked: $.ajax({ type: ...
8
votes
2answers
730 views

Are Nonces Useless?

This is probably a noob question BUT hear me out - isn't the point of using Nonce to protect from things like scrappers (phpcurl scrappers etc.)? But my Nonce prints out in the head of the document ...
2
votes
1answer
2k views

Fatal error: Call to undefined function wp_create_nonce()

I'm trying to add a nonce to my plugin's Ajax. I'm not sure why I'm getting this error: Fatal error: Call to undefined function wp_create_nonce() In my php file : ...
0
votes
1answer
668 views

Help with forms and nonces

I am trying to create a nonce to use with a (public-facing) form. Below is my code: function my_form() { if (isset($_POST['submit'])) { $name = $_POST['name']; $description = ...
0
votes
1answer
545 views

Public posts - preventing duplicate form submissions

I'm creating a public form on a page that allows non-registered (public) visitors to create posts of a custom post type. I'm using nonces, which I naiveley thought would expire once they were used. ...
0
votes
2answers
1k views

Ajax function returns -1

I have a question. I made a simply ajax function. When I'm logged in, it works perfectly. When I'm logged out, it returns me -1 (since Wordpress 3.1) Why ? I don't understand. Precisely, it returns ...
1
vote
2answers
186 views

my theme breaks WP export

I know this is a vague question, please just spend time on it if you are in the mood, I don't need to be flamed for not being more precise. I'm having a problem with a theme I'm developing, for some ...
4
votes
1answer
1k views

Multiple ajax nonce requests

I have a feature in my current project that will be allow multiple ajax requests - I've got a single nonce request worked out (via this tute), but am somewhat unsure how to figure in multiple nonce ...
2
votes
1answer
916 views

WordPress failure when logging out

I have came across the WordPress logout error several times but I really never figured out the cause of it. In earlier days, it was generally that I was missing a nonce but now even with logout link ...