How to insert wp_nonce field within echoed string

You use wp_nonce_field with the fourth parameter set to false. This way you can get the nonce field instead of echoing it: $end_data .= wp_nonce_field( “name-of-action”, “name-for-the-form-field”, true, false ); $end_data .= ‘<input type=”text” class=”ss_title_form_ajax_’ . $this->id . ‘” limit=”133″ value=”‘ . $this->native_title . ‘” size = “60” placeholder=””/>’; $end_data .= ‘<span class=”ss_title_form_ajax_’ . $this->id … Read more

custom metabox nonce verification fails

Ok, I found the answer. It’s a quite stupid copy/paste mistake. The name of my nonce_field was not unique. I had already created another nonce from the same plugin but another file. Therefore the basename(__FILE__) value was different leading to a different nonce. All I had to do was change the the name of the … Read more

Nonce fail after second submit attempt

Not 100 % positive but my understanding is that a Nonce expire as soon as you use it. It can only be used for one transaction. So it seems to be logic that it expire after the first call. You should probably return a new one with the response of your first validated request and … Read more

Nonce and widget

You have to be more clear about your problem. It will be better to publish you code and anyone can check it a give their help. I have created a contact form before with nonce and inside the form i added: <input type=”hidden” name=”nonce” value=”<?php echo wp_create_nonce(‘send_email_nonce’); ?>”/> and on the on the form handler … Read more

403 Forbidden on site logo image upload

A few things come in mind have you checked nginx access/error log? Depending on your distro, log should be located at /var/log/nginx/access.log and /var/log/nginx/error.log. What role is your current WP user when uploading, does it have required capabilities ? Try to change wp-content permission to 755 Are you having difficulties only with images file? If … Read more